Setting Fallback Fonts in FontFamily Styling is Not Supported
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.3k
- Merge medio
- 1g 23h
- PR unite (30g)
- 4
Descrizione
Description
There is an issue already for this bug #25798, but for some reason it has been closed even though it's not fixed yet. This issue should not be closed even if there is inactivity. It is a bug obviously.
This is a critical bug especially if there are multi-languages in the app, let's say an app with both Hebrew and Latin texts. For the Hebrew text you use "HebrewFont" and for Latin text you use "LatinFont", so you should be able to set the fontFamily to "HebrewFont, LatinFont"
Steps to reproduce
This line of code works fine:
<Text style={{ fontFamily: "sans-serif" }}>Hello</Text>
This line of code works fine too:
<Text style={{ fontFamily: "Roboto" }}>Hello</Text>
But this doesn't work:
<Text style={{ fontFamily: "Roboto, sans-serif" }}>Hello</Text>
React Native Version
0.76.2
Affected Platforms
Runtime - Android, Runtime - iOS
Output of npx react-native info
Any React Native Project!
Stacktrace or Logs
There are no logs related to this issue
Reproducer
Any React Native Project!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il riproduttore minimo React Native presente nell’issue e confronta i casi esistenti con un singolo font con fontFamily: "Roboto, sans-serif" su Android e iOS. Il lavoro è completato quando i font di fallback separati da virgole funzionano per il testo multilingue su entrambe le piattaforme interessate e il comportamento segnalato è coperto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react-native
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100