alacritty: Can't change default font for Allacritty on Windows

System

OS: Windows Version: alacritty v0.7.2 through v0.8.0-rc5

Logs

Crashes: STDERR, STDOUT Font/Terminal size: alacritty -vv

[DEBUG] [alacritty] Estimated DPR: 1
[2021-05-10 16:24:07.105703900] [DEBUG] [alacritty] Estimated window size: None
[2021-05-10 16:24:07.105703900] [DEBUG] [alacritty] Estimated cell size: 10 x 23
[2021-05-10 16:24:07.214200100] [INFO ] [alacritty] Device pixel ratio: 1
[2021-05-10 16:24:07.217066800] [INFO ] [alacritty] Initializing glyph cache...
[2021-05-10 16:24:07.219021600] [INFO ] [alacritty] ... finished initializing glyph cache in 0.0013792
s
[2021-05-10 16:24:07.219995300] [INFO ] [alacritty] Cell size: 10 x 23
[2021-05-10 16:24:07.219995300] [INFO ] [alacritty] Padding: 0 x 0
[2021-05-10 16:24:07.219995300] [INFO ] [alacritty] Width: 1024, Height: 768
[2021-05-10 16:24:07.240501200] [INFO ] [alacritty] PTY dimensions: 33 x 102
[2021-05-10 16:24:07.247336300] [INFO ] [alacritty] Initialisation complete
[2021-05-10 16:24:07.248312600] [DEBUG] [alacritty_terminal] Term::resize dimensions unchanged
[2021-05-10 16:24:07.248312600] [INFO ] [alacritty] Padding: 0 x 0
[2021-05-10 16:24:07.248312600] [INFO ] [alacritty] Width: 1024, Height: 768

Keyboard and bindings: alacritty --print-events

[2021-05-10 16:33:33.689187200] [INFO ] [alacritty] Device pixel ratio: 1
[2021-05-10 16:33:33.691192100] [INFO ] [alacritty] Initializing glyph cache...
[2021-05-10 16:33:33.693150600] [INFO ] [alacritty] ... finished initializing glyph cache in 0.0012746s
[2021-05-10 16:33:33.693150600] [INFO ] [alacritty] Cell size: 10 x 23
[2021-05-10 16:33:33.702536200] [INFO ] [alacritty] Padding: 0 x 0
[2021-05-10 16:33:33.703513000] [INFO ] [alacritty] Width: 1024, Height: 768
[2021-05-10 16:33:33.724992400] [INFO ] [alacritty] PTY dimensions: 33 x 102
[2021-05-10 16:33:33.732804000] [INFO ] [alacritty] Initialisation complete
[2021-05-10 16:33:33.732804000] [INFO ] [alacritty] glutin event: NewEvents(Init)
[2021-05-10 16:33:33.732804000] [INFO ] [alacritty] glutin event: WindowEvent { window_id: WindowId(WindowId(0x70344)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), input: KeyboardInput { scancode: 28, state: Released, virtual_keycode: Some(Return), modifiers: (empty) }, is_synthetic: true } }
[2021-05-10 16:33:33.733780300] [INFO ] [alacritty] glutin event: WindowEvent { window_id: WindowId(WindowId(0x70344)), event: Focused(true) }
[2021-05-10 16:33:33.733780300] [INFO ] [alacritty] glutin event: WindowEvent { window_id: WindowId(WindowId(0x70344)), event: Resized(PhysicalSize { width: 1024, height: 768 }) }
[2021-05-10 16:33:33.733780300] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65599)), event: Added }
[2021-05-10 16:33:33.734756900] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65597)), event: Added }
[2021-05-10 16:33:33.734756900] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65595)), event: Added }
[2021-05-10 16:33:33.734756900] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65593)), event: Added }
[2021-05-10 16:33:33.734756900] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65609)), event: Added }
[2021-05-10 16:33:33.734756900] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65607)), event: Added }
[2021-05-10 16:33:33.735733400] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65605)), event: Added }
[2021-05-10 16:33:33.735733400] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65605)), event: Key(KeyboardInput { scancode: 28, state: Released, virtual_keycode: Some(Return), modifiers: (empty) }) }
[2021-05-10 16:33:33.735733400] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:33.735733400] [INFO ] [alacritty] glutin event: RedrawRequested(WindowId(WindowId(0x70344)))
[2021-05-10 16:33:33.735733400] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:33.736711200] [INFO ] [alacritty] Padding: 0 x 0
[2021-05-10 16:33:33.736711200] [INFO ] [alacritty] Width: 1024, Height: 768
[2021-05-10 16:33:33.801158600] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2967.9110014s }, requested_resume: None })
[2021-05-10 16:33:33.801158600] [INFO ] [alacritty] glutin event: UserEvent(TerminalEvent(Title(C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)))
[2021-05-10 16:33:33.802135700] [INFO ] [alacritty] glutin event: UserEvent(TerminalEvent(Wakeup))
[2021-05-10 16:33:33.802135700] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:33.802135700] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:33.808971100] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2967.9733936s }, requested_resume: None })
[2021-05-10 16:33:33.808971100] [INFO ] [alacritty] glutin event: UserEvent(TerminalEvent(Wakeup))
[2021-05-10 16:33:33.808971100] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:33.808971100] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:33.916385200] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2967.9801931s }, requested_resume: None })
[2021-05-10 16:33:33.916385200] [INFO ] [alacritty] glutin event: UserEvent(TerminalEvent(Wakeup))
[2021-05-10 16:33:33.917361900] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:33.917361900] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:33.946702200] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2968.0886051s }, requested_resume: None })
[2021-05-10 16:33:33.946702200] [INFO ] [alacritty] glutin event: UserEvent(TerminalEvent(Wakeup))
[2021-05-10 16:33:33.947633500] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:33.947633500] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:33.955506500] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2968.1183492s }, requested_resume: None })
[2021-05-10 16:33:33.955506500] [INFO ] [alacritty] glutin event: UserEvent(TerminalEvent(Wakeup))
[2021-05-10 16:33:33.955506500] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:33.956423500] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:34.736503700] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2968.1266129s }, requested_resume: None })
[2021-05-10 16:33:34.737497800] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65605)), event: Key(KeyboardInput { scancode: 56, state: Pressed, virtual_keycode: Some(LAlt), modifiers: (empty) }) }
[2021-05-10 16:33:34.739490900] [INFO ] [alacritty] glutin event: WindowEvent { window_id: WindowId(WindowId(0x70344)), event: ModifiersChanged(ALT) }
[2021-05-10 16:33:34.740465600] [INFO ] [alacritty] glutin event: WindowEvent { window_id: WindowId(WindowId(0x70344)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), input: KeyboardInput { scancode: 56, state: Pressed, virtual_keycode: Some(LAlt), modifiers: ALT }, is_synthetic: false } }
[2021-05-10 16:33:34.741436300] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:34.742420800] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:34.937825600] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2968.9129587s }, requested_resume: None })
[2021-05-10 16:33:34.939079700] [INFO ] [alacritty] glutin event: DeviceEvent { device_id: DeviceId(DeviceId(65605)), event: Key(KeyboardInput { scancode: 62, state: Pressed, virtual_keycode: Some(F4), modifiers: ALT }) }
[2021-05-10 16:33:34.939079700] [INFO ] [alacritty] glutin event: WindowEvent { window_id: WindowId(WindowId(0x70344)), event: CloseRequested }
[2021-05-10 16:33:34.940061100] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:34.940061100] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:34.940061100] [INFO ] [alacritty] glutin event: NewEvents(WaitCancelled { start: Instant { t: 2969.1103813s }, requested_resume: None })
[2021-05-10 16:33:34.941037400] [INFO ] [alacritty] glutin event: UserEvent(TerminalEvent(Exit))
[2021-05-10 16:33:34.941037400] [INFO ] [alacritty] glutin event: MainEventsCleared
[2021-05-10 16:33:34.941037400] [INFO ] [alacritty] glutin event: RedrawEventsCleared
[2021-05-10 16:33:34.941037400] [INFO ] [alacritty] glutin event: LoopDestroyed

