mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-02 17:18:58 +08:00
Fix typeface getting applied recursively without new style
Differential Revision: D2643562 fb-gh-sync-id: 0db52c223d4941c89f2253bb3f4b2a5af8341ecf
This commit is contained in:
committed by
facebook-github-bot-3
parent
bdd0b4796a
commit
8ca22fc2df
@@ -11,9 +11,6 @@ package com.facebook.react.views.text;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Typeface;
|
||||
@@ -109,6 +106,9 @@ public class CustomStyleSpan extends MetricAffectingSpan {
|
||||
|
||||
if (family != null) {
|
||||
typeface = ReactFontManager.getInstance().getTypeface(family, want, assetManager);
|
||||
} else if (typeface != null) {
|
||||
// TODO(t9055065): Fix custom fonts getting applied to text children with different style
|
||||
typeface = Typeface.create(typeface, want);
|
||||
}
|
||||
|
||||
if (typeface != null) {
|
||||
|
||||
Reference in New Issue
Block a user