chiark / gitweb /
Correct underline position
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 26 Feb 2022 22:13:12 +0000 (22:13 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Sat, 26 Feb 2022 22:13:12 +0000 (22:13 +0000)
commit927f1fe478572304535b78e6ba568526abb51000
treec5bb849ef2fd458e808ae07e3e6842b3d50d2ca8
parent08dda21e633c7b02ec9228687334d412e1d9c010
Correct underline position

The correct underline position is (in my opinion) in the lowest pixel
of the character cell, in line with the descender of the "g".  This is
where the BBC Micro's cursor is by default.

It turns out that there are two ways to specify the underline
position: Type 1 fonts and AFM files specify the centre of the line,
while the OpenType 'post' table specifies the top edge ("for
historical reasons").  Experimentation demonstrates that FontForge's
"UnderlinePosition" uses the Type 1 definition and converts it to the
OpenType version as necessary.
bedstead.c