Alacritty does not want to render Hack or the Hack NF (Nerd Font). I’m sure it’s spelled correctly, Windows Terminal has the exact same name for the font face.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 41 (11 by maintainers)

Most upvoted comments

@darthrevan13 Have you tried to get the font name using fc-query fc-query -f '%{family[0]}\n' path to your font I am using JetBrainsMono Nerd font I have this in my alacritty.yml

font:
        normal: 
        family: JetBrainsMono Nerd Font Mono
        style: Regular

alacritty -vvv

[2021-05-10 23:45:33.528325194] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Lcd", lcd_filter: 1 }```

idk, try adding sections one after another, it’s not like this will be an issue in the future and I don’t want to deal with all broken yml configs.

i probably found out the issue in the creator of this issue: https://github.com/alacritty/alacritty/issues/5095#:~:text=%23%20Colors%20(Tomorrow%20Night)%0A%23colors%3A%0A%20%20%23%20Default%20colors%0A%20%20primary%3A%0A%20%20%20%20background%3A%20%270x31363b%27%0A%20%20%20%20foreground%3A%20%270xeff0f1%27 he has uncommented primary color paramter variable but didnt uncomment colors so now font settings think that primary variable is something with font to do and probably fails with rendering the font correcetly.

@darthbanana13

Just an update. The problem seems to have been mostly fixed in with Alacritty 0.10! image But there still is a problem with some glyphs. This is how the Tmux bar (at the bottom) looks in Windows Terminal: image The wierd thing is that when I resize the Tmux window it will sometimes be fixed, and the bottom bar would look correctly for a few seconds then it will revert back to what I posted above.

Thanks @nikeedev, I guess? Though you could have looked at my last response on the issue. Just a note, the same config was also present on my Linux machine @ the time and it didn’t have the same isssue because it’s versioned. Anywho, you raise an interesting point. If issues really would arrise from something like that maybe an alacritty command to print the actually computed config would be very useful for reporting issues on Github?

My current config is this one. Currently this issue on Windows, version 10.0.19044.3570 with alacritty version 0.12.3 seems to be resolved for me. Thanks for the investigation!

I’ve renamed the issue to “Can’t change default font for Allacritty on Windows”. I’ve tried also preinstalled fonts like Courier New and Terminal and they both don’t show up. Very weird. The size value for the font works instantly, but the family value does not.