lib/src/main/java/com/norbsoft/typefacehelper/TypefaceHelper.java
private static void applyForView(View view, TypefaceCollection typefaceCollection) {

		if (view instanceof TextView) {
			TextView textView = (TextView) view;
			Typeface oldTypeface = textView.getTypeface();
			final int style = oldTypeface == null ? Typeface.NORMAL : oldTypeface.getStyle();
			textView.setTypeface(typefaceCollection.getTypeface(style));
			textView.setPaintFlags(textView.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
		}
	}
/**
	 * Apply typeface to single view
	 *
	 * @param view      to typeface typeface
	 * @param typefaceCollection typeface collection
	 */
Apply typeface to single view
@param view      to typeface typeface
@param typefaceCollection typeface collection
Apply typeface to single view @param view to typeface typeface @param typefaceCollection typeface collection
private static void applyForView(View view, TypefaceCollection typefaceCollection) {
		if (view instanceof TextView) {
			TextView textView = (TextView) view;
			Typeface oldTypeface = textView.getTypeface();
			final int style = oldTypeface == null ? Typeface.NORMAL : oldTypeface.getStyle();
			textView.setTypeface(typefaceCollection.getTypeface(style));
			textView.setPaintFlags(textView.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
		}
	}
private static void applyForView ( View view , TypefaceCollection typefaceCollection ) { if ( view instanceof TextView ) { TextView textView = ( TextView ) view ; Typeface oldTypeface = textView . getTypeface ( ) ; final int style = oldTypeface == null ? Typeface . NORMAL : oldTypeface . getStyle ( ) ; textView . setTypeface ( typefaceCollection . getTypeface ( style ) ) ; textView . setPaintFlags ( textView . getPaintFlags ( ) | Paint . SUBPIXEL_TEXT_FLAG ) ; } }
Apply typeface to single view
 @param view      to typeface typeface
 @param typefaceCollection typeface collection
Apply typeface to single view @param view to typeface typeface @param typefaceCollection typeface collection