better font diagnostics in developer tools
Reported by
pdk...@gmail.com,
May 25 2016
|
|||||
Issue description
I'd like to propose a few improvements to font diagnostics to substantially help with debugging font issues.
1.) In computed, the name of the rendered fonts are displayed, but only the family name, not the full name. This makes it more difficult to figure out which font is used than it needs to be.
So when you load both a regular and an italic variant of the same font, and then hover an element with font-style: italic you can't say for sure if it used the specific italic variant or if the browser used the regular variant and made it italic itself (usually badly). Maybe the URL to the italic variant was incorrect.
Below are the relevant elements from the name table of a font (as XML). Chrome only shows 1, where it could show 4. Sometimes 4 is not available, so it could show 1 (2) with (2) perhaps a bit lighter to make clear it's not the full font name, but derived from the style.
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
Noto Serif
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
Italic
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
Noto Serif Italic
</namerecord>
2.) Show the local path or URL of the fonts. Could be on hover.
3.) As bonus make fonts selectable. Make Chrome show the selected candidates for the font, and let the user switch. This would be nice for debugging issues stemming from differences between locally installed fonts and webfonts.
4.) Show fonts used on the document when clicking on <html> (or by some other way). For some reason this doesn't work today. It shows the sum of used fonts of an element, but not on the top element. You basically have to add an empty container element to get the same effect.
5.) Selecting a font from the rendered fonts list highlights the glyphs in the element in some way. Example problem attached. For some reason a few glyphs are rendered by the fallback font. Maybe Google Fonts was used with insufficient &text parameter. Maybe the prefered fonts cannot display some characters. It's difficult to find the glyphs now.
,
May 25 2016
,
May 25 2016
I was slightly wrong on 4. It shows the sum of fonts on the top element that doesn't have any immediate text nodes.
,
May 26 2016
,
May 26 2016
,
May 26 2016
I notice that 2.) has already been addressed partially in M51, as it now reports local files and network resources. And just for reference, this is the official spec for the names in the name table (towards the bottom of the page). https://www.microsoft.com/typography/otspec/name.htm
,
Dec 10 2017
We didn't include this in our plans for the upcoming year. If you think this is important, please re-file with justification. Thanks. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by pdk...@gmail.com
, May 25 2016