1-
21/**
32 * Copyright (c) Facebook, Inc. and its affiliates.
43 *
@@ -36,20 +35,6 @@ public class CustomStyleSpan extends MetricAffectingSpan implements ReactSpan {
3635 private final int mStyle ;
3736 private final int mWeight ;
3837 private final @ Nullable String mFontFamily ;
39- private final @ Nullable String mFontPath ;
40-
41- public CustomStyleSpan (
42- int fontStyle ,
43- int fontWeight ,
44- @ Nullable String fontFamily ,
45- @ Nullable String fontPath ,
46- AssetManager assetManager ) {
47- mStyle = fontStyle ;
48- mWeight = fontWeight ;
49- mFontFamily = fontFamily ;
50- mFontPath = fontPath ;
51- mAssetManager = assetManager ;
52- }
5338
5439 public CustomStyleSpan (
5540 int fontStyle ,
@@ -59,18 +44,17 @@ public CustomStyleSpan(
5944 mStyle = fontStyle ;
6045 mWeight = fontWeight ;
6146 mFontFamily = fontFamily ;
62- mFontPath = null ;
6347 mAssetManager = assetManager ;
6448 }
6549
6650 @ Override
6751 public void updateDrawState (TextPaint ds ) {
68- apply (ds , mStyle , mWeight , mFontFamily , mFontPath , mAssetManager );
52+ apply (ds , mStyle , mWeight , mFontFamily , mAssetManager );
6953 }
7054
7155 @ Override
7256 public void updateMeasureState (@ NonNull TextPaint paint ) {
73- apply (paint , mStyle , mWeight , mFontFamily , mFontPath , mAssetManager );
57+ apply (paint , mStyle , mWeight , mFontFamily , mAssetManager );
7458 }
7559
7660 /**
@@ -94,19 +78,11 @@ public int getWeight() {
9478 return mFontFamily ;
9579 }
9680
97- /**
98- * Returns the font path set for this StyleSpan.
99- */
100- public @ Nullable String getFontPath () {
101- return mFontPath ;
102- }
103-
10481 private static void apply (
10582 Paint paint ,
10683 int style ,
10784 int weight ,
10885 @ Nullable String family ,
109- @ Nullable String path ,
11086 AssetManager assetManager ) {
11187 int oldStyle ;
11288 Typeface typeface = paint .getTypeface ();
0 commit comments