Skip to content

Fix italic font style on new arch ios#171

Merged
delekta merged 3 commits into0.81.4-discordfrom
delekta/fix-italic-font-style
Apr 28, 2026
Merged

Fix italic font style on new arch ios#171
delekta merged 3 commits into0.81.4-discordfrom
delekta/fix-italic-font-style

Conversation

@delekta
Copy link
Copy Markdown

@delekta delekta commented Apr 27, 2026

Asana ticket

Fixes fontFamily on iOS (new arch):

  1. when given a comma-separated list of font names like "NotoSans-Bold, NotoSans-Italic". Each token is now trimmed of surrounding whitespace before lookup,
  2. every resolved face is expanded to its full family so the weight/style matching loop can pick italic and weighted variants
  3. and the target weight is seeded from the first resolved face when the caller didn't set one — preventing bold faces from being silently downgraded to Regular.

Before the changes, the comma-split branch only added each resolved face's exact name (updatedFontNames = [updatedFontNames arrayByAddingObject:font.fontName]) to the candidate list. As a result, no candidate ever satisfied RCTGetFontStyle(fontMatch) == fontProperties.style for italic — those faces were never in fontNames to begin with — so the matching loop produced no fontMatch and we fell back to the default font.

Summary:

Changelog:

Test Plan:

@delekta delekta marked this pull request as ready for review April 28, 2026 13:17
@delekta delekta merged commit cfbb718 into 0.81.4-discord Apr 28, 2026
55 of 69 checks passed
@delekta delekta deleted the delekta/fix-italic-font-style branch April 28, 2026 18:02
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