SOURCES: mozilla-firefox-414239.patch (NEW) - add patch for pango ...
glen
glen at pld-linux.org
Wed Feb 13 11:32:49 CET 2008
Author: glen Date: Wed Feb 13 10:32:49 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- add patch for pango crash from #414239 (by raul raat)
---- Files affected:
SOURCES:
mozilla-firefox-414239.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mozilla-firefox-414239.patch
diff -u /dev/null SOURCES/mozilla-firefox-414239.patch:1.1
--- /dev/null Wed Feb 13 11:32:49 2008
+++ SOURCES/mozilla-firefox-414239.patch Wed Feb 13 11:32:44 2008
@@ -0,0 +1,40 @@
+Index: gfx/thebes/src/gfxPangoFonts.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/gfx/thebes/src/gfxPangoFonts.cpp,v
+retrieving revision 1.128
+diff -u -p -U 8 -r1.128 gfxPangoFonts.cpp
+--- gfx/thebes/src/gfxPangoFonts.cpp 27 Jan 2008 10:27:08 -0000 1.128
++++ gfx/thebes/src/gfxPangoFonts.cpp 1 Feb 2008 20:07:47 -0000
+@@ -371,24 +371,28 @@ NewPangoFontDescription(const nsAString
+ /* static */
+ already_AddRefed<gfxPangoFont>
+ gfxPangoFont::GetOrMakeFont(PangoFont *aPangoFont)
+ {
+ gfxPangoFont *font = static_cast<gfxPangoFont*>
+ (g_object_get_qdata(G_OBJECT(aPangoFont), GetFontQuark()));
+
+ if (!font) {
+- PangoFontDescription *desc =
+- pango_font_describe_with_absolute_size(aPangoFont);
++ // pango_font_describe_with_absolute_size requires Pango-1.14
++ PangoFontDescription *desc = pango_font_describe(aPangoFont);
++
++ PangoFcFont *fcfont = PANGO_FC_FONT(aPangoFont);
++ double size;
++ if (FcPatternGetDouble(fcfont->font_pattern, FC_PIXEL_SIZE, 0, &size)
++ != FcResultMatch)
++ size = pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
+
+ // Shouldn't actually need to take too much care about the correct
+ // family or style, as size is the only thing expected to be
+ // important.
+- gfxFloat size =
+- pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
+ PRUint8 style =
+ PangoStyleToThebesStyle(pango_font_description_get_style(desc));
+ PRUint16 weight = pango_font_description_get_weight(desc);
+ NS_NAMED_LITERAL_CSTRING(langGroup, "x-unicode");
+ gfxFontStyle fontStyle(style, weight, size, langGroup, 0.0,
+ PR_TRUE, PR_FALSE);
+
+ // (The PangoFontDescription owns the family string)
================================================================
More information about the pld-cvs-commit
mailing list