Skip to content

Conversation

@tjaniczek
Copy link
Collaborator

Summary

This PR adds support for fontStyle in configureFonts with strong emphasis on how fragile it is in RN right now (explained both in docs and in our example app).

Basic idea is that most of our users should still use separate font files for bold / italic fonts. Although if they manage to bundle a variable font that works on each platform - then they should be able to use it with simple fontStyle. This is how I tried to explain it in the docs.

Also, prepared a test screen in our Example app, showing that Inter v4.0 font with slnt variation fails to render variants on both iOS 16.2 and Android 13:

image

In this case iOS replaces variants with base variant, while android replaces variants with default font for OS.

Users can use this screen to test their own custom fonts.

Closes #3499

Test plan

No functional changes, added fontStyle prop to existing unit tests just in case.

@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here.

@callstack-bot
Copy link

callstack-bot commented Mar 23, 2023

Hey @tjaniczek, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@lukewalczak lukewalczak merged commit 084c619 into main Mar 27, 2023
@lukewalczak lukewalczak deleted the feat-support-font-style branch March 27, 2023 10:53
teneeto pushed a commit that referenced this pull request May 10, 2023
Co-authored-by: Tomasz Janiczek <tomasz.janiczek@callstak.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support italics in custom fonts.

5 participants