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.
printf("Copyright: Dedicated to the public domain\n");
printf("Version: 002.003\n");
printf("ItalicAngle: 0\n");
- printf("UnderlinePosition: %g\n", (double)(-YPIX / 2));
+ printf("UnderlinePosition: %g\n", (double)(-3 * YPIX / 2));
printf("UnderlineWidth: %g\n", (double)(YPIX));
printf("OS2StrikeYPos: %d\n", (int)(3 * YPIX));
printf("OS2StrikeYSize: %d\n", (int)(YPIX));