Sublime Forum

Can not apply condensed font for theme ui with 3143

#1

As the title, after upgrading, I can not apply condensed font like Roboto Condensed for theme ui - status bar,… Is it intended?

0 Likes

#2

What platform? Are any messages printed to the console?

0 Likes

#3

Windows 7 64bit. There was no message for it.
It works only with “theme_font_option” : [“gdi”]

In case of main editor window, it works with “directwrite” font option with the following message. “Font face Roboto Condensed is not monospace, disabling bold and italic to prevent text reflow”

0 Likes

#4

Sometimes the different font engines on Windows are picky about what font names you can use. Perhaps try “Roboto Condensed Regular”? The theme font rendering on Windows uses DirectWrite via Skia to allow for text clipping, unless you specify “gdi”, in which case it uses GDI. It may be that the Skia font loader is loading the font based on different font metadata. Unfortunately I’ve found that open type fonts have like 4 different places the family, face and weight names are specified.

0 Likes

#5

I’m using a modified version of Adaptive on Fedora 26. Here’s an excerpt:

{
    "class": "label_control",
    "parents": [{"class": "status_bar"}],
    "fg": ["background", 255, 255, 255, 0.7],
    "font.size": 11,
    "font.face": "Roboto Condensed",
    "shadow_color": [0, 0, 0, 0.18],
    "shadow_offset": [0, 1]
},

This works for me,

0 Likes

#6

Linux (and Mac) have more sane options for font rendering and clipping. Unfortunately on Windows we have to use Skia to get clipping with DirectWrite, since the DirectWrite->GDI layer doesn’t support that.

0 Likes