-
Notifications
You must be signed in to change notification settings - Fork 105
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
Possibly incorrect WARN on monospaced build width consistency - some marks have zero advance width definitions #3053
Comments
@chrissimpkins please let me know if this fix is good for you. Otherwise, consider reopening the issue. |
earlier this week @chrissimpkins commented on the merged PR at #3062 (comment):
I've been re-evaluating this today and I think my changes in that PR are actually good. But I also think that the problem observed by Cris may be a corner-case occurrence. My theory is that perhaps the most common advance for glyphs on Chris' font may be zero, which would cause that bad log message. To address that, I think I may have to make one additional change so that only non-zero advance widths are considered when calculating the most common advance. In other words, we are actually interested in the most common non-zero advance value. In order to confirm if that's the actual case we're dealing with here, I'd need access to a sample of your font files. Can you please send me some of those files, @chrissimpkins? |
It would also be good to know if @chrissimpkins fontbakery includes the PR from #3036 — somewhat related issue possibly, no? Combing marks should be 0 width also in monospace fonts afaik. |
No criticism about the changes. I think that they do not address my issue if I understand the changes correctly.
This is the root of the issue. FB appropriately detects our fonts as "monospaced" based on the FB assessment of the adv width of the ASCII set + the included FB glyph filters. FB is then in "monospaced" check mode and flags combining marks as not appropriate for a monospaced build because they do not share the adv width metrics of the ASCII set calculation. Combining marks are compiled with a zero advance width definition by fontmake so they will not have the adv width calculated by the ASCII set routine. I think that the pseudo code to address it is ~
I believe that the combining marks simply need to be added to the filter so that they are either not checked or are confirmed to have a zero adv width that can differ from the global adv width definition for the font. |
Done! Thanks Felipe! |
I've just verified that indeed commit 42e872c (as suggested by @kontur) fixed the problem last month and was included in the last two stable releases, 0.7.30 and 0.7.31 @chrissimpkins please update your fontbakery installation to benefit from the fix. |
Then we should ignore it and get the second most common value. In other words, what we want here is the most common nonzero value. I think it is extremely unlikely to happen, but this ensures it will also be properly handled if it ever happens. (issue fonttools#3053)
Then we should ignore it and get the second most common value. In other words, what we want here is the most common nonzero value. I think it is extremely unlikely to happen, but this ensures it will also be properly handled if it ever happens. (issue fonttools#3053)
Then we should ignore it and get the second most common value. In other words, what we want here is the most common nonzero value. I think it is extremely unlikely to happen, but this ensures it will also be properly handled if it ever happens. (issue #3053)
Glyphs source file -> static instance TTF font build with fontmake v2.2.1 pipeline. This is a weight axis monospaced typeface.
Observed behaviour
fontbakery raises a WARN level report that the combining marks
*comb
glyphs in our glyph set have inconsistent widths in a monospaced typeface.The report is:
and this appears to come from this block of the fontbakery source:
https://github.com/googlefonts/fontbakery/blob/42e872c92947569f5972a76bb52175e95666ed08/Lib/fontbakery/profiles/shared_conditions.py#L152-L173
I reviewed the Glyphs source files and the advance width for all of the reported glyphs is set at the expected value for the typeface (600).
Here is what I see in the binaries:
And a visual of dieresiscomb:
It looks like a subset of the marks (maybe all combining marks?) are compiled with a zero advance width value and should be excluded from this check.
Expected behaviour
This is not reported as a warning for monospaced typefaces if these metrics are valid.
The text was updated successfully, but these errors were encountered: