DejaVu, Liberation Mono, Noto Mono, Tlwg Mono, Oxygen Mono, Bitstream Vera Mono: Combining diacritics out of place

Bug #299158 reported by Yuri Khan
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
fonts-dejavu (Ubuntu)
Confirmed
Undecided
Unassigned
fonts-droid (Ubuntu)
Won't Fix
Undecided
Unassigned
fonts-hack (Ubuntu)
Incomplete
Undecided
Unassigned
fonts-liberation (Ubuntu)
Confirmed
Undecided
Unassigned
fonts-noto (Ubuntu)
Confirmed
Undecided
Unassigned
fonts-tlwg (Ubuntu)
Confirmed
Undecided
Unassigned
fonts-ubuntu (Ubuntu)
Confirmed
Undecided
Unassigned
msttcorefonts (Ubuntu)
Won't Fix
Undecided
Unassigned
oxygen-fonts (Ubuntu)
Confirmed
Undecided
Unassigned
ttf-bitstream-vera (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

In the Liberation Mono font, combining diacritical marks are drawn over the following character rather than the preceding.

According to the Unicode standard since at least version 3.0, chapter 3.6, verse D56, combining characters apply to the preceding base character. However, this font renders them on the following base character.

Version info:
Ubuntu Intrepid
ttf-liberation 1.04~beta2-2

To reproduce:
1. Open gedit.
2. Type the following three code points: U+0061 U+0301 U+0065 (Latin small letter a, Combining acute accent, Latin small letter e).
3. Via Edit|Preferences|Font & Colors|Font, select the Liberation Mono font.

Expected:
* Two grapheme clusters are displayed: Latin small letter a with acute accent, Latin small letter e.

Observed:
* The grapheme clusters displayed are: Latin small letter a, Latin small letter e with acute accent.

Yuri Khan (yurivkhan)
description: updated
Revision history for this message
Anders Kaseorg (andersk) wrote : Re: Liberation Mono, Droid Sans Mono: Combining diacritics out of place

This also affects Droid Sans Mono.

Changed in ttf-liberation (Ubuntu):
status: New → Confirmed
summary: - Liberation Mono: Combining diacritics out of place
+ Liberation Mono, Droid Sans Mono: Combining diacritics out of place
Revision history for this message
Keith Winstein (keithw) wrote :

This bug also affects Courier New and Andale Mono provided by the ttf-mscorefonts-installer package, and DejaVu Mono has other buggy behavior (see http://web.mit.edu/keithw/www/badcombine3.html), so there may be a more general problem with TrueType rendering of Unicode combining characters.

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

I tried with all the mentioned fonts in Ubuntu 10.10 and only Andale Mono shows the behaviour reported. Courier New, Droid Sans Mono and Liberation Mono display the combination as: "a´e", i.e. the accent is not combined with either character.

Revision history for this message
Steve Langasek (vorlon) wrote :

msttcorefonts is under a license that doesn't permit modification.

Changed in msttcorefonts (Ubuntu):
status: New → Won't Fix
Revision history for this message
Pravin-d-s (pravin-d-s) wrote :

While going through this issue. I found though Liberation Mono does not have U+301 character in font. But it still has combined character i.e. aacute U+00E1

harfbuzz-ng and pango-view renders it perfectly. So this should be fixed in gnome-terminal.

$./hb-view /usr/share/fonts/liberation/LiberationMono-Regular.ttf "áe"

$printf ""áe"\n" > out
$ pango-view --font=/usr/share/fonts/liberation/LiberationMono-Regular.ttf out

both this gives me perfect rendering.

Revision history for this message
Yuri Khan (yurivkhan) wrote :

I’m on Ubuntu 13.04, for me, pango-view --font='Liberation Mono' test-diac renders incorrectly (with the acute over e, not a). It’s not only gnome-terminal that is affected — gedit, mousepad, xterm, firefox too.

Precomposed letters with accents are a workaround, but it only works for Latin and Greek letters. For Cyrillic and other scripts, precomposed forms do not exist in Unicode. For consistency, I prefer using combining accents exclusively, and reporting any bugs that arise.

I believe, when a character is absent in a font, pango takes it from another font that does have it. Does this behavior extend to combining diacritics? If so, reproducibility of this bug depends on which other fonts are installed, and which font gets selected to provide the incorrectly positioned combining acute accent as fallback.

How would I go about tracking down that font?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ttf-dejavu (Ubuntu):
status: New → Confirmed
Changed in ttf-droid (Ubuntu):
status: New → Confirmed
Revision history for this message
hakon (hakon-hagland) wrote :

I tested this on Ubuntu 14.10 running gnome-terminal version 3.6.2 (with UTF-8 encoding). I tried producing a captial "I" with strikethrough:

echo -e 'I\U0336'

The following font worked correctly:
 - Ubuntu Mono
 - Courier 10 Pitch
 - Droid Sans Mono
 - Free Mono
 - TlwgMono
 - TlwgTypo
 - Ubuntu Mono

The following fonts displayed the strikethrough incorrectly on the following character:
 - Dejavu Sans Mono
 - Liberation Mono
 - Monospace
 - Nimbus Mono L

See also this question:

http://askubuntu.com/questions/643568/displaying-unicode-strikethrough-in-gnome-terminal

Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

For the Droid fonts, use fonts-noto instead, as it supersedes the earlier Droid project.

affects: ttf-liberation (Ubuntu) → fonts-liberation (Ubuntu)
affects: ttf-dejavu (Ubuntu) → fonts-dejavu (Ubuntu)
affects: ttf-droid (Ubuntu) → fonts-droid (Ubuntu)
Changed in fonts-droid (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :
Revision history for this message
Horst Schirmeier (horst) wrote :

This is still broken in Ubuntu 18.04 bionic. It's notoriously annoying with text or filenames coming from OSX, which keeps diacritics separate from the character they're combined with, also for characters that have a distinct unicode code point for the combined variant.

summary: - Liberation Mono, Droid Sans Mono: Combining diacritics out of place
+ DejaVu, Liberation Mono, Noto Mono, Tlwg Mono, Oxygen Mono, Bitstream
+ Vera Mono: Combining diacritics out of place
Revision history for this message
Horst Schirmeier (horst) wrote :

My test case: echo -e 'a\u0308a'

Correct rendering: äa
(That's what I see with: Courier, Cousine, DejaVu Sans Mono, FreeMono, Hack, Monospace)

Incorrect rendering: aä
(That's what I see with: Andale Mono, Bitstream Vera Sans Mono, Courier 10 Pitch, Courier New, Liberation Mono, Mitra Mono, Nimbus Mono L, Noto Mono, Oxygen Mono, Tlwg Mono, Tlwg Typo, Ubuntu Mono)

Revision history for this message
Horst Schirmeier (horst) wrote :

Correction: "Hack Bold" renders correctly, "Hack Regular" doesn't.

Revision history for this message
Paride Legovini (paride) wrote :

Maintainer of the fonts-hack Debian package here. I can't reproduce the issue with fonts-hack 3.003-3 on Eoan, I get the expected result, i.e.:

* Two grapheme clusters are displayed: Latin small letter a with acute accent, Latin small letter e.

On which Ubuntu release are you observing it?

Changed in fonts-hack (Ubuntu):
status: New → Incomplete
Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

Vera fonts won’t be developed further — see DejaVu

Changed in ttf-bitstream-vera (Ubuntu):
status: New → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fonts-noto (Ubuntu):
status: New → Confirmed
Changed in fonts-tlwg (Ubuntu):
status: New → Confirmed
Changed in fonts-ubuntu (Ubuntu):
status: New → Confirmed
Changed in oxygen-fonts (Ubuntu):
status: New → Confirmed
Revision history for this message
Nate (n8marti) wrote :

This is a problem even at the desktop level. With the gnome desktop font set to the default 'Ubuntu 11' if I use an app (gImageReader in my case, see also https://github.com/manisandro/gImageReader/issues/613) to write certain decomposed characters (e.g. \u0069\u0300), they are not properly combined on the screen. This is a bad user experience. I've switched to 'DejaVu Sans 11' as a workaround, as it seems to handle everything correctly so far. However, the related DejaVu Sans Mono Book still messes this up (e.g. in gnome-terminal and gedit), but on different combined characters. So for monospace needs I've found FreeMono to cover the most ground (pkg: fonts-freefont-ttf). Try this, while switching between the default gnome-terminal font (Ubuntu Mono?) and DejaVu Sans Mono Book:

$ echo -e '\u0069\u0300\u0020\u0254\u0327'
ì ɔ̧

The ì renders correctly while the open o + cedilla doesn't, both here and with the terminal font set to DejaVu Sans Mono Book, but if you switch to the default font in the terminal the open o + cedilla renders correctly while the ì renders with both the dot and the grave accent on top of each other, rather than the dot disappearing like it should.

I would guess that the related font definitions (Ubuntu Regular/Mono, DejaVu Sans Mono, possibly others) are simply incomplete when it comes to these less common character combinations.

font-manager has been very helpful for side-by-side comparisons of sample text in multiple fonts.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.