What happened?
I'm loading variable fonts on iOS with expo-font and its config plugin. Using React Native's Text component, I'm able to set the font weight to light or bold. But with NitroText, the font weight has no effect.
I'm using uniwind with React Native Text but adding fontFamily and fontWeight to style for NitroText doesn't work either.
Steps to reproduce
- Install
expo-font
- Load some variable font (eg, Inter)
- Set
fontFamily and fontWeight styles on NitroText
Code sample
import { NitroText } from 'react-native-nitro-text'
import { withUniwind } from 'uniwind'
const Component = withUniwind(NitroText)
function Page() {
return (
<View className="flex-row w-full gap-4 justify-between px-8">
<View className="gap-2">
<Text className="text-gray-11 text-sm">Text</Text>
<Text className="font-light">Light</Text>
<Text>Regular</Text>
<Text className="font-medium">Medium</Text>
<Text className="font-bold">Bold</Text>
</View>
<View className="gap-2">
<Component className="font-sans text-gray-11 text-sm">
NitroText
</Component>
<Component className="font-sans text-base text-gray-12 font-light">
Light
</Component>
<Component className="font-sans text-base text-gray-12">
Regular
</Component>
<Component className="font-sans text-base text-gray-12 font-medium">
Medium
</Component>
<Component className="font-sans text-base text-gray-12 font-bold">
Bold
</Component>
</View>
</View>
)
}
Environment
React Native 0.81.5, Expo 54.0.23, expo-font ~14.0.9
Checklist
What happened?
I'm loading variable fonts on iOS with
expo-fontand its config plugin. Using React Native'sTextcomponent, I'm able to set the font weight tolightorbold. But withNitroText, the font weight has no effect.I'm using
uniwindwith React NativeTextbut addingfontFamilyandfontWeighttostyleforNitroTextdoesn't work either.Steps to reproduce
expo-fontfontFamilyandfontWeightstyles onNitroTextCode sample
Environment
React Native 0.81.5, Expo 54.0.23, expo-font ~14.0.9
Checklist