Few things to note here, this PR tweaks all the mono glyphs to the same metric width (600) -- thus, system and code editors will recognise Geist Mono as a monospace font.
In doing so, a few things needed to be changed :
Fractions
Previously 1200 wide, this is changed to 600 wide as each are individual unicode glyph rather than a custom ligature
NOTE: It has been redrawn to fit 600 wide ; please review from a stylistic point of view, I'm happy to remove this if you'd like to redraw it differently yourself
Removed frac open type feature. It didn't make sense to include it as the input was 3 characters (ie. 1/2) to result in 1 character (½)
Code ligatures
Previously these were various widths (multiple of 600; ie. 1200, 1800, 2400, 3000), these have all been changed to fixed 600.
To make the code ligature still work, I introduced a SPC glyph -- empty character -- which is used as a filler character to construct the ligature
Disabled liga (standard ligature) feature -- previously auto generated
Added a new calt (contextual alternative) feature -- this replaces the liga and contains all previous instructions but utilising the SPC character. This is the same/similar approach as how JetBrains Mono, Fire Code, et al... uses.
lookup asciitilde_asciitilde_greater.liga {
sub SPC SPC greater' by asciitilde_asciitilde_greater.liga;
sub SPC asciitilde' greater by SPC;
sub asciitilde' asciitilde greater by SPC;
} asciitilde_asciitilde_greater.liga ;
Note
This is a direct export from Glyphs -- not using fontmake or any other undocumented flows you might have in place already
Supporting screenshots
Redrawn fraction glyphs
Now recognised as a monospace by WebStorm
(I didn't test other code editors or systems, would be super surprised if others don't recognise it now as a monospace)
Ligature still works
Actions and next steps
Keen to get some peer (/stress) testing in to see if I'm missed any code ligature pairings and if any ignore sub needed to be added.
Fractions should be viewed from a design perspective.
If all happy, would need to cut a new release -- I didn't do this bit as it's not documented how y'all are exporting the binary font files (either directly from Glyphs or using fontmake or other scripts)
Fixes #33
Rationale and fixes implemented
Few things to note here, this PR tweaks all the mono glyphs to the same metric width (600) -- thus, system and code editors will recognise Geist Mono as a monospace font.
In doing so, a few things needed to be changed :
frac
open type feature. It didn't make sense to include it as the input was 3 characters (ie.1
/
2
) to result in 1 character (½
)SPC
glyph -- empty character -- which is used as a filler character to construct the ligatureliga
(standard ligature) feature -- previously auto generatedcalt
(contextual alternative) feature -- this replaces theliga
and contains all previous instructions but utilising theSPC
character. This is the same/similar approach as how JetBrains Mono, Fire Code, et al... uses.Test export files -- ttf only
8f30371GeistMono.zip
Supporting screenshots
Redrawn fraction glyphs
Now recognised as a monospace by WebStorm (I didn't test other code editors or systems, would be super surprised if others don't recognise it now as a monospace)![CleanShot 2023-11-06 at 21 22 22@2x](https://github.com/vercel/geist-font/assets/51947763/34639840-c418-4ce8-aac8-3eadbce26f0b)
Ligature still works
Actions and next steps
Keen to get some peer (/stress) testing in to see if I'm missed any code ligature pairings and if any ignore sub needed to be added.
Fractions should be viewed from a design perspective.
If all happy, would need to cut a new release -- I didn't do this bit as it's not documented how y'all are exporting the binary font files (either directly from Glyphs or using fontmake or other scripts)