-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COLR/CPAL requirement for glyph ID 1 #346
Comments
It appears that in DirectWrite's current implementation (tested on Microsoft Windows Version 10.0.18363.657) when using a font with CFF outlines and COLR/CPAL the IDWriteColorGlyphRunEnumerator will always state that glyph ID 1 needs to be drawn first for all color glyph runs, as if every layer record started with an implicit gID of 1 (I haven't checked what the implicit paletteIndex is, I think it was either black or current color, though it may have been the paletteIndex of the actual first entry). This has come up in https://bugs.chromium.org/p/skia/issues/detail?id=9981 (call TranslateColorGlyphRun to get IDWriteColorGlyphRunEnumerator then MoveNext and GetCurrentRun to get the DWRITE_COLOR_GLYPH_RUN which has a DWRITE_GLYPH_RUN which always seems to want to draw glyph 1 the first time around). I think this text may just be the result of this bug? I'll try to put together a simple reproducer if I can. Hopefully if this is fixed this text can be removed. If not, I'd be very interested in knowing why glyph ID 1 is being drawn under all color CFF glyphs and how that is supposed to work. |
Great finding, thanks. This then wouldn't be the only case where the COLR spec is modeled after the Windows implementation, another one would be #250. |
I contacted the relevant developer at Microsoft asking him to provide input in this discussion. I had in mind for him to respond here, but instead he responded to me email with the following info:
|
That's exactly why specs should not be written by whoever makes an implementation.... |
The ask in this issue was for information, which has been provided. If there isn't any proposal for revision of the spec, it can be closed. (One possibility might be to change the across-the-board requirement to a compatibility note; e.g., "Some early Windows implementations require...") If there's no further discussion in the next few days, I'll close this. |
I know at least 4 non-MS implementations that do not check for this requirement, nor do they need any special handling of GID 1, so my suggestion is to change the spec and make it a note that old MS implementation had this requirement. |
I know that Apple's implementation ignore this. I'll ping Microsoft with a draft revision to that effect, noting the situation in other implementations. |
Draft revision:
|
Reviewed by MS: they have no concerns with the proposed change. |
The spec has the text above with no explanation why this is needed.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: