wayst icon indicating copy to clipboard operation
wayst copied to clipboard

Emoji

Open yellowhat opened this issue 4 years ago • 4 comments

Hi, I am noticing very strange artifacts when rendering emoji.

I am using the following config file:

font = "monospace"
font-color = "joypixels"
font-symbol = "joypixels"
font-size=10
dpi=96
no-dynamic-title=true
blink="true:500:1:999"
colorscheme="linux tty"
bg-color="#000000ff"
fg-color="#ffffff"

If I try to display some emoji, this is the wayst --debug-font:

Match result for '-10':
  /usr/share/fonts/liberation-fonts/LiberationSans-Regular.ttf
Match result for '-10:Bold':
  /usr/share/fonts/liberation-fonts/LiberationSans-Bold.ttf
Match result for '-10:Italic':
  /usr/share/fonts/liberation-fonts/LiberationSans-Italic.ttf
Match result for '-10:Bold:Italic':
  /usr/share/fonts/liberation-fonts/LiberationSans-BoldItalic.ttf
Match result for 'monospace-10':
  /usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf
Match result for 'monospace-10:Bold':
  /usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf
Match result for 'monospace-10:Italic':
  /usr/share/fonts/liberation-fonts/LiberationMono-Italic.ttf
Match result for 'monospace-10:Bold:Italic':
  /usr/share/fonts/liberation-fonts/LiberationMono-BoldItalic.ttf
Loaded styled font:
  regular:     /usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf
  bold:        /usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf
  italic:      /usr/share/fonts/liberation-fonts/LiberationMono-Italic.ttf
  bold italic: /usr/share/fonts/liberation-fonts/LiberationMono-BoldItalic.ttf
Match result for 'joypixels-10':
  /usr/share/fonts/joypixels/joypixels-6.0.0.ttf
Loaded unstyled (symbol) font:
  file:     /usr/share/fonts/joypixels/joypixels-6.0.0.ttf
Match result for 'joypixels-10':
  /usr/share/fonts/joypixels/joypixels-6.0.0.ttf
Loaded unstyled (color) font:
  file:     /usr/share/fonts/joypixels/joypixels-6.0.0.ttf
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded

The same emoji in kitty works as expected.

Is my config file wrong?

Thanks

yellowhat avatar Mar 17 '21 18:03 yellowhat

Remove

font-symbol = "joypixels"

The font-symbol option expects a regular, non-color, font (it's meant for mathematical symbols etc.) and has higher priority than font-color. The only difference is that it doesn't look for extra styles.

I should probably combine the three font lists into one with an option to disable specific styles to make it less confusing.

91861 avatar Mar 17 '21 18:03 91861

Thanks for the reply.

I have tried with:

font = "monospace"
font-color = "joypixels"
font-size=10
dpi=96
no-dynamic-title=true
blink="true:500:1:999"
colorscheme="linux tty"
bg-color="#000000ff"
fg-color="#ffffff"

The artifacts are gone, but emoji some wrong or duplicated or missing:

$ wayst --debug-font
Match result for '-10':
  /usr/share/fonts/liberation-fonts/LiberationSans-Regular.ttf
Match result for '-10:Bold':
  /usr/share/fonts/liberation-fonts/LiberationSans-Bold.ttf
Match result for '-10:Italic':
  /usr/share/fonts/liberation-fonts/LiberationSans-Italic.ttf
Match result for '-10:Bold:Italic':
  /usr/share/fonts/liberation-fonts/LiberationSans-BoldItalic.ttf
Match result for 'monospace-10':
  /usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf
Match result for 'monospace-10:Bold':
  /usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf
Match result for 'monospace-10:Italic':
  /usr/share/fonts/liberation-fonts/LiberationMono-Italic.ttf
Match result for 'monospace-10:Bold:Italic':
  /usr/share/fonts/liberation-fonts/LiberationMono-BoldItalic.ttf
Loaded styled font:
  regular:     /usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf
  bold:        /usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf
  italic:      /usr/share/fonts/liberation-fonts/LiberationMono-Italic.ttf
  bold italic: /usr/share/fonts/liberation-fonts/LiberationMono-BoldItalic.ttf
Match result for 'joypixels-10':
  /usr/share/fonts/joypixels/joypixels-6.5.0.ttf
Loaded unstyled (color) font:
  file:     /usr/share/fonts/joypixels/joypixels-6.5.0.ttf
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Missing glyph u+276F
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Combining character limit (2) exceeded
[warning] Missing glyph u+276F

yellowhat avatar Mar 17 '21 20:03 yellowhat

kitty on the left, wayst on the right, showing the same file of emoji

screenshot_2021-03-30_184525

yellowhat avatar Mar 30 '21 17:03 yellowhat

Emoji flags are encoded as a pair of regional indicator symbols that should be joined as a ligature. If ligatures are not supported symbols' glyphs will be displayed.

91861 avatar Apr 01 '21 14:04 91861