So, a little update on this if one is using the 6x13 font.
It seems that most 6x13 files in TrueType format (.otb extension) out there have been converted using a tool that defaults to setting "EM Space" to 1000 units and both "Line Gap" fields to 90 units. With a 13 pixel tall font that means that the actual line height requested by the font is 13+13*90/1000 = 14.17 pixels. Editing the font and setting the LineGap field to 0 should fix this.
Unfortunately that's not enough. It seems that something in libvte / Cairo / Pango / FreeType makes a rounding error somewhere if the EM Space is not evenly divisible by the font height in pixels. Even with LineGap=0, the line space libvte calculates for the 6x13 font ends up as 14 pixels. Setting the EM Space to 1300 units and adjusting the ascender and descender to multiples of 1300/13=100 seems to avoid this error and and the 6x13 font will finally be displayed using a 13 pixel line height.
I've put a .otb file with a 6x13 font using those values on github and with this font file an umodified libvte will actually render it as 6x13 too, instead of 6x14 as before.
https://github.com/wingel/snippets/tree/master/fonts
It seems that most 6x13 files in TrueType format (.otb extension) out there have been converted using a tool that defaults to setting "EM Space" to 1000 units and both "Line Gap" fields to 90 units. With a 13 pixel tall font that means that the actual line height requested by the font is 13+13*90/1000 = 14.17 pixels. Editing the font and setting the LineGap field to 0 should fix this.
Unfortunately that's not enough. It seems that something in libvte / Cairo / Pango / FreeType makes a rounding error somewhere if the EM Space is not evenly divisible by the font height in pixels. Even with LineGap=0, the line space libvte calculates for the 6x13 font ends up as 14 pixels. Setting the EM Space to 1300 units and adjusting the ascender and descender to multiples of 1300/13=100 seems to avoid this error and and the 6x13 font will finally be displayed using a 13 pixel line height.
I've put a .otb file with a 6x13 font using those values on github and with this font file an umodified libvte will actually render it as 6x13 too, instead of 6x14 as before.
https://github.com/wingel/snippets/tree/master/fonts
Statistics: Posted by wingel — 2023-12-27 22:10