Repository navigation
Explain merge errors in designer-friendly terms - #2223
Conversation
|
LGTM. Thanks! |
anthrotype
left a comment
There was a problem hiding this comment.
Thanks Simon, this is very helpful!
Some tests would have been nice too :)
| @@ -1,3 +1,22 @@ | |||
| from enum import Enum, auto | |||
There was a problem hiding this comment.
nit: you imported enum.auto but it seems you haven't used it
|
Using fontmake through builder on a font which was presenting this issue last week, now output error message is: If I run only fontmake: Same if I reinstall fontmake and https://github.com/fonttools/fonttools in a new venv |
|
thanks @RosaWagner for reporting this. Do you mind filing a separate issue? This PR already got merged so the bug would need to be fixed in a new PR before the next release. |
|
np, done in #2224 Didn't know if it was a real issue or if I just don't know how to pip install stuff correctly ;) |
|
Test would have been nice but I have not found it easy to replicate these merge errors... Hopefully I will be able to derive a test case. |
|
@simoncozen I am also testing your fonttools fork. As an enhancement suggestion, it would be useful to know the names of parent glyphs in question when fontmake references errors in bracket layers. ( I fixed my error by renaming the bracket layers to {205,0.5} from {210,0.5} ) --verbose DEBUG output: |
|
What's interesting to me is that the error happened when loading the designspace - that UFO should never have been produced! In fact, glyphsLib has a check for something like this: Maybe we should not just check the designspace bounds but also the mapped userspace coordinate too? (I might sound like I know what I'm talking about, but I don't really understand bracket layers and anything that involves coordinate mapping confuses the heck out of me.) At any rate I see this as a glyphsLib bug, if it's producing out-of-range layers. One for @madig, I think. |
|
@alexeiva I'd need to have a look at the .glyphs file to judge if it's a bug or not, but the error message contains:
Meaning you had your heaviest weight at the 205 design == 900 user coordinate. Glyphs can extrapolate a bit, fontmake cannot. Your brace layers therefore have to be kept inside the axis limits. |
|
I think it is a bug, because glyphsLib produced a file that varLib says is invalid. The problem should have been caught earlier; if it was caught in glyphsLib, you would be able to report the glyph that caused the problem. |
|
@madig Initially I had 210 == 900, then updated to 205 == 900, but forgot to update the bracket layers. Here is an opensource font where I reproed the same issue: |
Currently error messages from
varLib.mergeare... probably meaningful if you're behdad, but not otherwise. This patch makesvarLib.mergeexplain itself better when things go wrong.Without the patch:
With the patch: