Bug 333126 Bold/Italic text isn't displayed as bold/italic with cairo-gtk2 build if the font is synthesis font r=karlt, b1.9=mtschrep

This commit is contained in:
masayuki@d-toybox.com 2008-02-12 02:39:23 -08:00
parent 71ed653f99
commit 91ba1601b0

View File

@ -833,7 +833,12 @@ CreateScaledFont(cairo_t *aCR, cairo_matrix_t *aCTM, PangoFont *aPangoFont)
if (FcPatternGetDouble(fcfont->font_pattern, FC_PIXEL_SIZE, 0, &size) != FcResultMatch)
size = 12.0;
cairo_matrix_t fontMatrix;
cairo_matrix_init_scale(&fontMatrix, size, size);
FcMatrix *fcMatrix;
if (FcPatternGetMatrix(fcfont->font_pattern, FC_MATRIX, 0, &fcMatrix) == FcResultMatch)
cairo_matrix_init(&fontMatrix, fcMatrix->xx, -fcMatrix->yx, -fcMatrix->xy, fcMatrix->yy, 0, 0);
else
cairo_matrix_init_identity(&fontMatrix);
cairo_matrix_scale(&fontMatrix, size, size);
cairo_font_options_t *fontOptions = cairo_font_options_create();
cairo_get_font_options(aCR, fontOptions);
cairo_scaled_font_t *scaledFont =