-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
RCTFont maps UltraBold font to UIFontWeightBold font weight #23512
Labels
Bug
Component: Text
Platform: iOS
iOS applications.
Resolution: Locked
This issue was locked by the bot.
Comments
This comment has been minimized.
This comment has been minimized.
dat-giggedin
changed the title
weightOfFont cannot regconize GillSans-UltraBold and GillSans-Bold
Cannot regconize GillSans-UltraBold and GillSans-Bold
Feb 18, 2019
dat-giggedin
changed the title
Cannot regconize GillSans-UltraBold and GillSans-Bold
Cannot regconize GillSans-Bold
Feb 18, 2019
dat-giggedin
changed the title
Cannot regconize GillSans-Bold
Cannot regconize GillSans-Bold on iOS
Feb 18, 2019
react-native-bot
added
Platform: iOS
iOS applications.
and removed
Resolution: Missing Environment Info
labels
Feb 18, 2019
hramos
changed the title
Cannot regconize GillSans-Bold on iOS
RCTFont maps UltraBold font to UIFontWeightBold font weight
Feb 19, 2019
does |
no, it didn’t. And yes, you use UIFontWeightTraits but it never reach to those code because the for loop map map UltraBold to Bold trait and return. I had to comment for loop in that function to make it work |
M-i-k-e-l
pushed a commit
to M-i-k-e-l/react-native
that referenced
this issue
Mar 10, 2020
Summary: Add `ultrabold` map of font weight, if not, `ultrabold` would map to `bold`. Fixes facebook#23512. ## Changelog [iOS] [Fixed] - Add ultrabold pairs for font weight Pull Request resolved: facebook#24948 Differential Revision: D15575568 Pulled By: cpojer fbshipit-source-id: 5d1d6a033c166d91a330526ba8996ac0416f3887
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Bug
Component: Text
Platform: iOS
iOS applications.
Resolution: Locked
This issue was locked by the bot.
🐛 Bug Report
Cannot display correct GillSans-Bold font. It uses GillSans-UltraBold instead
To Reproduce
Add text to the screen
<Text style={{fontFamily: 'GillSans-Bold'}}></Text>
Expected Behavior
Display correct font
Code Example
<Text style={{fontFamily: 'GillSans-Bold'}}></Text>
Environment
Because in RCTFont.mm, it uses UIFontWeight variants to get the fonts which has matching suffix (...Bold). It takes GillSans-UltraBold as its match and skip GillSans-Bold. Could you consider using UIFontWeightTrait and removing UIFontWeight variants checking?
The text was updated successfully, but these errors were encountered: