5

For some reason fc-match does not like to match bold fonts:

$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
$ fc-match monospace:bold
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
$ fc-match monospace:weight=200
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"

According to the documentation (https://www.freedesktop.org/software/fontconfig/fontconfig-user.html) bold and weight=200 should be the same, but apparently they are not.

Some applications (especially Java) are using monospace:bold to find the bold monospace font, but they get the normal one which is then artificially emboldened, which looks very ugly.

Edit: This only happens with fontconfig 2.13.0, which is used by Ubuntu 18.10. Earlier and later version used by 18.04 and 19.04 are fine.

3
  • Can you please share the output of fc-list "DejaVu Sans Mono" file family style weight ? Feb 27, 2019 at 15:54
  • 4
    After some deep research I found that this is a bug in fontconfig 2.13.0 which is used by Ubuntu 18.10. Neither 2.12.6 used by 18.04 nor 2.13.1 which is apparently used in the upcoming 19.04 have that bug.
    – Thraidh
    Feb 27, 2019 at 17:30
  • looks like medium is equivalent of 200
    – Anwar
    Apr 28, 2019 at 15:18

1 Answer 1

1

Answer from the questioner in a comment to the question:

After some deep research I found that this is a bug in fontconfig 2.13.0 which is used by Ubuntu 18.10. Neither 2.12.6 used by 18.04 nor 2.13.1 which is apparently used in the upcoming 19.04 have that bug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.