Closed Bug 1391932 Opened 7 years ago Closed 7 years ago

unicode character ► is rendered incorrectly with DirectWrite enabled

Categories

(Core :: Layout: Text and Fonts, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: felix.bau, Unassigned)

References

Details

Attachments

(6 files)

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
https://bugzilla.mozilla.org/show_bug.cgi?id=969504

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

the same workaround has to be applied to fix this
Component: Untriaged → Layout: Text
Product: Firefox → Core
See Also: → 969504
actually it wasn't a video, it was the title of an event that used the char, but still:
https://www.facebook.com/events/1965670553670202/

► 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.
Attached image Thunderbird
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?
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>
Attached image 12px
Attached image 13px
Attached image 14px
Attached image 20px
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.
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. :)
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: