Embedded “Roboto Mono” font is really “Roboto Mono Bold” #265

issue ghost openend this issue on April 2, 2021
  1. ghost commented at 4:12 am on April 2, 2021: none

    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:

     0diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
     1index e6b948834..2be4e7ae5 100644
     2--- a/src/qt/optionsdialog.cpp
     3+++ b/src/qt/optionsdialog.cpp
     4@@ -146,13 +146,11 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
     5 
     6     QFont embedded_font{GUIUtil::fixedPitchFont(true)};
     7     ui->embeddedFont_radioButton->setText(ui->embeddedFont_radioButton->text().arg(QFontInfo(embedded_font).family()));
     8-    embedded_font.setWeight(QFont::Bold);
     9     ui->embeddedFont_label_1->setFont(embedded_font);
    10     ui->embeddedFont_label_9->setFont(embedded_font);
    11 
    12     QFont system_font{GUIUtil::fixedPitchFont(false)};
    13     ui->systemFont_radioButton->setText(ui->systemFont_radioButton->text().arg(QFontInfo(system_font).family()));
    14-    system_font.setWeight(QFont::Bold);
    15     ui->systemFont_label_1->setFont(system_font);
    16     ui->systemFont_label_9->setFont(system_font);
    17     // 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.

  2. hebasto commented at 4:22 am on April 2, 2021: member

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

    That is right.

  3. hebasto commented at 4:25 am on April 2, 2021: member

    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.

  4. hebasto commented at 4:27 am on April 2, 2021: member

    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.

  5. hebasto commented at 4:30 am on April 2, 2021: member

    … 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?

  6. hebasto added the label Design on Apr 2, 2021
  7. ghost commented at 5:34 am on April 2, 2021: none

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

  8. hebasto commented at 5:46 am on April 2, 2021: member

    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

    0             <widget class="QLabel" name="labelWatchPending">
    1              <property name="font">
    2               <font>
    3                <family>Monospace</family>
    4                <weight>75</weight>
    5                <bold>true</bold>
    6               </font>
    7              </property>
    

    in src/qt/forms/overviewpage.ui

  9. ghost commented at 7:15 am on April 2, 2021: none
    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.


ghost hebasto

Labels
Design


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me