You are not logged in.
I'm trying to use Chinese characters in my i3 setup, polybar specifically but it's not working. I've found that to use a different font I need to specify it in my polybar config, e.g.
; font-N = <fontconfig pattern>;<vertical offset>
font-0 = "Tamsyn:pixelsize=12;0"
font-1 = "Roboto:size=11:weight=bold;2"
font-2 = "Noto Sans:size=11;1"
label-active-font = 2
What does the last number here mean in each font-N line? ';0' ';2' and ';1'?
I can find what fonts are installed by
fc-list :lang=zh-cn
which outputs many results in the format
/usr/share/fonts/adobe-source-han-serif-cn/SourceHansSerifCN-Regular.otf: Source Han Serif CN, 思源宋体 CN:style=Regular
How am I supposed to use this in the previous format, everytime I do this my polybar disappears
; font-N = <fontconfig pattern>;<vertical offset>
font-0 = "Source Han Serif CN:size=11;0"
label-active-font = 1
Thanks
Offline
The last figure in the font declaration refers to vertical alignment - useful for centring the bar output.
I am also currently struggling with font usage in Polybar - I've only been playing with it for the last 24 hours though!
Offline
It's just a wild guess, but does "Source Han Serif CN" have proper glyphs in ther ASCII range (latin alphabet)?
Try to define more than one font and ensure eg. "Source Sans Pro" is (installed and) among them to complete the code pages.
Online
Does your polybar appear entirely or is it just blank. It might use useful to look at the output polybar produces when it is run from a terminal, errors and warnings will appear there.
seth is right, you will need to define multiple fonts, especially one that provides regular ascii characters if you want them to also appear on the bar.
Please also read Debugging Font Issues
Offline