commit-mono
commit-mono copied to clipboard
Commit Mono not listed as “Fixed Width” in macOS "Font Book.app"
In macOS’s Font Book app, if you look in the Fixed Width collection, Commit Mono is not listed. Is the fact that Commit Mono is monospace a missing piece of metadata? (I don't know anything about how font files work or what information they store about themselves, but other monospace fonts I've installed have correctly ended up in the Fixed Width collection.)
I will have a look to see if I can fix this, seems pretty crucial.
Same on Windows 10.
I think I've found the source of the issue. When exporting the font using opentype.js the value 'isFixedPitch' fromt the 'post' table seems to get lost. This value seems to be the indicator of font being monospaced. The default value is 0 and that overrides the 1 that I otherwise put. I've filed an issue in the opentype.js repository, hopefully a new version can fix this problem so the font can be exported with the correct category.
I'm facing the same issue on my MacBook. My editor requires me to load a monospaced font but as Commit Mono is not listed as one, I cannot currently use it.
Yes, I am sorry about @gaksaray, hoping to fix it as soon as possible. Meanwhile, if you're willing to use the un-customized version, I've created a version for you that should show up in the fixed-width category correctly: CommitMono-1.134-monospace.zip
Thanks @eigilnikolajsen this works! However, I recall your suggestion from the website to use a weight of 500 in light mode environment (which I prefer). If that's the case, I will still be waiting for customized fonts with a fixed width.
As an additional data point, Windows Terminal doesn't like it either. When choosing the "Font face" in settings, it initially doesn't even show up in the list:
If you choose to "Show all fonts" and then select CommitMono, you get the following warning:
Did some debugging and experimenting and got it to export the correct monospaced font. The released versions of opentype.js doesn't pass in the post table when it creates the blob, so it creates a default post table. The current master has it correctly passed in. I built a script from master and updated commit-mono's download script to use it instead. If anyone wants to use it, can use my fork.
@eigilnikolajsen Don't know how you feel about using non official release version of a opentype.js, so didn't make a PR, but can make one if you're okay with that.
Hey @StreakInTheSky ! Thank you so much for your testing. I'd love if you make a PR, I'm totally fine using a non-official version as long as it works.
I think this might resolve https://github.com/eigilnikolajsen/commit-mono/issues/62 and https://github.com/eigilnikolajsen/commit-mono/issues/10 as well!
Thanks to the help of @StreakInTheSky this should now be resolved in the latest release
I just installed the latest release and it still doesn't appear under Fixed Width in Font Book.
Weird. It's difficult to find info on how Font Book recognises fixed-width fonts. My best guess is that it's the panose numbers. I think those are still an issue on OpenType.js.
FWIW, the newest release can be set as the terminal font on e.g. Windows Terminal without it complaining about not being a fixed width font.
I have found before that some monospaced fonts actually have a few stragglers that are just slightly different width than the rest which prevents it from showing up in that category of macOS's Font Book.app.
I ran the font through the ttx tool.
The file you posted (CommitMono-1.134-monospace.zip) has in hhea table
<numberOfHMetrics value="1"/>
On the other hand, v1.142 has in hhea table
<numberOfHMetrics value="1926"/>
which seems high to me.
Also, in CFF table
<CFF>
<major value="1"/>
<minor value="0"/>
<CFFFont name="CommitMono-Regular">
<version value="Version 1.134"/>
<Copyright value="Copyright 2023 Commit Mono authors \(https://github.com/eigilnikolajsen/commit-mono\)"/>
<FullName value="CommitMono Regular"/>
<FamilyName value="CommitMono"/>
<Weight value="News"/>
<isFixedPitch value="1"/>
is how the one you posted in this thread looks like.
And the latest release shows
<CFF>
<major value="1"/>
<minor value="0"/>
<CFFFont name="CommitMono-Regular">
<version value="Version 1.142"/>
<FullName value="CommitMono Regular"/>
<FamilyName value="CommitMono"/>
<Weight value="Regular"/>
<isFixedPitch value="0"/>
Please note the isFixedPitch. This is a separate entry that is different than the entry in post table.
So opentype.js has a number of issues with Monospaced font support, the post table was just the most obvious. Did a bunch of research a while back since I had no idea how font files worked before this, but it kind of went on the back burner. Should probably create an issue over there.
JetBrains IDEs also doesn't recognise this font as monospaced font. I looked for this font under Proportional category, didn't find it either.
You can try the version with the modifications I described in #75. The changes make it possible to use it with the Windows Console, so maybe they'll work for you too. The files are attached below:
They're based on Commit Mono version 1.142 of 2023-12-09. The weights are 400 (Regular) and 700 (Bold). Hope it's OK with the author to share it like that, if not please feel free to delete. I can also post the .ttx diffs.
I was really excited to try this font - especially with all the great customisations to my liking - but bumped into this issue. Using MacOS + Kitty and Kitty only recognises fixed widths fonts and it's not listed as that in neither Kitty nor Font Book.
@GeographicCone your version worked for me, thanks for providing this!
I was really excited to try this font - especially with all the great customisations to my liking - but bumped into this issue. Using MacOS + Kitty and Kitty only recognises fixed widths fonts and it's not listed as that in neither Kitty nor Font Book.
struggling with same issue :(
I was really excited to try this font - especially with all the great customisations to my liking - but bumped into this issue. Using MacOS + Kitty and Kitty only recognises fixed widths fonts and it's not listed as that in neither Kitty nor Font Book.
struggling with same issue :(
I can also say that the issue persists on macOS Sequoia 15.3.1 with Commit Mono version 1.143. The font is not identified as "Fixed Width". I hope this gets resolved soon.