New issue
Advanced search Search tips

Issue 622842 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 587094
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Font-variant: small-caps renders fake small caps instead of real ones

Reported by rostis...@chebykin.ru, Jun 23 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Example URL:
http://pg.chebykin.ru/font-variant/

Steps to reproduce the problem:
1. Take any OpenType font supporting small capitals (i.e. smcp and/or c2sc feature tag). In fact, almost any modern system font is suitable, such as Calibri (Microsoft), Roboto (Google) or San Francisco (Apple).
2. Take any HTML element with text content containing lowercase Latin letters (and maybe any other characters).
3. Apply the specified font and the CSS rule `font-variant: small-caps` to this element.

What is the expected behavior?
The browser should render lowercase letters as small caps, which looks like this:
http://content.screencast.com/users/z1011001010111010010/folders/Default/media/0634c420-e0a5-4054-970c-c68e6bd85f9d/fig1.png
(This is a screenshot from Mozilla Firefox, which processes small caps the right way.)

What went wrong?
Chrome browser renders lowercase letters as *fake small caps*: they are just ordinary uppercase letters programmatically zoomed and distorted:
http://content.screencast.com/users/z1011001010111010010/folders/Default/media/e24b903a-d53c-4108-af29-4f60088c6cea/fig2.png
These fake small caps do not match the uppercase letters with their stroke width and proportions, they have bad spacing, therefore the whole inscription looks ugly and inhumanly.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? No MS Edge, MS IE, Safari (very partially)

Chrome version: 51.0.2704.103  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0

Unfortunately, typography amateurs are not aware that small capitals is a separate kind of letters. It is often said that "small caps are letters of uppercase form and lowercase size", but this is completely wrong. You cannot "synthesize" small caps from the uppercase letters, just like you cannot programmatically convert lowercase and uppercase letters to one another. It would be more accurate to say that small caps are close to uppercase letters by their form and to lowercase ones by their height. And still font designers develop independent glyphs for small-caps, just as they create separate lowercase and uppercase glyphs for each letter.
Fake small capitals were a common issue of early desktop publishing software, for programmers did not know typography and typographers could not write the code. Now browser developers go through the same grief as DTP software developers left behind twenty years ago.
Meanwhile, Google Chrome is actually able to render real small capitals, though it requires to use `font-feature-settings: 'smcp' 1`. That means Chrome sources already contain the code needed to display small caps properly. It only remains for the developers to make `font-variant: small-caps` work the same way.
This bug relates not only to Latin script, but also to other bicameral scripts such as Greek and Cyrillic.
Fake small caps can still make sense in cases when the font itself does not support real small capitals and does not provide glyphs for them.
PS. Yes, I saw the  issue #522964 , but I suppose it is another case. That issue relates to a new feature request, namely font-variant-caps property in future versions of Chrome. Meanwhile, my report is about a bug with font-variant property in current version of browser.
 

Comment 1 by pdr@chromium.org, Jun 23 2016

Cc: drott@chromium.org
Components: -Blink Blink>Fonts
Status: Available (was: Unconfirmed)
Thanks for filing this. Adding label Blink>Fonts for further triage.

Comment 2 by drott@chromium.org, Jun 27 2016

Mergedinto: 587094
Owner: drott@chromium.org
Status: Duplicate (was: Available)
Thanks for the report, fixed in  issue 587094 , see also  issue 585746  for the font-variant parsing improvements.

Correct small caps support also mentioned in: http://blog.chromium.org/2016/06/chrome-52-beta-css-containment-simpler.html

Not reproducible in 52 beta.

Sign in to add a comment