Tags: chagge/skia
Tags
Fix int16_t for glyphs, const glyphs, and clarify glyph loop. Several places in the PDF code are using int16_t for glyphs. With newer NotoSans fonts, all possible glyph ids are being used, so this can lead to problems. The PDF glyphs from text code returns the text for the glyphs if the encoding is for glyphs. However, it returns this using an unsafe const cast which is hiding possible bugs and preventing correct use of const in other places. The way the glyph loop in SkPDFDevice::drawPosText is written uses a '--i' in the loop, which makes it appear this can loop forever. I don't believe it can, but it is an unecessary code folding. We should also at least assert the forward progress correctness here. Review URL: https://codereview.chromium.org/626613002 Cherry-pick: 22edc83 Approval: https://code.google.com/p/chromium/issues/detail?id=418939#c30
DirectWrite to use aliased if ClearType is empty. Some CJK fonts with some versions of DirectWrite return valid data for bitmaps, but not for cleartype data. For reference, two screenshots. M37 Stable and then with this patch: http://imgur.com/9pf3rB9,EiTb6Li See https://code.google.com/p/chromium/issues/detail?id=396624#c10 for content of test html file. [email protected], [email protected], [email protected], [email protected], [email protected] BUG=chromium:407945 Review URL: https://codereview.chromium.org/504343007
DirectWrite to use aliased if ClearType is empty. Some CJK fonts with some versions of DirectWrite return valid data for bitmaps, but not for cleartype data. For reference, two screenshots. M37 Stable and then with this patch: http://imgur.com/9pf3rB9,EiTb6Li See https://code.google.com/p/chromium/issues/detail?id=396624#c10 for content of test html file. [email protected], [email protected], [email protected], [email protected], [email protected] BUG=chromium:407945 Review URL: https://codereview.chromium.org/504343007 Cherry-picked from b2f7fce.
DirectWrite to use aliased if ClearType is empty. Some CJK fonts with some versions of DirectWrite return valid data for bitmaps, but not for cleartype data. For reference, two screenshots. M37 Stable and then with this patch: http://imgur.com/9pf3rB9,EiTb6Li See https://code.google.com/p/chromium/issues/detail?id=396624#c10 for content of test html file. [email protected], [email protected], [email protected], [email protected], [email protected] BUG=chromium:407945 Review URL: https://codereview.chromium.org/504343007