Bug 25000 - font-variant: small-caps uses fake small caps even when real is available
Summary: font-variant: small-caps uses fake small caps even when real is available
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-02 07:37 PDT by Joel C. Salomon
Modified: 2023-10-10 04:31 PDT (History)
6 users (show)

See Also:


Attachments
Test case (1.96 KB, application/xhtml+xml)
2009-04-02 08:15 PDT, Joel C. Salomon
no flags Details
Font fallback from Fontin to Georgia, compared to Fontin Small Caps (25.65 KB, image/png)
2009-07-08 04:18 PDT, jjm
no flags Details
Test case to go along with image (uses Fontin Serif instead of Sans however) (1008 bytes, text/html)
2009-07-08 04:26 PDT, jjm
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel C. Salomon 2009-04-02 07:37:27 PDT
I'm trying to use small-caps in a document, but font-variant: small-caps gives me faked small-caps, i.e., scaled-down capitals.

I tried defining the small-caps variant with @font-face, but that still does not work.
Comment 1 Joel C. Salomon 2009-04-02 08:15:40 PDT
Created attachment 29190 [details]
Test case
Comment 2 jjm 2009-07-08 04:18:54 PDT
Created attachment 32445 [details]
Font fallback from Fontin to Georgia, compared to Fontin Small Caps

Not only does Webkit ignore the font-variant specified in an @font-face declaration,
it also falls back to a local font (Georgia Serif in this case, to contrast nicely with Fontin Sans)
instead of the regular version in the @font-face declaration.
Comment 3 jjm 2009-07-08 04:26:07 PDT
Created attachment 32447 [details]
Test case to go along with image (uses Fontin Serif instead of Sans however)
Comment 4 Philip Kahn 2009-11-20 18:16:06 PST
It looks like just <a href='http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/'>including font-variant in @font-face</a> makes Webkit ignore the whole thing. Confirmed in Chrome 4.0.249.4 and Safari 4.0.3.
Comment 5 Dave Hyatt 2010-11-13 21:20:04 PST
See

https://bugs.webkit.org/show_bug.cgi?id=49505

for the @font-face issue.
Comment 6 Richard Rutter 2016-11-22 04:45:26 PST
Issue is still present in Safari 10.

Both font-variant-caps and font-feature-settings should select proper small caps if they are available through OpenType. Safari 10 renders real small caps when using font-feature-settings but synthesises the small caps when using font-variant-caps even if the real small caps are available.

A new test case: http://codepen.io/clagnut/pen/Vmpobj?editors=1100
Comment 7 Richard Rutter 2016-11-22 05:14:10 PST
Ah sorry just realised this issue is for font-variant NOT font-variant-caps. For font-variant, the small caps *should* by synthesised.

Will create a new issue accordingly.
Comment 8 Ahmad Saleem 2023-10-10 04:31:44 PDT
In all test cases (two attached) and one from CodePen (Comment 06) - all browsers are matching each other (at least in rendering).

Tested using: Safari Technology Preview 180, Chrome Canary 120 and Firefox Nightly 120.