diff options
Diffstat (limited to 'src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm')
-rw-r--r-- | src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 9b8f10f588..570e841d52 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -63,15 +63,12 @@ static void loadAdvancesForGlyphs(CTFontRef ctfont, for (int i = 0; i < len; ++i) { if (glyphs->glyphs[i] & 0xff000000) continue; - glyphs->advances_x[i] = QFixed::fromReal(advances[i].width); - glyphs->advances_y[i] = QFixed::fromReal(advances[i].height); + glyphs->advances[i] = QFixed::fromReal(advances[i].width); } if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { - for (int i = 0; i < len; ++i) { - glyphs->advances_x[i] = glyphs->advances_x[i].round(); - glyphs->advances_y[i] = glyphs->advances_y[i].round(); - } + for (int i = 0; i < len; ++i) + glyphs->advances[i] = glyphs->advances[i].round(); } } @@ -228,15 +225,12 @@ bool QCoreTextFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout * for (int i = 0; i < glyph_pos; ++i) { if (glyphs->glyphs[i] & 0xff000000) continue; - glyphs->advances_x[i] = QFixed::fromReal(advances[i].width); - glyphs->advances_y[i] = QFixed::fromReal(advances[i].height); + glyphs->advances[i] = QFixed::fromReal(advances[i].width); } if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { - for (int i = 0; i < glyph_pos; ++i) { - glyphs->advances_x[i] = glyphs->advances_x[i].round(); - glyphs->advances_y[i] = glyphs->advances_y[i].round(); - } + for (int i = 0; i < glyph_pos; ++i) + glyphs->advances[i] = glyphs->advances[i].round(); } return true; } |