Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual font height is 15, not 16 #24

Open
isral opened this issue May 9, 2020 · 8 comments
Open

Visual font height is 15, not 16 #24

isral opened this issue May 9, 2020 · 8 comments

Comments

@isral
Copy link

isral commented May 9, 2020

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
Copy link
Contributor

mikejzx commented Apr 12, 2021

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
Copy link
Contributor

@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
Copy link
Author

isral commented Apr 12, 2021

image

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

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

@kika
Copy link
Owner

kika commented Apr 13, 2021

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

image

@isral
Copy link
Author

isral commented Apr 13, 2021

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
Copy link
Owner

kika commented Apr 13, 2021

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
Copy link
Owner

kika commented Apr 14, 2021

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
Copy link
Contributor

jengelh commented Dec 8, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants