Inspector shows first font family name not English font family name as Rendered Font
Reported by
br...@amazon.com,
Feb 19 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.119 Chrome/64.0.3282.119 Safari/537.36 Steps to reproduce the problem: 1. Load a webpage that uses a @font-face pointing to a font file that contains multiple font family names in it's 'name' table (see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html). Ensure this file defines a non-English family name before the English family name. 2. Open up dev tools. 3. Look at the computed style of one of the text elements styled with the web font. Under "Rendered Fonts", you will see the first family name, not English family name. What is the expected behavior? Dev tools should show the English family name. What went wrong? Dev tools shows the first family name. Did this work before? N/A Chrome version: 64.0.3282.119 Channel: n/a OS Version: Flash Version: This issue was pointed out to me by drott@chromium.org in the comments on https://chromium-review.googlesource.com/c/chromium/src/+/905829/1. Quoting drott@: > From https://drafts.csswg.org/css-fonts/#descdef-src > "For OpenType fonts with multiple localizations of the full font name, the US English version is used (language ID = 0x409 for Windows and language ID = 0 for Macintosh) or the first localization when a US English full font name is not available (the OpenType specification recommends that all fonts minimally include US English names). User agents that also match other full font names, e.g. matching the Dutch name when the current system locale is set to Dutch, are considered non-conformant." I've attached a font file that I've edited to include multiple family names, in the following order: Italian: "Italian family name, first family name in file" English: "ಠ_ಠNoto Monoಠ_ಠ" French: "French family name, last family name in file" You can verify this by dumping the font info with sfntly: $ ant /path/to/sfntly # build sfntly $ java -jar /path/to/sfntly/java/dist/tools/fontinfo/fontinfo.jar -a /path/to/font/NotoMono-Regular.ttf # see FontFamilyName entries in output. Attachments: (a) A HTML page that uses this font file. (b) The modified .ttf file that includes the three font family names. (c) A python script you can use to serve the files locally with CORS permissions. To test, put the .html and .ttf file in the same directory. Then, cd to that directory and run $ python /path/to/simple-cors-http-server.py 3333 Now, visit localhost:3333/font_face_at-rule.html in the browser, and do steps 2 and 3 from the repro steps above. I've also attached a HTML page that uses this font family. Put both the .ttf file and the .html file in the same directory, then serve them locally. In terms of fixing this issue, I believe the problematic code is here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp?l=231&rcl=a67f7bc4dbf87ba2270c98516871a25fcc303558
,
Feb 20 2018
,
Feb 20 2018
Able to reproduce this issue on reported version 64.0.3282.119, on latest stable 64.0.3282.167 and on latest canary 66.0.3350.0 using steps given in comment#0. Seeing "Italian family name, first family name in file—Network resource(215 glyphs)" instead of English name in computed styles section. This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged. Thanks!
,
Mar 12 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by krajshree@chromium.org
, Feb 20 2018