unicode character ► is rendered incorrectly with DirectWrite enabled




Layout: Text
10 months ago
10 months ago


(Reporter: Djfe, Unassigned)


57 Branch

Firefox Tracking Flags

(Not tracked)



(6 attachments)



10 months ago
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170818100226

Steps to reproduce:

used facebook and played a video

Actual results:

it displayed ► (U+25BA) in it's title, which looks weird, when direct write (hardware acceleration) is enabled

Expected results:

This is literally

just for another unicode char (U+25BA instead of U+25B6)

the same workaround has to be applied to fix this


10 months ago
Component: Untriaged → Layout: Text
Product: Firefox → Core
See Also: → bug 969504

Comment 1

10 months ago
actually it wasn't a video, it was the title of an event that used the char, but still:

► Birthday Bash // 2 Floors // Drum and Bass // Dubstep ◄

While you're at it:
U+25C4 is also affected
(In reply to Djfe from comment #0)
> Actual results:
> it displayed ► (U+25BA) in it's title, which looks weird, when direct write
> (hardware acceleration) is enabled

Could you attach a screenshot of the "weird" result you're seeing? Thanks.

Comment 3

10 months ago
Created attachment 8899204 [details]
bad glyph design (requested screenshot)

Comment 4

10 months ago
Created attachment 8899205 [details]

Comment 5

10 months ago
Sure, above's what I'm seeing.
Could you please clarify, is your concern about the irregular rendering of the glyph (particularly the mismatch between the upper and lower slopes of the triangle), or is it that it's a narrow, sharp-pointed triangle rather than a fat equilateral triangle like U+25B6 (▶) usually shows?

Comment 7

10 months ago
my concern is the irregular rendering (it only happens with hardware acceleration enabled) like with U+25B6 before the workaround of https://bugzilla.mozilla.org/show_bug.cgi?id=969504

it's a narrow/sharp-pointed triangle by design, so that isn't a bug and I could always choose U+25B6 instead if I need that
I suspect it's just that the glyph doesn't render very well (poor hinting? maybe dependent on font smoothing settings?) at such a small size.

How does it look at larger sizes? E.g. testcase:

  data:text/html,<span style="font:48px Segoe UI">&%23x25BA; Test &%23x25C4;</span>

Comment 9

10 months ago
Created attachment 8899632 [details]

Comment 10

10 months ago
Created attachment 8899633 [details]

Comment 11

10 months ago
Created attachment 8899634 [details]

Comment 12

10 months ago
Created attachment 8899635 [details]

Comment 13

10 months ago
everything at 12 and below looks dorked.
13, 14 and 15 look a bit rough but the shape is symmetric/ok IMO
I think the issue here is simply that at small sizes, cleartype doesn't do a very nice job with those glyphs. If you go into Control Panel / Fonts / Adjust ClearType text, and disable ClearType, the resulting (grayscale-antialiased) rendering of the glyphs looks more symmetrical, at least on my Windows machine.

As such, this isn't really comparable to bug 969504. In that case, the font actually had incorrect glyph shapes for the characters in question, and so we in effect "mask off" those glyphs so that Gecko won't try to use them, and will try to find a different font instead. We could justify such a hack given that the characters were clearly erroneous.

Here, the font correctly supports these characters with appropriate glyph designs. They don't always render very well at small sizes with certain antialiasing settings, but I don't think that is sufficient reason to add a font-specific hack to Gecko -- for one thing, there's no assurance that some other font we find as a fallback will happen to render tiny narrow triangles any better at such low resolution.

Comment 15

10 months ago
ok, I've got to correct myself

Disabling hardware acceleration, doesn't actually make it look better.

Disabling cleartype (I actually disabled a font smoothing setting and changed two registry entries in addition to the setting you described), makes a difference, but it's very small and the symbol still isn't fully symmetrical, at small font sizes.

Switching from Segoe UI to Segoe UI Symbol, makes it a bit more symmetrical but it still looks kinda ugly.

I'm closing this now, since it doesn't seem fixable and since it doesn't matter much.

Thx a lot for taking your time, looking into this. :)


10 months ago
Last Resolved: 10 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.