-
Notifications
You must be signed in to change notification settings - Fork 171
Set an explicit default font on macOS #1960
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
Conversation
|
Let's CC some macOS users who may not follow this repository or the macOS label |
|
@bmjcode @fedelibre |
|
Thanks @JunTamura1959. Any other Mac users have a strong preference either way? |
|
Why not SF Pro? It is the default system font on all Apple platforms. |
|
@inkandpaper-app I assume that this is referring to the font for the source code editor, not the main UI font. I don’t know about you, but I wouldn’t want SF Pro as the default source code font. https://developer.apple.com/fonts/ implies that SF Mono is the current default in Xcode, so that seems like a good choice. I think Menlo used to be Xcode’s default. |
|
@inkandpaper-app @marnen Yes, I meant the editor font. From what I've read Apple used Monaco, then Menlo, then SF Mono. I'm not a regular Mac user myself, so I don't know offhand which macOS versions we support or which versions used which fonts. I guess we could default to SF Mono and use QFont substitutions to fall back on the older fonts if needed. |
That sounds like what I remember seeing on my Mac. I don’t tend to use the default font in my text editors in any case, but I do think we should have a sane default. |
|
For some reason, I cannot find "SF Mono" in the font pull-down menu in Frescobaldi. "Monaco" and "Menlo" are there. The default editor font in my Xcode is set to "SF Mono." |
This adds standard logic in app.py to select an appropriate default editor font for each platform (generally that used by the system text editor: Notepad on Windows, TextEdit on macOS, etc.). My original intention was simply to provide a sane default for macOS, but since this is used in multiple places I thought a more robust implementation would benefit all platforms.
96925ca to
283f51a
Compare
|
The rewritten version I just pushed defaults to SF Mono on macOS, falling back on the older fonts if that one is unavailable. The fallback logic is technically cross-platform, though in practice Windows and Linux don't currently need it since all versions that can run Frescobaldi provide our first-choice fonts. |
|
I always use Menlo on my Macs, in Terminal and BBEdit for example. IIRW, it replaced Monaco at the time. |
fedelibre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can test on Linux only, but I've checked that this doesn't break anything.
|
Well, if there is a problem I'm sure we'll hear about it. 😁 |
When I had a chance to briefly test Frescobaldi on a Mac, I noticed the editor font defaulted to the system sans-serif font. This PR explicitly sets a monospace default font on macOS to match the behavior on other platforms.
Do any of our Mac users have a preference for which font? I assume Monaco is the safest choice since it's been in every macOS version, but it looks like Apple favors other fonts in recent OS versions.