cosmic-term icon indicating copy to clipboard operation
cosmic-term copied to clipboard

Some fonts are not detected by its name

Open Piroro-hs opened this issue 1 year ago • 4 comments

fontconfig

[piroro@pc ~]$ fc-list :mono
/usr/share/fonts/TTF/JetBrainsMono-ExtraBold.ttf: JetBrains Mono,JetBrains Mono ExtraBold:style=ExtraBold,Regular
...
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL
...

cosmic-term

[piroro@pc ~]$ RUST_LOG=cosmic_text=debug,cosmic_term=debug cosmic-term
[2024-01-12T13:45:47Z DEBUG cosmic_text::font::system] Locale: ja-JP
[2024-01-12T13:45:47Z DEBUG cosmic_text::font::system] Parsed 753 font faces in 4ms.
[2024-01-12T13:45:47Z ERROR cosmic_term] 'Cascadia Mono PL' is not in the font list
[2024-01-12T13:45:47Z ERROR cosmic_term] setting font name to 'JetBrains Mono'
...

Piroro-hs avatar Jan 12 '24 13:01 Piroro-hs

Fonts that don't have regular and bold weights with default stretch get filtered out.

On Arch, I tried the package ttf-cascadia-code, and it only gives face info with regular (400) weight for 'Cascadia Mono PL'. However, the package otf-cascadia-code works perfectly.

MoSal avatar Jan 12 '24 16:01 MoSal

[piroro@pc Video]$ fc-list :mono | grep "CascadiaMonoPL.ttf"
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL:style=ExtraLight
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL:style=SemiLight
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL:style=Light
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL:style=Bold
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL:style=SemiBold
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL:style=Regular
/usr/share/fonts/TTF/CascadiaMonoPL.ttf: Cascadia Mono PL

It looks like ttf-cascadia-code is variable font and contains regular and bold weights. Isn't this sufficient? (Sorry if this is noob question)

Piroro-hs avatar Jan 12 '24 18:01 Piroro-hs

Is this bug fixed?

WatchMkr avatar May 25 '24 15:05 WatchMkr

@WatchMkr There is no variable font support in cosmic-text yet. When I did early explorations about this, I quickly hit a bug/limitation in rustybuzz (RazrFalcon/rustybuzz#91). So improved support in rustybuzz is required before this can be revisited.

MoSal avatar May 25 '24 17:05 MoSal