Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit Mono not listed as “Fixed Width” in macOS "Font Book.app" #15

Open
rben01 opened this issue Jul 20, 2023 · 19 comments
Open

Commit Mono not listed as “Fixed Width” in macOS "Font Book.app" #15

rben01 opened this issue Jul 20, 2023 · 19 comments
Labels
Bug Something isn't working

Comments

@rben01
Copy link

rben01 commented Jul 20, 2023

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.)

@eigilnikolajsen
Copy link
Owner

I will have a look to see if I can fix this, seems pretty crucial.

@eigilnikolajsen eigilnikolajsen added the Bug Something isn't working label Jul 20, 2023
@glebd
Copy link

glebd commented Jul 27, 2023

Same on Windows 10.

@eigilnikolajsen
Copy link
Owner

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.

@gaksaray
Copy link

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.

@eigilnikolajsen
Copy link
Owner

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

@gaksaray
Copy link

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.

@DwayneBradley-eaton
Copy link

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:

image

If you choose to "Show all fonts" and then select CommitMono, you get the following warning:

image

@StreakInTheSky
Copy link
Contributor

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.

@eigilnikolajsen
Copy link
Owner

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 #62 and #10 as well!

@eigilnikolajsen
Copy link
Owner

Thanks to the help of @StreakInTheSky this should now be resolved in the latest release

@rossburton
Copy link

I just installed the latest release and it still doesn't appear under Fixed Width in Font Book.

@eigilnikolajsen
Copy link
Owner

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.

@caksoylar
Copy link

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.

@stlee42
Copy link

stlee42 commented Dec 11, 2023

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.

@StreakInTheSky
Copy link
Contributor

StreakInTheSky commented Dec 12, 2023

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.

@shenghui0779
Copy link

shenghui0779 commented Jan 10, 2024

I installed the customed latest release and it still doesn't appear under Fixed Width in Font Book.

@yvvt0379
Copy link

JetBrains IDEs also doesn't recognise this font as monospaced font. I looked for this font under Proportional category, didn't find it either.
image
image

@GeographicCone
Copy link

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.

@pean
Copy link

pean commented Apr 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests