software-mansion / software-mansion/react-native-svg

How to handle SvrUri when font family is indeterminate

Open
#2,017 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Question
Dominant language
TypeScript
Stars
8k
Forks
1.2k
Avg merge
10d 9h
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file, test, or entry point. Start by reproducing an SVG asset with an unavailable font in React Native, then inspect the SvrUri and font-handling behavior; the work is done only once the project has an agreed, testable resolution for these assets.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.