kika / fixedsys

Fixedsys Excelsior font with programming ligatures
982 stars 50 forks source link

Visual font height is 15, not 16 #24

Open isral opened 4 years ago

isral commented 4 years ago

I use VS code on Windows 10. I found that block or vertical line is not connected vertically because the height is not full 16px. And I found the height is (120 - -30) / 10 = 15 from line 33591:

    <TTGlyph name="block" xMin="0" yMin="-30" xMax="80" yMax="120">
      <contour>
        <pt x="80" y="-30" on="1"/>
        <pt x="0" y="-30" on="1"/>
        <pt x="0" y="120" on="1"/>
        <pt x="80" y="120" on="1"/>
      </contour>
      <instructions><assembly>
        </assembly></instructions>
    </TTGlyph>

README.md said "8x16 font".

mikejzx commented 3 years ago

I think that this might be intentional. See the two screenshots below:

image

image

The second is a modified version of the font, with a larger vertical line. I personally think it looks a little out-of-place and too large

Here's the patch file of my changes if you'd like to try it out:

diff --git a/FSEX.ttx b/FSEX.ttx
index 4253408..8fce78b 100644
--- a/FSEX.ttx
+++ b/FSEX.ttx
@@ -33437,12 +33437,12 @@
         </assembly></instructions>
     </TTGlyph>

-    <TTGlyph name="bar" xMin="30" yMin="-30" xMax="50" yMax="90">
+    <TTGlyph name="bar" xMin="30" yMin="-30" xMax="50" yMax="130">
       <contour>
         <pt x="50" y="-30" on="1"/>
         <pt x="30" y="-30" on="1"/>
-        <pt x="30" y="90" on="1"/>
-        <pt x="50" y="90" on="1"/>
+        <pt x="30" y="130" on="1"/>
+        <pt x="50" y="130" on="1"/>
       </contour>
       <instructions><assembly>
         </assembly></instructions>
iiiGerardoiii commented 3 years ago

@isral can you post those characters in text? I'm guessing it's "│", but I'm using that character in Sublime Text and Windows Terminal and they're not showing that much spacing. Maybe these programs are using a secondary font to show that character?

Here's Sublime Text on the left, Windows Terminal on the right:

image

isral commented 3 years ago

image

I disabled clear-type so the screenshot doesn't have weird color.

░▒▓█ ░▒▓█ ┌┬┐ ├┼┤ └┴┘

kika commented 3 years ago

If this is U+2502 endpoint you are talking about it renders correctly on my system (MacOS, iTerm2) image

image

isral commented 3 years ago

If this is U+2502 endpoint you are talking about it renders correctly on my system (MacOS, iTerm2) image

17px on your screenshot, overlapped 1px

kika commented 3 years ago

This is some iTerm trickery, I guess. Look at the vertical bar, it actually goes onto the space of the next text row (the green block in the dashed selection rectangle is part of the letter on the next row). But this pixel is dimmed.

The non-solid blocks are indeed short by one pixel on the top

image

kika commented 3 years ago

Same characters in MacOS Terminal with line spacing 0.935: image

Line spacing: 1 (default) image

And the blocks are okay in both cases. Anyone understands what's going on here?

jengelh commented 2 years ago

Anyone understands what's going on here?

gly2599

Like the initial comment said, the glyph (e.g. U+2599 of the somewhat older v3.02.9) is really just 150 units tall, and the font info specifies an em size of 160 (of which 130 are ascent).