Summary: | Simple text codepath ignores y-component of glyph advances | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||||
Component: | Text | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||
Status: | RESOLVED INVALID | ||||||||||
Severity: | Normal | CC: | changseok, darin, dbarton, esprehn+autocc, ews-watchlist, fred.wang, glenn, kondapallykalyan, mmaxfield, pdr, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 206208 | ||||||||||
Attachments: |
|
Description
Myles C. Maxfield
2020-08-19 14:17:03 PDT
Created attachment 434191 [details]
Patch
Created attachment 434269 [details]
Patch
WebCore\platform\graphics\win\SimpleFontDataCGWin.cpp(121,16): error C3861: 'makeGyphBufferAdvance': identifier not found Created attachment 434295 [details]
Patch
Comment on attachment 434295 [details]
Patch
We might not want to do this.
(In reply to Myles C. Maxfield from comment #6) > We might not want to do this. y? (In reply to Darin Adler from comment #7) > (In reply to Myles C. Maxfield from comment #6) > > We might not want to do this. > > y? Because this data comes from the hmtx and vmtx tables in the font, but the data contained inside those tables is one-dimensional. This means that the y-components of these advances is always 0 (or almost always 0, if CoreText has some corner case somewhere which might set something in some circumstance to nonzero). These advances are retained inside caches, and it would be kind of unfortunate to double the size of our caches just so we can store a bunch of 0 values. So, I need to determine if CTFontGetAdvancesForCharacters() will ever return a nonzero value for the Y-components. If it does, I should rework this patch to only store the nonzero values in our caches (maybe by using a unique_ptr which is usually null or something). If it doesn't, then we should just straight up not do this patch. There’s a chance that bitmap fonts might actually be capable of having nonzero y advances. I’m making a test font to see. https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bdat.html I believe I've proved that CoreText will always report 0 for one of the two fields when you ask it for advances. So, it looks like this bug is unnecessary. |