kennethormandy / utility-opentype

Simple, CSS utility classes for advanced typographic features.
http://utility-opentype.kennethormandy.com
MIT License
498 stars 21 forks source link

Review `font-variant-caps: all-small-caps` #12

Open kennethormandy opened 7 years ago

kennethormandy commented 7 years ago

Review font-variant-caps: all-small-caps, which is used for .c2sc and .caps. I was previously under the impression that this wouldn’t synthesise glyphs (ie. create faux small caps) but that doesn’t seem to be the case in practice or according to MDN:

This keyword forces the use of small capital letters for lower case characters. It corresponds to the OpenType values smcp and c2sc; if the font doesn't support them, it synthesizes the glyphs.

That is an unfortunate decision. From my quick test, font-synthesis: none doesn’t seem to fix this either.

tooolbox commented 7 years ago

...Whaaat?!

Yes, unfortunate. Is that a spec thing, or a particular implementation? What environments are you testing in, perchance?

kennethormandy commented 7 years ago

Just Chrome, I happened to be using it myself and it was creating faux small caps out of a typeface that didn’t have any. I haven’t had a chance to research it much yet. From the MDN link, it looks like I might have been wrong and the browsers synthesise caps in most situations.