Bug 115634 - [FreeType] Wrong font selected when using an English font-family name in css definition
Summary: [FreeType] Wrong font selected when using an English font-family name in css ...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 04:14 PDT by everdom
Modified: 2017-07-11 13:09 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description everdom 2013-05-06 04:14:50 PDT
Recently I have been devoting myself to  development of a browser-like software using webkitgtk on the platform of Ubuntu 13.04 AMD 64 distribution. But I find a fairly inscrutable problem when webkit rending Chinese font. The situation is described below:
    Firstly, The official webkit demo /usr/lib/webkitgtk-3.0-0/libexec/GtkLauncher can't rend the correct font which a webpage assigned by css definition. For example, a webpage assigned the font family as "Microsoft Yahei",but the GtkLauncher just rend Simsun font for all text. I should considered that it is because that I haven't install the MS Yahei font into my system. But after I install it, the problem remains. And in other browsers using webkit like chrome, it always rend the right font, including the Chinese font.
    When I try to solve the problem, I find some tips, but still block. I have noticed a phenomenon: when setting the font family to Chinese name instead of English name in the css definition, it does rend the correct font!. In other words, I just alter the the definition like this:
    some-element{font-family:"Microsoft Yahei"}  ---> some-element{font-family:"微软雅黑"}
    Then it works! And I checked other Chinese font like WenQuanyi font family, it appears the same problem. But generally speaking, you'd better to write in English when set a font-family name attribute . But now the English name don't work, on the contrary, the Chinese name works, it is really confused.
    In addition, I still can't distinguish where the bug exists, is it in webkitgtk or Ubuntu 13.04 system. I have searched the solution for some time on the Internet, and tried some method, but all failed. So I commit this bug to you, expect your reply!
Comment 1 Michael Catanzaro 2017-07-11 13:09:09 PDT
Hi, do you know of any freely-distributable fonts that exhibit this bug? Even better if it's a font that's already commonly available in Linux distributions. I think Timothy might have found the problem in bug #174374, but it's hard to be sure without seeing a small example that demonstrates exactly what's going wrong. It would be really wonderful if you could provide a small HTML testcase.