vercel / geist-font

https://vercel.com/font
SIL Open Font License 1.1
2.13k stars 54 forks source link

Geist Mono not recognised as 'Fixed Width' on macOS #33

Open brzzdev opened 8 months ago

brzzdev commented 8 months ago

Font Name: Geist Mono

Steps to Reproduce:

  1. Install .otf files on macOS
  2. Filter Font Book by fixed width fonts
  3. Geist Mono is not listed

Expected Behavior: Geist Mono should be listed here as it is a monospaced font

Environment (please complete the following information):

walnutjon commented 8 months ago

Also in Windows 11 (22H2). Installed from the geist-mono zip file.

Screenshot 2023-11-01 172122

wayne-shih commented 8 months ago

This'll be coz not all the metric width is the same (600) -- notably the fractions (1200) and ligatures (1200, 1800, 2400, 3000), even though the fractions and ligatures are multiple of the base 600 they are still different thus the system thinks it's not a mono font.

Would need to tweak all of them to 600.

CleanShot 2023-11-02 at 19 19 53@2x CleanShot 2023-11-02 at 19 20 12@2x

JetBrains is a good implementation example.

Take ~~> as an example, instead of making the metric width 1800 (600*3), the ligature glyph itself retains as 600 and on the contextual ligature on tilde tilde greater it substitutes the 2 tilde with a SPC character (basically an empty glyph) and the asciitilde_asciitilde_greater.liga sits snuggly as the last character space and visually overlaps on top of the previous 2 empty spots.

CleanShot 2023-11-02 at 19 04 45@2x CleanShot 2023-11-02 at 19 08 23@2x

Fractions on the other hand...

Geist Mono fractions are essentially double the width (1200 = 600*2), however these are a single unicode character...

CleanShot 2023-11-02 at 19 12 49@2x

suggest it gets redrawn as a single 600 width character, ie. JetBrains Mono and IBM Plex Mono example :

CleanShot 2023-11-02 at 19 14 46@2x CleanShot 2023-11-02 at 19 45 01@2x

I would also remove the fractions ligature, what's happening here is I am typing 3 characters (ie. 1 / 2) to have it render as 1 character with a 2 character visual width... instead of 3.

CleanShot 2023-11-02 at 19 45 49@2x