font-family should not match against PostScript font face names
Reported by
valtere....@gmail.com,
Aug 29 2016
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Steps to reproduce the problem: 1. Try to open the html file example on explorer chrome 2. 3. What is the expected behavior? Chrome should render the Text with the font "Akzidenz-Grotesk BQ" What went wrong? Hello together, can you check please where the problem here is: I have a html file with the font Akzidenz-Grotesk BQ created. The font was installed previously correctly. On explorer Mozilla, the html file is displayed with the correct font, but on explorer chrome, the preview is not correct. Can you check please this in detail. You will find the attached file. With kind regards Did this work before? Yes Chrome version: 52.0.2743.116 Channel: stable OS Version: 8 Flash Version: Shockwave Flash 22.0 r0
,
Sep 13 2016
Hallo, When I see at the picture that you sent to me. I can determine directly, that the font that is used isn´t Akzidenz-Grotesk BQ but Times New Roman. Also, I did what you said. That doesn´t work always. But the problem is now very important and criticism, please try to find a solution. Here is the screenshot from the view of Explorer and Google Chrome. Thank you.
,
Sep 15 2016
We have the same problem; we use the font-family Avantgarde. In this debug view Chrome list the right font, but the text is rendered with the font family times. Do you think it's a Bug?
,
Sep 15 2016
I add two Screenshots on with Chrome with the wrong font and on with the Internet Explorer with the correct font.
,
Sep 15 2016
After I update Chrome to Version 53.0.2785.116 it is still the wrong font family. It was possible that Chrome use the right font family, if I use the flag disable direct write. But you remove this Option.
,
Sep 22 2016
Thank you for providing more feedback. Adding requester "rnimmagadda@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 27 2016
One thing I notice is that the font is no TrueType font it is an otf font. Does Chrome supports this type of Font? Or did somebody else find out something? That's a huge problem for use.
,
Sep 30 2016
Able to repro this issue on Windows 7, MAC (10.11.6) & Ubuntu Trusty (14.04) for Google Chrome Stable Version - 53.0.2785.116 This is a Non-Regression issue existing from M30 - # 30.0.1549.0
,
Sep 30 2016
Correction - Chrome Stable Version Tested On - 53.0.2785.143
,
Oct 3 2016
Could you provide a copy of the Avantgard or "Akzidenz-Grotesk BQ" fonts that do not render? I am suspecting these might be Type-1 font files which are not supported. Where did you get the original fonts in question, what is the source for those?
,
Oct 5 2016
Hi, the font I have problems with is 'AvantGarde CondBook'. I send you all my AvantGarde Fonts. The Font must be in the file IT020_.ttf in the zip file. So I think, it is not a Type-1 Font.
,
Oct 5 2016
I get the font from a customer from us.
,
Oct 5 2016
This font has different spellings in the name table (ttx table dump attached) and we may be matching on a different one than Internet Explorer or Firefox. I would need to check in more detail, what's the correct approach and what our current behaviour is, a quick check on Linux and Mac shows: Linux matches against the family name, name record ID 1, and on Mac we match against the PostScript name, namerecord ID 6. You should be able to access the font if you use both spellings in one font-family style rule, e.g: font-family: AvantGarde CondBook, AvantGarde-CondBook; Hope this helps as a workaround for now, thanks for the report.
,
Oct 5 2016
,
Oct 5 2016
Hi, thanks for the answer. I tried it with the name AvantGarde-CondBook, but it is still the wrong font. Do you believe, that this problem gets solved to the next release of Chrome next month? Does it work on Linux or Mac? How did you produce the file namerecord_dump.txt?
,
Oct 5 2016
The dump was produced by running the ttx tool from https://github.com/fonttools/fonttools on the IT020_.ttf file and extracing the name table. This issue requires further analysis, the workaround I suggested worked at least on Linux and Mac, I have so far not tested on Windows. We don't currently have a fix for this issue and I can't give an estimate in which version this will be addressed. Another workaround at the moment might be to use the font as a web font: @font-face { font-family: avantgardecondbook; src: url("IT020.ttf"); } .mystyle { font-family: avantgardecondbook; }
,
Oct 5 2016
Fontconfig recently added FC_POSTSCRIPT_NAME which might come handy here.
,
Oct 6 2016
Thank you for the tip with font-face that works on windows
,
Nov 22 2017
It is not correct for the font-family property to match against PostScript font face names. The CSS Fonts spec is quite clear that "a font family name only specifies a name given to a set of font faces, it does not specify an individual face",[1] whereas a PostScript name (id 6) uniquely identifies a specific face, NOT a family. Simple testcase that demonstrates the incorrect behavior on macOS: data:text/html,<div style="font-family:Times-BoldItalic, sans-serif">should be sans serif This example should NOT render as Times Bold Italic, but it does. Reports suggest (I have not tested) that this incorrect use of the PostScript name may affect Chrome on Android as well. [1] https://drafts.csswg.org/css-fonts-3/#font-family-prop
,
Nov 22 2017
Agree, thank you. See also issue 627143 for the reverse problem.
,
Dec 6 2017
,
Feb 7 2018
drott@ This has come up as one of the top recurring issues in our Firefox / Google Search compat effort (https://docs.google.com/document/d/1j6vEd-lsB8SZF55xsa6QTr48JJLRtoYwqy2SLrAUdeM/edit#). Ignoring the web compat risk, would this be hard to fix?
,
Feb 8 2018
I am now actively working on the reverse issue 627143, where matching local() is incorrectly performed against family names, instead of postscript names. I can add this issue here to my testing and straighten out both of them. Can you clarify which one is higher priority for the web compat efforts?
,
Feb 28 2018
As far as I can tell from my test, the Roboto-Regular on android does not in fact work. I think we only get Roboto because of the sans-serif fallback. Chrome on MacOS only and Safari are the only browsers which match the postscript names from my demo (Used Verdana as another backup alternative font which is available on most platforms): https://jsfiddle.net/flackr/04617p3v/27/show/
,
Feb 28 2018
To clarify for #23, the Roboto-Regular seems to have no effect on Android, we only get Roboto because the default sans-serif font on Chrome Android is Roboto, so this issue shouldn't be blocking that. It also shouldn't be risky to remove this behavior since as far as I can tell it only happens on Mac.
,
Mar 21 2018
flackr@ and I made an interesting additional discovery. On Chrome Android only, the font-family name 'sans-serif-medium' is accepted as a valid font and results in a rendered glyph of "Roboto Medium". serif-medium, cursive-medium etc do not work, it is just 'sans-serif-medium'. We attempted to verify whether postscript names work for system fonts on Chrome Android, but were unable to find *any* installed fonts. Not even trying to target the underlying "DroidSans Mono" etc worked, they didn't match in any configuration we could find. Firefox Android did not recognize sans-serif-medium as a valid font-family. This does not affect the 'Roboto-Regular' discussion, we still only get Roboto because sans-serif (the fallback) on Android is Roboto.
,
Mar 21 2018
re #26, I found https://stackoverflow.com/questions/19691530/valid-values-for-androidfontfamily-and-what-they-map-to which implies that Android actually ships font-families named 'sans-serif-medium', 'sans-serif-italic' etc. I'm not 100% sure if android:fontFamily is the same concept as the web font-family, but if it was it would explain the behavior there. (And would mean the postscript bug still doesn't exist on Android). |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by rnimmagadda@chromium.org
, Aug 30 2016Labels: Needs-Feedback
343 KB
343 KB View Download