-
Notifications
You must be signed in to change notification settings - Fork 276
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
Embed monospaced font #79
Conversation
Many thanks to @GBKS ! |
Before and after screenshots on various OS's would be nice. I'm generally not a fan of messing with the default font choices of operating systems / desktop environments. However, if upstream QT doesn't use a proper monospaced font for macOS, then it makes sense for at least that platform. |
Just for record: another PR that embeds a font is bitcoin/bitcoin#16883. |
There have been concerns about OFL Licensing in the past... bitcoin/bitcoin#17311 (comment) bitcoin/bitcoin#17311 (comment) But if OFL isn't an issue - then fonts-liberation is a good candidate as well because |
Looking for Concept (N)ACKs (plus comments if you have them) from designers cc @GBKS @Bosch-0 @johnsBeharry |
Concept ACK Though using Roboto Mono would be a better alternative:
|
About font sizes:
|
It appears that Qt (at least 5.12.8) cannot work with variable fonts. |
Ahh that's a shame, not a huge issue though, as the mono font is only going to be used in a few places the benefits of using a variable font is negligible. The static medium Roboto Mono font style should be all we need to use. I think the licensing issue with OFL still makes Roboto Mono a more suitable option than IBM Plex Mono. |
Done.
This is under discussion now in Bitcoin Design Community (https://github.com/BitcoinDesign, https://bitcoindesign.slack.com). Please join the discussion :) |
Concept NACK to overriding the platform. If users don't like their platform's font choices, they should change it there. Also concept NACK to moving discussion to a private proprietary platform. |
I agree with @luke-jr that the bitcoin design community should not require Core contributors to join Slack in order to debate changes to the Core GUI (although developers are more than welcome to join the conversation there!). I think it is fine if there is discussion on Slack or video calls or any medium, but for any kind of formal proposal or discussion or debate, it should occur on GitHub as that is the existing process for the project. |
Just my two cents for the screenshot in the OP: Using monospace for the balance numbers seems like a weird workaround (weird because you have two different fonts for the same line of information, the label in the normal UI font and then the number & unit in the monospace one). It would be much nicer to use a non-monospace font throughout that supports tabular figures (see https://www.fonts.com/content/learning/fontology/level-3/numbers/proportional-vs-tabular-figures). Or doesn't that work in Qt? |
Thanks! TIL. I didn't know about "tabular figures". |
@hebasto - The Roboto Family is an excellent choice as an embedded font (imo). Keep in mind - fonts do pose a security issue. In essence - embedding fonts explicitly enhances determinism. |
Being a financial application the Bitcoin Core requires a monospaced/fixed-pitch font (or, at least, tabular figures font). The Qt's font matching algorithm does not guarantee that:
A agree that user's ability to customize fonts is good. The question is how users could customize the monospaced font for Qt application now? I'm not aware of such possibilities on Windows 10 and macOS 11.1. On Linux I used the If there are no ways to customize the monospaced font for Qt application, are you going to insist on your point? |
Agree. Despite really disliking it on a conceptual level, I think 'ship your own fonts' is the modern way. The less assumptions we have to make about the operating system, platform, and what is already installed, the better. (That is, for the distributed binaries. When building from source you can do whatever you like.) |
If this is purely a design choice (there are no negative side effects to this change) I'm happy to leave to the designers. If the designers are a Concept ACK I'm a Concept ACK. |
Code review and license review ACK 3fdd5b6
I think we have to replace all fixed-width fonts with this one, not just the overview page (not necessarily in thie PR ofcourse). |
Concept ACK 3fdd5b6 - please add the license attribution |
We already have functional workarounds for these.
That's desirable and expected behaviour.
Crazy. It looks like Windows 10 removed the ability for users to configure their fonts. But that's a Windows problem, not necessarily ours... I'm not surprised Apple denies users choice. Note that your suggestions here do NOT restore user choice, but instead make it even harder for them to configure it!
It's right there in System Settings for me, as a "Fixed width" font choice. |
Setting the "Monospace" font family in a `*.ui` file does not work on macOS, at least on Big Sur with Qt 5.15 (neither via the "font" property nor via the "styleSheet" property). Qt chooses the ".AppleSystemUIFont" instead of ".AppleSystemUIFontMonospaced". This change makes macOS choose the correct monospaced font.
Updated 3fdd5b6 -> 67f2631 (pr79.02 -> pr79.04):
|
That seems like a reasonable compromise. Can you also not add the font to the repo, make it optional at build time (perhaps configurable?), and bundle it via depends? |
What reasons do you see for that? |
So that people who don't want this can build without it... |
Tested ACK 67f2631 The option in the configuration dialog is really nicely done. A configure option to build without internal fonts can be added later. IMO adding the font to the repository itself is fine. It's only 87kB, not worth the overhead of an external depends download. |
I suppose your system is not macOS, right? |
19d51a2 qt: Avoid unnecessary translations (Hennadii Stepanov) Pull request description: Working on translation, I found these translations introduced in #79, that are unnecessary (assuming the universal nature of the "BTC" string). ACKs for top commit: jarolrod: ACK 19d51a2 Tree-SHA512: b45551a54a323c5ba3779f4c1d7c8e7ec4d19a2e95fe70153f48234393bf1449a08e6bd24519ec035ebd4a98080a56af45e7a21546b47152e493b8e1b8f4345e
Qt does not guarantee that the actual applied font matches to the requested one.
It was noted (bitcoin/bitcoin#16432 (comment)):
... because it is not monospaced.
Also some discrepancies I've noted on Windows while testing Qt 5.15 (#19716).
Of course, we could check the actual font with
QFontInfo
, and try to choose another font.But this PR suggests to just embed a monospaced font, and get the GUI look (partially) independent from a platform.
Roboto Mono was chosen after discussion with Bitcoin Design community, and due to its Apache License, Version 2.0.
Changes are scoped to the Overview page only.
Screenshots on macOS 10.15.6 (images are simulated by code patching):
master (ca30d34)
this PR (3fdd5b6)
More screenshots added after #79 (comment):