private String resolveFontPath ( Context context , AttributeSet attrs ) { // Try view xml attributes String textViewFont = CalligraphyUtils . pullFontPathFromView ( context , attrs , mAttributeId ) ; // Try view style attributes if ( TextUtils . isEmpty ( textViewFont ) ) { textViewFont = CalligraphyUtils . pullFontPathFromStyle ( context , attrs , mAttributeId ) ; } // Try View TextAppearance if ( TextUtils . isEmpty ( textViewFont ) ) { textViewFont = CalligraphyUtils . pullFontPathFromTextAppearance ( context , attrs , mAttributeId ) ; } return textViewFont ; }
Resolving font path from xml attrs style attrs or text appearance