alerque / libertinus

The Libertinus font family
Other
928 stars 57 forks source link

Dutch ij digraphs with acute #460

Closed ivo-s closed 3 years ago

ivo-s commented 3 years ago

Fixes #437. This change adds the ij digraph as a locl feature for Dutch (NLD), but not Flemish, as the treatment of ij seems different there: https://en.wikipedia.org/wiki/IJ_(digraph)#Flanders ...aaand it works with acute! :partying_face: Behold: image ij_test.zip As long as this PR is active, you can download the compiled font files from the forked branch and test them with the source above: https://github.com/ivo-s/libertinus/runs/2069981150

The substitution should work for uppercase, lowercase, and smallcap letters. Combining acute works with íj, where the í can be a Unicode glyph or i with a combining acute. Considering the limited font support of acuted ij, I imagine this is how most people would write it anyway. The substitution also works with the diagraph ij plus combining acute. All possibilities are laid out in the testing XeLaTeX source, which is encoded in UTF-8.

You may notice that Semibold Italic does not have a ligature between the lowercase ij, even though Italic and Bold Italic do. This can be fixed in a future update, preferably by a type designer who can draw nice curves :-)

I also swapped acute.cap and grave.cap in Serif Semibold Italic, because I happened to notice they were switched.

I corrected the small caps feature smcp behavior, because it did not work for some languages. This is due to the feature file specification: https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#4.b.ii

If your font has several languages for a given script, and you need language specific rules for only some of the languages, you should still explicitly name all of the languages so that they will inherit the script-level default rules.

That is also why I added a reminder comment in gsub.fea.

I expect that we should also decide whether to make a separate i_j glyph, as suggested by @georgd.

ivo-s commented 3 years ago

I added the I_J and i_j glyphs for substitutions and I also put I_J and IJacute in some kerning classes that already contained IJ.

alerque commented 3 years ago

Thanks for the contribution! Sorry it took me so long to review.

alerque commented 3 years ago

I rewrote the commit messages (I'm still playing around with what commit message template I like for font projects!), added a fontlog entry, and merged some changes so that it works with Fontship v0.8.0 (which has a new version of sfdLib with API changes) so that the CI checks pass. I haven't dug in too deep on the alternative implementations but as far as I can tell this fits the bill.