react / react/react-native

Setting Fallback Fonts in FontFamily Styling is Not Supported

オープン
#48,625 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Author Feedback Needs: Repro Needs: Version Info Never gets stale
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

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!

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue にある最小限の React Native 再現コードから始め、Android と iOS で、単一フォントを使用する既存のケースと fontFamily: "Roboto, sans-serif" を比較します。両方の対象プラットフォームで、多言語テキストに対してカンマ区切りのフォールバックフォントが機能し、報告された動作をカバーするテストがあることが完了の条件です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。