Code example for Typeface

Methods: getStyle

0
        FontType robotoFontType = null;
 
        if (originalTypeface == null) {
            robotoFontType = FontType.NORMAL;
        } else { 
            int style = originalTypeface.getStyle();
 
            switch (style) {
                case Typeface.BOLD:
                    robotoFontType = FontType.BOLD;
                    break; 
 
                case Typeface.BOLD_ITALIC:
                    robotoFontType = FontType.BOLD_ITALIC;
                    break; 
 
                case Typeface.ITALIC:
                    robotoFontType = FontType.ITALIC;
                    break; 
 
                case Typeface.NORMAL: