Fix typeface getting applied recursively without new style

Differential Revision: D2643562

fb-gh-sync-id: 0db52c223d4941c89f2253bb3f4b2a5af8341ecf
This commit is contained in:
Andrei Coman 2015-11-11 13:06:05 -08:00 committed by facebook-github-bot-3
parent bdd0b4796a
commit 8ca22fc2df
1 changed files with 3 additions and 3 deletions

View File

@ -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) {