nelsam/vidar

Incorrect display of characters

Kvaz1r opened this issue · 2 comments

Description

Some symbols are displaying incorrect.

Steps to reproduce

  1. Open file that contains special unicode characters, for example:
    vidar E:\Projects\Github\vidar\navigator\tree_button.go

Expected behavior

...
	{
		expanded:  '▼',
		collapsed: '►',
	},
...

Actual behavior

p2

This is expected. Some fonts have characters for those code points, some don't. The reason for the preferred list is to actually query the font for those code points, and fall back to backups when those code points don't exist in the font.

The code that checks the current font to see if they support those characters (and fall back when they don't) is here

The default font in vidar is coming from here

I have an override set on my system in ~/.config/vidar/settings.toml to choose PTM55F, then fall back to Inconsolata-Regular, and only if neither of those two can be found do I fall back to the gxui default. Here's my settings.toml:

[[fonts]]
  Name = "PTM55F"
  Size = 12

[[fonts]]
  Name = "Inconsolata-Regular"
  Size = 12

You can see that PTM55F displays the arrows correctly in my screenshot:
the screenshot

I'll leave this open because we might want to regenerate the gxfont in gxui (newer versions might have added some unicode characters), but vidar is working correctly in this case.

Right, thanks, now I see. I'll also change font in settings.