alerque / libertinus

The Libertinus font family
Other
927 stars 57 forks source link

Scaled super/subscripts metrics (OS/2) table are a bit off (esp. subscript baseline) #511

Open Omikhleia opened 2 years ago

Omikhleia commented 2 years ago

Describe the bug I am trying to build "fake" scaled and raised superscripts and subscripts using the OpenType OS/2 table metrics. While Libertinus has decent parameter values (compared to other font), and unless I misinterpreted them, the values seem a bit off -- Notably, baselines do not match perfectly.

Steps to reproduce I don't know much about font tooling, but here is the hacky SILE 0.12.5 document that I used to generate the image below.

Expected vs. actual behavior While it is obvious that these super/subscript parameters are only "recommendations", and that some characters may have a specific design (e.g. typically the 2, so I guess one can't say much about the vertical scaling) in super/subscript, I would have expected at least the baseline to be same (or closer, esp. in the case of the subscripts).

Screenshots / logs

Font version 7.040. The image below shows the Unicode superscript (resp. subscript) character, the result with the +sups (resp. +subs) font feature (here seemingly identical, but some other fonts have them different...), and the scaled/raised character with lines (in gray) showing the extend of the raised (resp. lower) baseline and top.

image

Additional context N.A.