[webkit] [9] Review request for 8088205: [Mac] WebView renders icons instead of letters on some sites

Arunprasad Rajkumar arunprasad.rajkumar at oracle.com
Mon Oct 3 18:45:16 UTC 2016


Hello Kevin, Phil, Guru

Please review the following fix.

JIRA: https://bugs.openjdk.java.net/browse/JDK-8088205

Webrev: http://cr.openjdk.java.net/~arajkumar/8088205/webrev.00 

Analysis: Some Web Fonts(like Thin.ttf, refer the attachment) doesn’t have valid entry in the TTF Naming Table. Due to missing entry, “CTFontCreateWithName” is not returning correct font reference.

Solution: Use “CGFontCreateWithDataProvider”, it takes font path as a parameter and creates a CGFontRef, then create a CTFontRef using CGFontRef. 
“CGFontCreateWithDataProvider” doesn’t support TTC font type, so use “CTFontCreateWithName” as a fallback if CGFontRef creation fails.

Test - 1: Load http://www.cnet.com with HelloWebView

Test - 2: Try simple fx application present in https://bugs.openjdk.java.net/secure/attachment/62649/CustomFontApp.tar.bz2

Regards,
Arun




More information about the openjfx-dev mailing list