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

Embedded "Roboto Mono" font is really "Roboto Mono Bold" #265

Open
ghost opened this issue Apr 2, 2021 · 7 comments
Open

Embedded "Roboto Mono" font is really "Roboto Mono Bold" #265

ghost opened this issue Apr 2, 2021 · 7 comments
Labels

Comments

@ghost
Copy link

ghost commented Apr 2, 2021

It seems that the embedded monospace font "Roboto Mono" that was merged in #79 is really "Roboto Mono Bold".

I was confused why the embedded monospace font looks so bold (see screenshot in #261 (comment)), while both the embedded and the system monospace font looked nearly the same in the
configuration->display->Monospaced font selection menu preview:
bildschirmfoto
Then I saw in the code that in the selection menu preview both fonts are set to "bold". When disabling that with the following diff:

diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index e6b948834..2be4e7ae5 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -146,13 +146,11 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
 
     QFont embedded_font{GUIUtil::fixedPitchFont(true)};
     ui->embeddedFont_radioButton->setText(ui->embeddedFont_radioButton->text().arg(QFontInfo(embedded_font).family()));
-    embedded_font.setWeight(QFont::Bold);
     ui->embeddedFont_label_1->setFont(embedded_font);
     ui->embeddedFont_label_9->setFont(embedded_font);
 
     QFont system_font{GUIUtil::fixedPitchFont(false)};
     ui->systemFont_radioButton->setText(ui->systemFont_radioButton->text().arg(QFontInfo(system_font).family()));
-    system_font.setWeight(QFont::Bold);
     ui->systemFont_label_1->setFont(system_font);
     ui->systemFont_label_9->setFont(system_font);
     // Checking the embeddedFont_radioButton automatically unchecks the systemFont_radioButton.

it looks like so:
bildschirmfoto2

So the "Roboto Mono" font looks the same as the "Roboto Mono" font set to bold, I guess because the font is in fact already bold.
Only the system font is now displayed normally.
That matches that the embedded font file is named src/qt/res/fonts/RobotoMono-Bold.ttf

I am wondering why the word "bold" does not occur in the conversation of #79.

I would suggest to apply the above diff to remove the setting of the embedded and the system font to bold in the comparison preview, so they can really be compared, and also rename the label in the font selection menu from embedded "Roboto Mono" to embedded "Roboto Mono Bold".

This is really confusing, and I am wondering why macOS seems to need a bold font as "normal" font.

@hebasto
Copy link
Member

hebasto commented Apr 2, 2021

It seems that the embedded monospace font "Roboto Mono" that was merged in #79 is really "Roboto Mono Bold".

That is right.

@hebasto
Copy link
Member

hebasto commented Apr 2, 2021

I am wondering why the word "bold" does not occur in the conversation of #79.

Code change in #79 is obviously clear about "bold" font adding.

@hebasto
Copy link
Member

hebasto commented Apr 2, 2021

I would suggest to apply the above diff to remove the setting of the embedded and the system font to bold in the comparison preview, so they can really be compared, and also rename the label in the font selection menu from embedded "Roboto Mono" to embedded "Roboto Mono Bold".

This font comparison is intended for the Overview tab, as it is specified in its name.

@hebasto
Copy link
Member

hebasto commented Apr 2, 2021

... I am wondering why macOS seems to need a bold font as "normal" font.

Sorry, not sure if I understand your question in a right way. Mind re-wording it please?

Maybe this commit description could be useful?

@hebasto hebasto added the Design label Apr 2, 2021
@ghost
Copy link
Author

ghost commented Apr 2, 2021

... I am wondering why macOS seems to need a bold font as "normal" font.

Sorry, not sure if I understand your question in a right way. Mind re-wording it please?

Maybe this commit description could be useful?

The commit description says "This change makes macOS choose the correct monospaced font.", since the selected font was according to the conversations initial posting "not monospaced" (but not because it was not bold). But the change makes macOS not only choose a monospace font, but a monospaced bold font, as I understand. So, it seems to me like that there where two things changed with the change: 1. choose monospace font 2. use bold version of that font. I do not know, if that font shall be recognized as bold or not.

@hebasto
Copy link
Member

hebasto commented Apr 2, 2021

But the change makes macOS not only choose a monospace font, but a monospaced bold font, as I understand. So, it seems to me like that there where two things changed with the change: 1. choose monospace font 2. use bold version of that font. I do not know, if that font shall be recognized as bold or not.

There is no latter change as before #79 there were many code like that

             <widget class="QLabel" name="labelWatchPending">
              <property name="font">
               <font>
                <family>Monospace</family>
                <weight>75</weight>
                <bold>true</bold>
               </font>
              </property>

in src/qt/forms/overviewpage.ui

@ghost
Copy link
Author

ghost commented Apr 2, 2021

If monospaced bold font would be meant, I suggested to rename e.g. src/qt/guiutil.cpp: QFont fixedPitchFont(bool use_embedded_font) to QFont fixedPitchBoldFont(bool use_embedded_bold_font) etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant