-
Notifications
You must be signed in to change notification settings - Fork 30
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
Clarifying postscriptUnderlinePosition #217
Comments
Might it make the most sense to do both? That is, add an optional keyword for post for specifying the value, but also clarify how the value should be calculated from postscriptUnderlinePosition if that keyword is absent? It often turns out that calculated values work 99% of the time but there are valid exceptions. |
I’m for clarifying this. I can’t see why the value in CFF and post should not agree. |
I would much prefer to clarify over adding a new key/value to fontinfo.plist. If we do need a new key/value I'd prefer doing it with a public key in the lib. |
@schriftgestalt The two values will always be different, as they are specified differently:
For sure it sounds like we should clarify the value (right now it says the value is for CFF/post/Type1) as being tied to how Thanks all for chiming in! |
Since we need to clarify regardless, maybe we should do that first and then see if anyone thinks the calculation we come up with would ever fall short. AFDKO's calculation is cff_underline_position + cff_underline_thickness / 2. |
@skef thank you: agree that this is the way to at least start. |
I'm glad this is being addressed, thank you all! For what it's worth, it seems confusing to me to use the old (basically now obsolete) CFF logic as the basis for the UFO spec if the values that will be stored in the newer / more relevant post tables will be different. |
@nicksherman: because the info attribute is tied to postscript (CFF/Type1) changing the behavior of the attribute to be how Closed with #218 |
Whoops! Sorry, I was reading the code wrong. It looks like the calculation was cff_underline_position - cff_underline_thickness / 2 . I wrote "+" earlier. Sorry for the think-o |
Oh, dammit, wait never mind, I was right the first time! I just confused myself by looking at the inverse calculation. What you have is fine! I guess I need coffee or something. |
For the record the calculation is here: https://github.com/adobe-type-tools/afdko/blob/2e504e5e3578fca17ac83e77b522bd0001bf3dea/c/makeotf/lib/hotconv/post.c#L45 |
I was away while this was discussed so I didn't have the chance to chime in. Sorry but I don't agree with the changes that went in #218. We should have simply akwnoledged that the interpretation of this field is ambiguous and implementation dependent, and may produce different result depending on whether a compiler uses the post's definition (fontmake/ufo2ft) or the Type1/CFF definition (AFDKO's makeotf). To make the interpretation unambiguous going forward, without needing a major version bump, a new lib key could be specified so that new compiler versions can read and apply either definitions. Existing sources should continue to produce the same binary fonts, whether they were built using fontmake or AFDKO, and not suddenly change because the UFO spec got "clarified", without even an explicit version format change (and this one arguably counts as major change so UFO 4, rather than 3.1). |
@anthrotype yes, agree, will fix. Apologies, I was too hasty. For now, what do you think about the a public lib key being |
sounds good, thanks. Maybe I would call the new public lib key (and future fontinfo attribute) |
|
Ok, I'll PR that. |
See discussion in #217 and googlefonts/ufo2ft#760
PRs made |
And accepted. Closing. |
The UFO spec leaves ambiguity for
postscriptUnderlinePosition
.The
post
version of this data is different from theCFF/Type1
version of the data: https://learn.microsoft.com/en-us/typography/opentype/spec/postIt seems like the FDK accounts for this (adobe-type-tools/afdko#1531) but fontMake does not.
Either this value should be clarified as to what it means to both tables, or we should add a key for the
post
table. I don't think a key should be added for the same type of information, so I think we should clarify this value.By name the implication is that the value is the center of the underline stroke. Should we go with this and say that the post table needs to calculate from that, or to we go with the
post
definition of it being the top of the stroke?Either way, some tools will need to change.
Does anyone have an opinion on this? @anthrotype @justvanrossum @typesupply @schriftgestalt @josh-hadley @kaydeearts @skef
The text was updated successfully, but these errors were encountered: