Skip to content

Bugfix: use the requested size for Font.custom relativeTo - #554

Open
shiaho777 wants to merge 1 commit into
skiptools:mainfrom
shiaho777:fix-font-custom-relative-size
Open

shiaho777 wants to merge 1 commit into
skiptools:mainfrom
shiaho777:fix-font-custom-relative-size

Conversation

@shiaho777

Copy link
Copy Markdown

Font.custom(_:size:relativeTo:) on Android added the text style's font size to the requested size. A call such as Font.custom("MyFont", size: 12, relativeTo: .caption2) rendered at about twice the intended size.

size is the size at the default content-size category. Compose sp already follows the system font scale, and there is no per-style Dynamic Type curve to add. The requested size is now used directly, matching Font.custom(_:size:).

The Android path added the text style's font size to the requested size, so custom fonts rendered about twice as large as on iOS. Compose sp already follows the system font scale, so the requested size is used directly.
@cla-bot

cla-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to the Skip community. We require contributors to sign our contributor license agreement (CLA), and we don't seem to have the user(s) @shiaho777 on file. In order for us to review and merge your code, for each noted user please add your GitHub username to Skip's .clabot file

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.

1 participant