public static Typeface getTypeface(Map<String, Typeface> typefaceMap, String fontFamily, String fontStyle, String fontVariant, int fontWeight) { Typeface ref = typefaceMap.get(fontFamily); if (ref == null) return getTypeface(fontFamily, getTypefaceStyle(fontStyle, fontVariant, fontWeight)); return Typeface.create(ref, FontUtils.getTypefaceStyle(fontStyle, fontVariant, fontWeight)); }
public static Typeface getTypeface(String fontFamily, String fontStyle, String fontVariant, int fontWeight) { return getTypeface(fontFamily, getTypefaceStyle(fontStyle, fontVariant, fontWeight)); }
public static Typeface getTypeface(Style style) { return getTypeface(style.getFontFamily(), getTypefaceStyle(style)); }
public static int getTypefaceStyle(Style style) { return getTypefaceStyle(style.getFontStyle(), style.getFontVariant(), style.getFontWeight()); }
int typefaceStyle = FontUtils.getTypefaceStyle(style); String fontFamily = style.getFontFamily(); int fontSize = Math.round(y_mm2px(style.getFontSize()));