software-mansion / react-native-svg

SVG library for React Native, React Native Web, and plain React web projects.
MIT License
7.49k stars 1.13k forks source link

Custom font doesn't work with Text #1422

Closed alexeymolchan closed 2 weeks ago

alexeymolchan commented 4 years ago

Font loaded with expo-font, it works fine with default text component, but doesn't work with svg Text.

reproducible example: https://snack.expo.io/@meme_police/restless-chocolate

image

react-native-svg: 12.1.0

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

lavor commented 3 years ago

I can confirm that custom font is not working in Expo. Did it ever work in expo?

Van-Nostrand commented 3 years ago

I've just run into this issue. Custom fonts work just fine with react native Text components, but they do not work on svg Text components. Seems this has been an ongoing issue for a few years now?

michaelnagy commented 2 years ago

Same problem here

oli414 commented 1 year ago

Running into the same issue, has anyone found a solution? Seems like this has been an ongoing issue for years now, but no luck finding a solution/work-around

FrSenpai commented 1 year ago

Hey! Same here, I can't use custom font on Text from Svg. (expo)

oli414 commented 1 year ago

We ended up finding that you cannot use the font-weight property, without it it was fine. May be the case for other text decoration properties too

bohdanprog commented 1 month ago

Hello @alexeymolchan, Sorry for the delayed response regarding that issue. I tried to reproduce it but couldn't. Here is an example. Let me know if you are still experiencing the issue related to that problem. Thank you.