[Webkit-unassigned] [Bug 209591] [HarfBuzz] Not all CSS font features are applied
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 26 04:54:33 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=209591
Adrian Perez <aperez at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aperez at igalia.com
Attachment #394590|review? |review-, commit-queue-
Flags| |
--- Comment #2 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 394590
--> https://bugs.webkit.org/attachment.cgi?id=394590
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=394590&action=review
Logic looks good. There is one thing that I find hard to believe that it would
be working, please check below ⬇️
> Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:570
> + char buffer[5];
If it was me, I would probably have done instead:
const auto& tag = fontFaceFeature.tag();
const char buffer[] = { tag[0], tag[1], tag[2], tag[3], '\0' };
FcPatternAddString(resultPattern.get(), FC_FONT_FEATURES, reinterpret_cast<const FcChar*>(buffer));
But in the end both are equivalent, so no big deal ️
> Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:577
> + FcPatternAddString(resultPattern.get(), FC_FONT_FEATURES, reinterpret_cast<const FcChar8*>(&buffer));
Due to array-to-pointer decay with “&buffer” jere you are passing a “char**”
so I do not know how this can possibly work correctly. We need to plainly
pass “buffer” here.
Using “FcPatternAddString(..., buffer)” might render the cast as unneeded,
too (I don't remember whether “FcChar8” is exactly the same as “char”, though).
> Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:94
> + FcPatternAddString(pattern.get(), FC_FONT_FEATURES, reinterpret_cast<const FcChar8*>(&buffer));
Same here.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200326/b989a563/attachment.htm>
More information about the webkit-unassigned
mailing list