Skip to content
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

Building vmtx from features.fea #1013

Open
NightFurySL2001 opened this issue Jul 7, 2023 · 2 comments
Open

Building vmtx from features.fea #1013

NightFurySL2001 opened this issue Jul 7, 2023 · 2 comments

Comments

@NightFurySL2001
Copy link
Contributor

NightFurySL2001 commented Jul 7, 2023

Currently when including vmtx in features.fea it raises an error that the functionality is unsupported:

INFO:ufo2ft:Building OpenType tables
INFO:ufo2ft.outlineCompiler:The copyright was normalized for storage in the CFF table and consequently some characters were dropped: 'Copyright 2022-2023 The Unbounded Sans Project Authors https:github.comNightFurySL2001unbounded-sans
Copyright 2020 The Dela Sans Project Authors https:github.comsyakuzenDelaGothic'
fontmake: Error: In 'UnboundedSans.ufo': Compiling UFO failed: UnboundedSans.ufo\features.fea:28:1: "table vmtx" is not supported

Will there be support for vmtx in features.fea soon? It will be immensely useful to use the features.fea method since the alternative is to modify all the glifs in UFO to include height and public.verticalOrigin.

Also vhea support might crash with #586 so that might need to be looked into too.

@punchcutter
Copy link

punchcutter commented Jul 7, 2023

I opened a PR last year for this fonttools/fonttools#2704, but I knew at the time it is undesirable to do it this way. I only matched what makeotf does internally. For UFO sources you can avoid writing the feature and have it derived from the info in the UFO. The PR discussion explains how to get vmtx without putting it in the features file. Well, you seem to know that. I don't think it's hard to do at all. And if you have the values defined already in the feature file it's not too hard to parse that with Python and write all the info into the UFOs.

@NightFurySL2001
Copy link
Contributor Author

That is true, but for editors that doesn't support vmtx natively it is better and easier to override in features.fea since overriding features.fea is quite normal after generating UFO from source (I think?), while also making it easier by not needing to specify the metrics for all the glyphs. Otherwise it is another script to maintain before building the font.

This actually remind me of the other thing that setting the keys like in #586 but no height and public.verticalOrigin in individual glyphs makes the glyphs have 0 height in vmtx. I'm not sure if that's intended or a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants