react-native-svg
react-native-svg copied to clipboard
How to handle SvrUri when font family is indeterminate
Question
Consider this scenario: you are building an image gallery. You query some index API which returns a list of URIs, some with standard image extensions, other with .svg
. You do not control the content of these svg
assets and they may reference font that are unavailable at runtime, resulting in a Unrecognized font family ...
error.
What do you do to solve this? I assume it is not possible to lazily load fonts at runtime, so the next best solution presumably would be to just override the font. Of course, this meaningfully alters the resultant image.
Anyway, curious if anyone has encountered this or has thoughts.