You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Text component import {Text} from '@carbon/react-native'; the IBMPlexSans-Regular font is not being applied to the text of the component.
The inspector in the simulator reports that the font is IBMPlexSans-Regular, but in the console the error message Unrecognized font family 'IBMPlexSans-Regular' is printed, and if you compare the capital letter I (as in I am going to the store) and the lowercase L (as in love) on the application screen to the letters contained in the font file inside the project at './node_modules/@carbon/react-native/src/assets/fonts/IBMPlexSans-Regular.ttf' you can see that the capital 'I' in the application is missing the top and bottom serifs and that the lowercase 'L' (as in love) in the app is missing its curved tail.
How to replicate
Create a new React Native starter project and add the necessary carbon dependencies. Import the @carbon/react-native text component and add an element to the screen and notice the discrepency between the letters and those in the font file contained at './node_modules/@carbon/react-native/src/assets/fonts/IBMPlexSans-Regular.ttf'
Here is a screenshot of the font file letters being displayed from the font file in the project:
And here is a screenshot of the device in simulator with the font not being applied and the console error message:
And here is a screenshot of the Inspector falsely reporting that the font is IBM Plex (so that you are aware the Inspector can't be relied on to verify the fix:
Additional Notes
The font file itself in the @carbon/react-native library appears to be the correct font. For one reason or another, it doesn't get applied to the component.
The correction can only be verified by directly comparing the fonts. The Inspector is not correctly reporting state.
The text was updated successfully, but these errors were encountered:
I have confirmed they do work as expected with latest following this and see them referenced in the projects. For example in Android and iOS you should see them in their folders.
Android for example: (android/link-assets-manifest.json)
The example app in this project should also have this setup. You can try with it if you still run into issues. But if you don't see the updates in the android/iOS folders it won't render them.
What was observed
When using the Text component
import {Text} from '@carbon/react-native';
the IBMPlexSans-Regular font is not being applied to the text of the component.The inspector in the simulator reports that the font is IBMPlexSans-Regular, but in the console the error message
Unrecognized font family 'IBMPlexSans-Regular'
is printed, and if you compare the capital letter I (as in I am going to the store) and the lowercase L (as in love) on the application screen to the letters contained in the font file inside the project at './node_modules/@carbon/react-native/src/assets/fonts/IBMPlexSans-Regular.ttf' you can see that the capital 'I' in the application is missing the top and bottom serifs and that the lowercase 'L' (as in love) in the app is missing its curved tail.How to replicate
Create a new React Native starter project and add the necessary carbon dependencies. Import the @carbon/react-native text component and add an element to the screen and notice the discrepency between the letters and those in the font file contained at './node_modules/@carbon/react-native/src/assets/fonts/IBMPlexSans-Regular.ttf'
Here is a screenshot of the font file letters being displayed from the font file in the project:
And here is a screenshot of the device in simulator with the font not being applied and the console error message:
And here is a screenshot of the Inspector falsely reporting that the font is IBM Plex (so that you are aware the Inspector can't be relied on to verify the fix:
Additional Notes
The font file itself in the
@carbon/react-native
library appears to be the correct font. For one reason or another, it doesn't get applied to the component.The correction can only be verified by directly comparing the fonts. The Inspector is not correctly reporting state.
The text was updated successfully, but these errors were encountered: