Open paratype-andrei opened 4 years ago
It is possible to supply a glyph list to the psautohint
command via the -g
option, as well as excluding glyphs with the -x
option, which might be step one toward a workaround.
makeotf -r
lists unhinted glyphs in a font, which could help creating the glyph list required above.
This is not the most elegant approach, but probably helps for the moment.
Our actual issue is in that in certain cases our font mastering team has to manually correct/adjust hints after running autohint. So, having two additional options would be very useful:
In the second option, how will the tool be able to determine which hints it should or shouldn't add?
For a given character, the tools sees horizontal hints already present (there at least one hstem command) and the vertical ones missing (no vstem commands). In this case, the tool keeps the horizontal hints and adds the verticals. If both horizontal and vertical hints are present, don't touch this character.
I think it would be better to make the option explicit. Something like add only vertical hints
. Any existing vertical hints would be discarded and new ones would be added.
"add only vertical hints" is definitely a very useful option (together with the horizontal counterpart). Unfortunately, it will not fully cover our use case. We often do not know upfront (specifically, when adding new third party fonts to our Web store) which hints were and which were not added by the original font manufacturer. We use hints on certain characters to classify fonts. Cap Height of "H" divided by its vertical stem width is a measure of Weight, horizontal stem divided by Cap Height - contrast, etc. So, when a font does have both vertical and horizontal hints for "H", we use them for the classification. If one or both of hint types is missing we want to temporarily run psautohint to calculate hints for "H" and use the results for the classification.
"do-not-override-existing-hints" The second option differs from the first one because in some cases the horizontal hints are already there (and we don't want to replace them), but the vertical hints have to be added for chars that do not have them already.
This is probably doable but its a bit more complicated than it may first appear because of hint masks. There are two options:
"Don't hint glyphs with existng hints" is of course a much simpler problem.
Is it possible to autohint only when vstem or hstem command is not already present?