alacritty: Cannot change fonts on OpenSuSE Leap

Hi,

I am giving a try to Alacritty on my OpenSuSE Leap 15.1 x64 machine, running KDE / X11. I have tried to change default fonts but it fails… By changing default faults, I mean I only uncomment 2 lines in default config file, which eventually results in :

font:
   normal:
      family: hack

( yes I want to use Hack fonts…)

This what I can see - actually I cannot see anything 😄 - after this only modification : Screenshot_20190624_131318_001

If I keep monospace as default font, everything is running fine : Screenshot_20190624_131450_001

This is what I have with -vv option when everything is going fine (default config) :

Created log file at "/tmp/Alacritty-52120.log"
[2019-06-24 12:55] [INFO] Welcome to Alacritty
[2019-06-24 12:55] [INFO] Configuration loaded from "/home/dhenry/.config/alacritty/alacritty.yml"
[2019-06-24 12:55] [DEBUG] Estimated DPR: 1
[2019-06-24 12:55] [DEBUG] Estimated Cell Size: 9 x 18
[2019-06-24 12:55] [DEBUG] Estimated Dimensions: None
[2019-06-24 12:55] [INFO] Device pixel ratio: 1
[2019-06-24 12:55] [INFO] Initializing glyph cache...
[2019-06-24 12:55] [INFO] ... finished initializing glyph cache in 0.144904798s
[2019-06-24 12:55] [INFO] Width: 1024, Height: 768
[2019-06-24 12:55] [INFO] Cell Size: 9 x 18
[2019-06-24 12:55] [INFO] Padding: 2 x 2
[2019-06-24 12:55] [INFO] PTY Dimensions: Line(42) x Column(113)
[2019-06-24 12:55] [INFO] Initialisation complete
[2019-06-24 12:55] [INFO] Goodbye
Deleted log file at "/tmp/Alacritty-52120.log"

and what I have as soon as I changed default font :

Created log file at "/tmp/Alacritty-52743.log"
[2019-06-24 12:56] [INFO] Welcome to Alacritty
[2019-06-24 12:56] [INFO] Configuration loaded from "/home/dhenry/.config/alacritty/alacritty.yml"
[2019-06-24 12:56] [DEBUG] Estimated DPR: 1
[2019-06-24 12:56] [DEBUG] Estimated Cell Size: 1 x 1
[2019-06-24 12:56] [DEBUG] Estimated Dimensions: None
[2019-06-24 12:56] [INFO] Device pixel ratio: 1
[2019-06-24 12:56] [INFO] Initializing glyph cache...
[2019-06-24 12:56] [INFO] ... finished initializing glyph cache in 1.160412745s
[2019-06-24 12:56] [INFO] Width: 1024, Height: 768
[2019-06-24 12:56] [INFO] Cell Size: 1 x 1
[2019-06-24 12:56] [INFO] Padding: 2 x 2
[2019-06-24 12:56] [INFO] PTY Dimensions: Line(764) x Column(1020)
[2019-06-24 12:56] [INFO] Initialisation complete

Obviously, the problem is with Estimated Cell Size: 1 x 1 ( plus PTY Dimensions: Line(764) x Column(1020)). But no idea how to fix that, neither why it happens, since I am still using default yml file, just changed default fonts.

Actually, I wanted to change default fonts because Alacritty cannot display any Emoji like in Konsole, as illustrated below : Screenshot_20190624_132244_001

Any idea ?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

@kchibisov 👍 Excellent ! Everything fixed now. Many thanks to all of you, guys.

@oblitum What do you mean by “it simply didn’t work”? Displaying color emojis aren’t implemented on Linux yet. You should be able to see your Monoid Nerd Font, but you can’t see emojis from Noto Color Emoji, since it simply doesn’t have a way to display monochromatic ones. Twitter Color Emoji can be rendered in alacritty in monochrome variant though.

If you have troubles with writing fontconfig file I can help you, just give me instructions on what you want to achieve.

@Ra0EL You can try something like this.

<match target="pattern">
 <test name="family" qual="any">
  <string>Hack</string>
 </test>
 <edit name="family" mode="prepend_first">
  <string>Hack</string>
 </edit>
 <edit name="family" mode="prepend_first">
  <string>Noto Color Emoji</string>
 </edit>
</match>