mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-06 00:12:21 +00:00
[android] Fix dynamically loaded font compatibility
Fixes #905 Adds support for react-native-dynamic-fonts
This commit is contained in:
@@ -26,6 +26,7 @@ import android.view.ViewParent;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.views.text.ReactFontManager;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -929,7 +930,7 @@ class TSpanView extends TextView {
|
||||
typeface = Typeface.createFromAsset(assetManager, path);
|
||||
} catch (Exception ignored2) {
|
||||
try {
|
||||
typeface = Typeface.create(fontFamily, fontStyle);
|
||||
typeface = ReactFontManager.getInstance().getTypeface(fontFamily, fontStyle, assetManager);
|
||||
} catch (Exception ignored3) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user