evilmartians / mono

Free and open-source monospaced font from Evil Martians
SIL Open Font License 1.1
2.16k stars 20 forks source link

Martian Mono isn’t being detected as a monospaced font #16

Closed kalashnikovisme closed 1 year ago

kalashnikovisme commented 1 year ago

User can set only mono fonts in Gnome Terminal on Ubuntu 22.04 by default, and Gnome Terminal does not detect MartianMono as monospace font for some reason.

You can choose MartianMono font as terminal font with this command

dconf write /org/gnome/terminal/legacy/profiles:/:TERMINAL_PROFILE_ID/font  "'<font name> <font size>'"

for example

dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/font  "'MartianMono sWd xLt 12'"

Also, we can see that Font Manager detects MartianMono as proportional, not monospace

Screenshot from 2022-10-23 06-17-18

bitimp commented 1 year ago

If I haven't missed anything, then spacing property is not set in the font. This property must be set to 100. How to check:

fc-scan /<path>/<to>/<font>.ttf

Example:

$ fc-scan /usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf
Pattern has 25 elts (size 32)
        family: "Ubuntu Mono"(s)
        familylang: "en"(s)
        style: "Regular"(s)
        stylelang: "en"(s)
        fullname: "Ubuntu Mono"(s)
        fullnamelang: "en"(s)
        slant: 0(i)(s)
        weight: 80(f)(s)
        width: 100(f)(s)
        spacing: 100(i)(s)
        foundry: "DAMA"(s)
        file: "/usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf"(s)
        index: 0(i)(s)
        outline: True(s)
        scalable: True(s)
        ...

If you run fc-list :spacing=100 fullname spacing then MartianMono will not be in the output.

romashamin commented 1 year ago

The Glyphs app forum topic related to the issue (it’s for me mostly): https://forum.glyphsapp.com/t/isfixedpitch-to-disable-metrics-adjustment

romashamin commented 1 year ago

Related issue: https://github.com/google/fonts/issues/225

romashamin commented 1 year ago

@kalashnikovisme try please these updated fonts, all of them have isFixedPitch = true.

https://github.com/evilmartians/mono/tree/main/fonts

Did it fix the issue?

kalashnikovisme commented 1 year ago

@romashamin sorry for the delay, I missed this comment.

I've tried new files, unfortunately issue still exists :slightly_frowning_face:

kalashnikovisme commented 1 year ago

@romashamin checked one more time with v1.0. Everything is ok now! Thanks!