inter icon indicating copy to clipboard operation
inter copied to clipboard

Small caps broken in v4.0

Open saintasia opened this issue 2 years ago • 3 comments

Describe the bug font-variant-caps: all-small-caps broken on v4.0

To Reproduce Steps to reproduce the behavior:

  1. use css property font-variant-caps with the value all-small-caps
  2. behold it only working on select few characters

Expected behavior All characters being capitalised and then scaled down to the intended small-caps size

Screenshots

v3 v4
Screenshot 2023-11-20 at 1 50 10 pm Screenshot 2023-11-20 at 1 50 40 pm
Screenshot 2023-11-20 at 1 54 20 pm Screenshot 2023-11-20 at 1 52 50 pm

Environment

  • OS (any)
  • Chrome, Firefox, Safari
  • Version of font 4.0

saintasia avatar Nov 20 '23 03:11 saintasia

A quick search shows that small-caps isn't technically supported (see #32), even if it did work quite well in the previous version. I don't know the technical cause behind the regression, but a big :+1: for it being (semi-)supported. In the meantime, I'm continuing to use v3.19 in places where small-caps may be used.

jhpratt avatar Nov 24 '23 07:11 jhpratt

On https://rsms.me/inter/lab/?feat-c2sc=1, it is indicated that the small caps feature in v4.0 (c2sc) is incomplete, so at least this is already a known issue.

rben01 avatar Nov 26 '23 02:11 rben01

opentype feature c2sc means that capital letters will be replaced with small caps glyphs. The feature smcp means that lowercase letters will be replaced with small caps glyphs. The css property font-variant-caps: all-small-caps enables both of these opentype features so that every character will be a small cap, regardless of whether the original is upper or lowercase.

If a font does not support these features, the browsers will take the uppercase glyphs and automatically scale them to create fake small caps. That appears to be what is happening in v3. This is undesirable mostly because the strokes are too light. If you look at it next to a font with proper small caps, you can see it's not great. That's why it's nice to have a font with proper small caps.

What appears to have happened in v4 is they have started working on #32 and implemented some of the small caps properly, but not all of them. I think what is happening is that the browsers see that at least some small caps are implemented in the font, so they disable their fake small caps autoscaling function. That explains the mixed bag of upper and lowercase.

I'm very happy that proper small caps are being worked on. However, if my evaluation of this issue is correct, they should not be included in a release until all of them are done. Including just a few creates this broken functionality that's even worse than the fake auto-scaled small caps.

Apreche avatar Dec 11 '23 16:12 Apreche

Inter does not support Small Caps (as of v4.0.) Hopefully proper support will be added in a future version. For now, what we can do it to remove the s2sc and smcp OpenType features. As @Apreche points out, web browsers will then manufacture small caps by approximation (AKA "faux" small caps) which will look quite bad but better than a mix of proper small caps and faux ones.

rsms avatar Mar 23 '24 01:03 rsms