Skip to content

Small caps broken in v4.0 #630

Closed
Closed

Description

@saintasia

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

Activity

  1. jhpratt commented on Nov 24, 2023

    @jhpratt

    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 👍 for it being (semi-)supported. In the meantime, I'm continuing to use v3.19 in places where small-caps may be used.

  2. rben01 commented on Nov 26, 2023

    @rben01

    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.

  3. Apreche commented on Dec 11, 2023

    @Apreche

    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.

  4. rsms commented on Mar 23, 2024

    @rsms
    Owner

    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.

  5. added a commit that references this issue on Mar 23, 2024
    883a326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions