wrong character width with Ubuntu Mono and replacement fonts in gnome-terminal: whose fault is it?

Asked by christian geier

I'm using Ubuntu Mono in gnome-terminal. When displaying some unicode (non ascii) characters that are not in Ubuntu Mono and a fallback font is used, the spacing between the glyphs is wrong (too small). The fallback characters are double width, but the next character is display after a single width, leading into overlapping characters.

If I see this correctly, gnome-terminal is using libvte which is using pango to render text. I therefore checked how pango renders this with `pango-view --font="Ubuntu Mono 32" --markup --text='<span fallback="true">xxxxxxxxxxxxxxxxxxxxxxxxx&#13A▷C✚D⚑F↓G↑H..I☺J</span>'` and `pango-view --font="Ubuntu Mono 32" --markup --text='<span fallback="true">xxxxxxxxxxxxxxxxxxxxxxxxx&#13A▷C✚D⚑F↓G↑H..I☺J</span>'` . In both cases double with characters or "replacement boxes" are displayed and no overlapping occurs.

If I use the "monospace" font, no overlapping occurs in gnome-terminal.

Whose fault is this and how can it be fixed?

I'm on Ubuntu 14.04.4 LTS, gnome-terminal's version is 3.6.2-0ubuntu1, tf-ubuntu-font-family 0.80-0ubuntu6 and everything is up to date.

I can upload some screenshots if this helps.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
christian geier (ubuntu-hwbqs6t) said :
#1

see here for examples: http://imgur.com/a/NyT4U

from top to bottom:

1. overlap in gnome-terminal
2. pango-view with fallback
3. pango-view without fallback

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#2

I suggest you report a bug

Revision history for this message
christian geier (ubuntu-hwbqs6t) said :
#3

Thanks actionparsnip, that solved my question.