]> git.pld-linux.org Git - packages/firefox.git/blob - mozilla-firefox-414239.patch
- better way to show "Add exception" button directly w/o clicking through stupid...
[packages/firefox.git] / mozilla-firefox-414239.patch
1 Index: gfx/thebes/src/gfxPangoFonts.cpp
2 ===================================================================
3 RCS file: /cvsroot/mozilla/gfx/thebes/src/gfxPangoFonts.cpp,v
4 retrieving revision 1.128
5 diff -u -p -U 8 -r1.128 gfxPangoFonts.cpp
6 --- gfx/thebes/src/gfxPangoFonts.cpp    27 Jan 2008 10:27:08 -0000      1.128
7 +++ gfx/thebes/src/gfxPangoFonts.cpp    1 Feb 2008 20:07:47 -0000
8 @@ -371,24 +371,28 @@ NewPangoFontDescription(const nsAString 
9  /* static */
10  already_AddRefed<gfxPangoFont>
11  gfxPangoFont::GetOrMakeFont(PangoFont *aPangoFont)
12  {
13      gfxPangoFont *font = static_cast<gfxPangoFont*>
14          (g_object_get_qdata(G_OBJECT(aPangoFont), GetFontQuark()));
15  
16      if (!font) {
17 -        PangoFontDescription *desc =
18 -            pango_font_describe_with_absolute_size(aPangoFont);
19 +        // pango_font_describe_with_absolute_size requires Pango-1.14
20 +        PangoFontDescription *desc = pango_font_describe(aPangoFont);
21 +
22 +        PangoFcFont *fcfont = PANGO_FC_FONT(aPangoFont);
23 +        double size;
24 +        if (FcPatternGetDouble(fcfont->font_pattern, FC_PIXEL_SIZE, 0, &size)
25 +            != FcResultMatch)
26 +            size = pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
27  
28          // Shouldn't actually need to take too much care about the correct
29          // family or style, as size is the only thing expected to be
30          // important.
31 -        gfxFloat size =
32 -            pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
33          PRUint8 style =
34              PangoStyleToThebesStyle(pango_font_description_get_style(desc));
35          PRUint16 weight = pango_font_description_get_weight(desc);
36          NS_NAMED_LITERAL_CSTRING(langGroup, "x-unicode");
37          gfxFontStyle fontStyle(style, weight, size, langGroup, 0.0,
38                                 PR_TRUE, PR_FALSE);
39  
40          // (The PangoFontDescription owns the family string)
This page took 0.033862 seconds and 3 git commands to generate.