Skip to content

Apply typeface and size individually in android text appearance. #393

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

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

joarkosberg
Copy link
Contributor

When using a custom font with bottom tabs today on Android, another font size is also set by default. With the biggest difference from the standard one being that it scales with the system font scale, which the default one does not.

PR Description

Improvement: This splits the application of text appearance, so that size and typeface(family and weight) is applied individually. So that when setting one or the other, only that is applied. So one could use a custom font family, without getting the font scaling which is usually not wanted with tab bars.

How to test?

On Android apply fontFamily+fontWeight and fontSize individually in tabLabelStyle, and see they can be used individually.

Screenshots

Before and after examples with bigger system font scale on Android

Code Before After
Screenshot 2025-07-25 at 09 14 29 Screenshot 2025-07-25 at 09 03 36 Screenshot 2025-07-25 at 08 55 09
Screenshot 2025-07-25 at 09 13 50 Screenshot 2025-07-25 at 08 56 25 (same as before) Screenshot 2025-07-25 at 08 56 25

Copy link

changeset-bot bot commented Jul 25, 2025

🦋 Changeset detected

Latest commit: 7b92802

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
react-native-bottom-tabs Patch
@bottom-tabs/expo-template Patch
@bottom-tabs/react-navigation Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@okwasniewski okwasniewski requested a review from Copilot July 29, 2025 16:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves Android text appearance handling for bottom tabs by separating the application of font size and typeface properties. This allows developers to set custom font families without inheriting unwanted font scaling behavior, which is particularly important for tab bars where consistent sizing is preferred.

Key changes:

  • Split text appearance application to handle size and typeface independently
  • Allow setting custom font family without automatic font scaling
  • Maintain backwards compatibility while providing more granular control

Copy link
Collaborator

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for working on this

@okwasniewski okwasniewski added this pull request to the merge queue Jul 30, 2025
Merged via the queue into callstackincubator:main with commit 44dd50d Jul 30, 2025
8 checks passed
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.

2 participants