Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Inter to use ss02 disambiguation styleset #6129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benharri
Copy link
Contributor

@benharri benharri commented Nov 6, 2024

This adds ss02 to Inter which is the disambiguation set https://rsms.me/inter/#features
It makes ILli1 a lot easier to tell apart.

Haven't been able to get this working on web. Seems that some react-native-web styles are overriding it and the font-feature-settings aren't getting applied correctly.

Looks great on android though

Thread with some more info
https://bsky.app/profile/benharri.org/post/3l7r4sv42sk2q

@benharri benharri force-pushed the stylistic-two branch 4 times, most recently from 542923f to ad69ccb Compare November 13, 2024 15:17
@benharri
Copy link
Contributor Author

Another less disruptive option is to use cv05 which changes just the lowercase l

Gitlab used that for their version of Inter:
https://www.npmjs.com/package/@gitlab/fonts

character variants aren't in the react native fontVariant though...

@benharri
Copy link
Contributor Author

If this is not a desired change, I'm happy to close this out.

@benharri benharri force-pushed the stylistic-two branch 2 times, most recently from c344a3d to 6c1eda6 Compare November 17, 2024 17:03
@gaearon
Copy link
Collaborator

gaearon commented Nov 17, 2024

this needs a look from @estrattonbailey

@benharri benharri force-pushed the stylistic-two branch 2 times, most recently from eafa6b3 to f8c4674 Compare November 24, 2024 05:09
@benharri benharri force-pushed the stylistic-two branch 2 times, most recently from 14156c0 to e81e757 Compare December 13, 2024 15:12
@estrattonbailey estrattonbailey self-requested a review December 14, 2024 17:31
@estrattonbailey
Copy link
Member

Hey sorry for the delay. I like the idea, I tend to prefer these too. Other users may have differing opinions, but I'd be curious to try this. At the very least the lower L variant (I kinda think the I with bars is ugly heh).

I had to timebox this today, got some other stuff to get done this weekend, but did a little poking so I better understand.

It does appear that RNW doesn't support stylistic-two, which should map to ss02 as you've already investigated. Searching around, it looks like RN itself does some mapping for these values. I suppose RNW would need to do the same, probably prior to passing the raw values into the styleq library it uses internally (also authored by @ necolas). I see you have a PR with the types already, nice.

So it seems the full situation is:

  • web needs a local patch in our codebase, or a PR to RNW
  • iOS doesn't seem to be working either, might need a reduced test case and issue report in RN repo
  • works fine on Android, nice

Not sure if/when we'll get time to dig deeper, but happy to review code or lend an ear if you want to keep looking into this!

@benharri
Copy link
Contributor Author

I think cv05 is a better target as you mention here which only applies the curly lowercase l, but this runs into a similar issue in upstream RN. I'm not seeing any types/wrappers for any of the cv character variant font-features.

I will poke around a bit on patching RN and RNW for this when I find some time.

@benharri benharri force-pushed the stylistic-two branch 2 times, most recently from bcce3e7 to f34ab59 Compare January 3, 2025 19:52
add ss02 to fonts

this isn't working on web and i don't know why

add ss02 to templates/fallback styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants