Summary: | [Harfbuzz] Material icons not rendered correctly when using the web font | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | Platform | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bugs-noreply, mcatanzaro, svillar, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | Gtk, InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2017-09-15 05:31:04 PDT
Created attachment 320891 [details]
Patch
Comment on attachment 320891 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320891&action=review > Source/WebCore/ChangeLog:20 > + are ASCII. We should also consider handling other cases mentioned by the spec like brackets and quotation marks, > + but that belongs to a different bug/commit. r=me if you file a new bug report. > Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp:379 > + if (isASCII(character) && isASCII(previousCharacter)) Why the isASCII check? Did this fix something? Surely that's not going to work for e.g. curly quotation marks. (In reply to Michael Catanzaro from comment #2) > Comment on attachment 320891 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=320891&action=review > > > Source/WebCore/ChangeLog:20 > > + are ASCII. We should also consider handling other cases mentioned by the spec like brackets and quotation marks, > > + but that belongs to a different bug/commit. > > r=me if you file a new bug report. Sure, I will. > > Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp:379 > > + if (isASCII(character) && isASCII(previousCharacter)) > > Why the isASCII check? Did this fix something? Surely that's not going to > work for e.g. curly quotation marks. Just tried to be conservative here. Why do you think curly quotation marks are going to be broken? I mean if this heuristic is extended to more characters besides underscores, like quotation marks, as you indicated needs to be done in the FIXME, then obviously it's not going to work for curly quotes as you have an ASCII check. I don't understand what the ASCII check is for. Why is it relevant that both characters be ASCII? (In reply to Michael Catanzaro from comment #4) > I mean if this heuristic is extended to more characters besides underscores, > like quotation marks, as you indicated needs to be done in the FIXME, then > obviously it's not going to work for curly quotes as you have an ASCII > check. I don't understand what the ASCII check is for. Why is it relevant > that both characters be ASCII? Because if both are ascii it's safer to use the same run, in all other cases we are using a different run, like current code does. Note also, that this check only happens when the next character script is different than the current one and it's Common. The fix is awesome but we should try hard to have test cases for this, otherwise we're going to eventually break it. (In reply to Sergio Villar Senin from comment #6) > The fix is awesome but we should try hard to have test cases for this, > otherwise we're going to eventually break it. I could add the material design icons to wkgtk fonts test repo, and add a test case. I think the license is apache2, I don't know if we can add it to WebKit to make a cross-platform test instead. A good ref test could be to use the font names in the test and the unicode code directly in the reference, since the unicode code always worked, the problem was only with icon names. <i class="material-icons">3d_rotation</i> <- doesn't work <i class="material-icons"></i> <- works Committed r222090: <http://trac.webkit.org/changeset/222090> |