[DejaVu-bugs] [Bug 26941] stacked diacritics cause bizarre overstrikes in Sans Mono

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon May 24 10:18:28 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=26941

--- Comment #5 from Ben Laenen <bl.bugs at gmail.com> 2010-05-24 10:18:28 PDT ---
(In reply to comment #4)
> (The following text should be rendered using DejaVu Sans Mono to be viewed
> correctly)

small note first: what I see on my screen is different from what you see, so
it's best to attach a screenshot or describe what you see.

Renderers can have problems with combining diacritics in a monospaced font.
Sometimes they're not smart enough, and sometimes they think they are smart.

In a monospaced font the glyphs of the combining diacritics need to have the
same width as normal glyphs, or it wouldn't be recognized as a monospaced font.
To handle them correctly, there are two things happening: anchor placement is
used to put the diacritic at the correct location above the letter. Then, the
space that was added by the diacritic is removed again with another opentype
feature.

Renderers may fail to do one or both of these, resulting in extra spaces or the
diacritic above the wrong letter. Or, what also happens is that the renderer
automatically renders combining diacritics as zero-width, but doesn't disable
the space removal that's done by the font. So actually two spaces are removed,
resulting in the letter typed before and after the diacritic overlapping.


> For example the sequence: x006f x0302 x0069 (o^i) renders correctly as ôi but
> x0254 x0302 x0069  (ɔ^i) does not: ɔ̂i

This can be the renderer automatically substituting composed glyphs with
precomposed ones (the two are equivalent so it may do that), so if that
happens, it's just two letters for the renderer and it can't go wrong.

> likewise x006f x030E x0069 (o"i) does not work properly: o̎I.
> 
> We found that putting any type of space after the combining character was a
> workaround. So for instance x006f x030E x0020 x0069  (o" i)does work: o̎ i

So I assume that without the space the two letters are overlapping on your
screen? Then it's your renderer doing things it shouldn't (making the diacritic
with zero width together with applying the space remove defined in the font).
For many fonts this would work, because they lack anchors and/or the space
removal rule.

If the renderer you are using would just apply the OpenType features and
nothing more, it would work.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the DejaVu-bugs mailing list