LoginSignup
1
0

More than 5 years have passed since last update.

Polybarの番号によるフォント指定に関する注意点

Posted at

「設定したフォント番号」と「番号によるフォント指定」のズレ

フォント番号設定は0-based indexなのにフォント指定は1-based indexだから注意してね、という話です。

ドキュメントには "*-font = 1 will use font-0" って書かれてます。

具体例を出すと、

~/.config/polybar/config
font-0 = "Fira Code:pixelsize=10;3"
font-1 = "Osaka:pixelsize=14;3"

のフォント番号設定がある時、

~/.config/polybar/config
bar-fill-font = 1
bar-empty-font = 2

のフォント指定では、

  • bar-fill-font -> Fira Code
  • bar-empty-font -> Osaka

になります。

これを間違えて「アイコン表示できない!」って戸惑う人が現れないことを祈ります。現れたらこの記事が参考になってほしい。

まとめ

0-based indexと1-based indexは0オリジンと1オリジンとも呼ばれるらしい

参考

Fonts - jaagr/polybar

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0