Tue 25 Jun 2013 11:33:52 AM UTC, original submission:
Refer to https://code.google.com/p/chromium/issues/detail?id=233851 to see capture.
Korean advance is always 2. SkFontHost_FreeType.cpp uses FreeType and fail to compute correct advance.
In detail, fFace->glyph->advance.x is correct but fFace->glyph->linearHoriAdvance is always 2.
FT_Face fFace;
FT_Load_Glyph( fFace, glyph->getGlyphID(fBaseGlyphCount), fLoadGlyphFlags );
// wrongAdvance is always 2
SkScalar wrongAdvance = SkFixedMul(fMatrix22.xx, fFace->glyph->linearHoriAdvance);
// correctAdvance is correct
SkScalar correctAdvance = SkFDot6ToFixed(fFace->glyph->advance.x);
As similar reason, FT_Get_Advance has a problem also.
FT_Get_Advance( fFace, glyph->getGlyphID(fBaseGlyphCount), fLoadGlyphFlags | FT_ADVANCE_FLAG_FAST_ONLY, &advance );
// wrongAdvance is always 2
SkScalar wrongAdvance = SkFixedMul(fMatrix22.xx, advance);
All Korean wait for this bug :)
|