andrew-levy / swiftui-react-native

Bringing SwiftUI features to your React Native app. It's like if React Native and SwiftUI had a child.
swiftui-react-native.vercel.app
MIT License
649 stars 22 forks source link

Support for custom fontFamily #48

Open peterjskaltsis opened 3 months ago

peterjskaltsis commented 3 months ago

Thank you for the amazing library!

Just wanted to ask if there is currently a way to set a custom font family vs system fonts only on text elements etc?

Text("Hello, world!")
    .font(Font.custom("MyFont", size: 18))

Would this introduce a lot of complexity to eg. getFont ? https://github.com/andrew-levy/swiftui-react-native/blob/master/src/utils/fonts/index.ts

andrew-levy commented 3 months ago

Hey thanks! Not currently, but I can add it to the list of modifiers to add. @peterjskaltsis

peterjskaltsis commented 3 months ago

That'd be great, thank you 🙏 I also wasn't able to set textAlignment on text but I might be missing something.