googlefonts / spacemono

Original monospace display typeface family
https://fonts.google.com/specimen/Space+Mono
SIL Open Font License 1.1
361 stars 25 forks source link

fi/fl ligature is on by default #4

Open graphicore opened 7 years ago

graphicore commented 7 years ago

I'm just trying spacemono for programming and I like it so far.

However, the fl and fi ligatures are triggered in the liga feature, which is on by default. I have no way to control features in my coding editor.

selection_120

I suggest moving these ligatures to the dlig feature, because for programming I don't want to have these ligatures to show up. The reason to use monospaced fonts in the first place is to be able to compare consecutive lines easily, char by char. E.g. I sometimes want to see if the lines have the same length. Lets say I'm writing a dictionary with keys that are all 4 chars long, think of OpenType feature tags like this:

{
     'liga': [//data]
   , 'dlig': [//data]
   , 'onum': [//data]
   , 'flac': [//data]
}

Putting fl in the liga feature causes confusion for me and removes an easy optical hint whether I got it right or not:

selection_121

Something looks wrong, now I have to spend time to investigate.

graphicore commented 7 years ago

Here's another one, when writing a closing HTML tag, like </title>:

selection_122

I get a south-west arrow.

davelab6 commented 7 years ago

This was reported and closed in https://github.com/googlefonts/spacemono/issues/3

I think it should probably be turned off by default as it comes up regularly

davelab6 commented 7 years ago

I'm just trying spacemono for programming and I like it so far.

It is not intended for such use, btw

davelab6 commented 7 years ago

ah! https://github.com/googlefonts/spacemono/pull/2 addresses it

I think it should probably be turned off by default as it comes up regularly.

Not sure when the next release will be... @graphicore would you like to prep one?

graphicore commented 7 years ago

It is not intended for such use, btw

Aha, ok, I could stop using it for programming, I like it though :-)

@graphicore would you like to prep one?

I'll have a look.

davelab6 commented 6 years ago

Maybe move more ligatures, this one one was suprising

screen shot 2017-07-25 at 19 35 45
alanhogan commented 2 years ago

I checked out https://www.zkcrush.xyz/ recently after it showed up on Hacker News and noticed a bizarre ligature there in the phrase "first and last". It stuck out like a sore thumb in the monospaced font.

CleanShot 2022-06-03 at 21 47 40@2x

I figured this was an error on the part of the website creator somehow, but looking into it, it is a bug in the font. This is trivially seen in the official Google Fonts specimen page.

CleanShot 2022-06-03 at 21 58 33@2x

I don’t know much about font encoding but while I strongly support the inclusion of these symbols for displaying the relevant Unicode codepoints, the ligation feature should not be enabled by default for a monospaced font. So, +1 to the issue

Note: Currently this is happening for Chromium browsers but not Safari

com4 commented 1 year ago

Super hacky because I don't know anything about building fonts, but I used ToxicFrog's Ligaturizer repo to make a build: because the instructions in this repo are broken due to some glyph mismatch.

Comment out all ligatures in ligatures.py (unless you want them...) apply #2 (curl https://patch-diff.githubusercontent.com/raw/googlefonts/spacemono/pull/2.diff | patch -p1) to the spacemono submodule then follow the build instructions or if you prefer, here is my poor man's build: SpaceMonoFixedLigatures.zip

image

This is good enough for me but hopefully someone who knows what they're doing will fork this repo, apply the patch, and give us better builds.