зеркало из https://github.com/mozilla/gecko-dev.git
use FC_PIXEL_SIZE instead of pango_font_describe_with_absolute_size b=414239 r+sr=roc
This commit is contained in:
Родитель
47f6fa3680
Коммит
4fd5a5e57e
|
@ -376,14 +376,18 @@ gfxPangoFont::GetOrMakeFont(PangoFont *aPangoFont)
|
||||||
(g_object_get_qdata(G_OBJECT(aPangoFont), GetFontQuark()));
|
(g_object_get_qdata(G_OBJECT(aPangoFont), GetFontQuark()));
|
||||||
|
|
||||||
if (!font) {
|
if (!font) {
|
||||||
PangoFontDescription *desc =
|
// pango_font_describe_with_absolute_size requires Pango-1.14
|
||||||
pango_font_describe_with_absolute_size(aPangoFont);
|
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
|
// Shouldn't actually need to take too much care about the correct
|
||||||
// family or style, as size is the only thing expected to be
|
// family or style, as size is the only thing expected to be
|
||||||
// important.
|
// important.
|
||||||
gfxFloat size =
|
|
||||||
pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
|
|
||||||
PRUint8 style =
|
PRUint8 style =
|
||||||
PangoStyleToThebesStyle(pango_font_description_get_style(desc));
|
PangoStyleToThebesStyle(pango_font_description_get_style(desc));
|
||||||
PRUint16 weight = pango_font_description_get_weight(desc);
|
PRUint16 weight = pango_font_description_get_weight(desc);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче