Set the typeface to the all text views belong to the view group.
@param context the context.
@param layoutRes the layout resource id.
@param typefaceName typeface name.
@param style the typeface style.
@return the view.
8052
public View setTypeface(Context context, @LayoutRes int layoutRes, String typefaceName, int style) {
		return setTypeface(context, layoutRes, null, typefaceName, 0);
	}
381768
private void setUpTextView1(View view) {
        // Setup single span
        TextView tv1 = (TextView) view.findViewById(R.id.tv1);

        CharSequence formattedText1 = Trestle.getFormattedText(
                new Span.Builder("ForegroundSpan, BackgroundSpan, and CustomTypefaceSpan")
                        .foregroundColor(getContext(), R.color.purple_100)
                        .backgroundColor(getContext(), R.color.green_500)
                        .typeface(italicFont)
                        .build());

        tv1.setText(formattedText1);
    }
1295393
@Nullable
    public static ITypeface findFont(@NonNull Context ctx, @NonNull String key) {
        init(ctx);
        return FONTS.get(key);
    }
1310023
public static android.view.View createView(Context context, Class<?> screenType) {
    Layout screen = screenType.getAnnotation(Layout.class);
    if (screen == null) {
      throw new IllegalArgumentException(
          String.format("@%s annotation not found on class %s", Layout.class.getSimpleName(),
              screenType.getName()));
    }

    int layout = screen.value();
    return inflateLayout(context, layout);
  }
993065
public boolean addStylesFontFaceContainerStyle(final FontFaceContainerStyle ffcStyle) {
        final FontFace fontFace = ffcStyle.getFontFace();
        if (fontFace != null) {
            this.fontFaces.add(fontFace);
        }
        return this.addStylesStyle(ffcStyle);
    }
230430
public boolean addContentFontFaceContainerStyle(final FontFaceContainerStyle ffcStyle) {
        final FontFace fontFace = ffcStyle.getFontFace();
        if (fontFace != null) {
            this.fontFaces.add(fontFace);
        }
        return this.addContentStyle(ffcStyle);
    }
753053
protected void setFontName(String fontName) {
        this.fontName = fontName;
        if(document != null) {
            this.fontNumber = document.getDocumentHeader().getFontNumber(this);
        }
    }
732846
public void setDefaultTextFontFamilyName(String[] faces) {
		if ((faces != null) && (faces.length > 0))
			m_defaultTextFontFamilyNames = faces;
		else
			m_defaultTextFontFamilyNames = new String[] { "Dialog" };
		notifyListeners();
	}
484026
public void setStyle(final TableRowStyle rowStyle) {
        this.stylesContainer.addContentFontFaceContainerStyle(rowStyle);
        this.stylesContainer.addContentStyle(rowStyle);
        this.rowStyle = rowStyle;
    }
1034223
@NonNull
    public static Typeface obtainTypeface(@NonNull Context context, @NonNull TypedArray attrs) {
        if (attrs.hasValue(R.styleable.RobotoTextView_robotoTypeface)) {
            @RobotoTypeface int typefaceValue = attrs.getInt(R.styleable.RobotoTextView_robotoTypeface, TYPEFACE_ROBOTO_REGULAR);
            return obtainTypeface(context, typefaceValue);
        } else {
            @RobotoFontFamily int fontFamily = attrs.getInt(R.styleable.RobotoTextView_robotoFontFamily, FONT_FAMILY_ROBOTO);
            @RobotoTextWeight int textWeight = attrs.getInt(R.styleable.RobotoTextView_robotoTextWeight, TEXT_WEIGHT_NORMAL);
            @RobotoTextStyle int textStyle = attrs.getInt(R.styleable.RobotoTextView_robotoTextStyle, TEXT_STYLE_NORMAL);
            return obtainTypeface(context, fontFamily, textWeight, textStyle);
        }
    }
257730
private void layoutTextView(TextView tv) {
        final float fontScale = getResources().getConfiguration().fontScale;

        /*
         * Multiplier for padding based on phone density
         * Density of 2 does not need padding
         */
        final float densityMultiplier = getContext().getResources().getDisplayMetrics().density - 2;

        Rect bounds = new Rect();
        paintText.getTextBounds(tv.getText().toString().toCharArray(), 0, tv.getText().length(), bounds);
        tv.layout(0, 0, (int) ((bounds.width() + (33 * densityMultiplier)) * fontScale),
                (int) ((bounds.height() + (22 * densityMultiplier)) * fontScale));
    }
1361770
public void registerFont (String name, java.awt.Font font) {
    if (font == null) throw new NullPointerException();
    fonts.put(name, font);
  }
1313995
public void setLayout(java.lang.String layout) {
        getStateHelper().put(PropertyKeys.layout, layout);
    }
257848
void setTextFace(final int face) {
        int style = 0;
        if ((face & QuickDraw.TX_BOLD_MASK) > 0) {
            style |= Font.BOLD;
        }
        if ((face & QuickDraw.TX_ITALIC_MASK) > 0) {
            style |= Font.ITALIC;
        }

        // TODO: Other face options, like underline, shadow, etc...

        graphics.setFont(graphics.getFont().deriveFont(style));
    }
392246
private void setCustomTypeface(Context context, AttributeSet attrs) {
        DEFAULT_TYPEFACE = TypefaceType.getDefaultTypeface(context);

        //Typeface.createFromAsset doesn't work in the layout editor. Skipping...
        if (isInEditMode() || attrs == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
            return;
        }

        TypedArray styledAttrs = context.obtainStyledAttributes(attrs, R.styleable.TypefaceView);
        Integer fontInt = styledAttrs.getInt(R.styleable.TypefaceView_tv_typeface, DEFAULT_TYPEFACE);
        styledAttrs.recycle();

        mCurrentTypeface = TypefaceType.getTypeface(fontInt);
        Typeface typeface = getFont(context, mCurrentTypeface.getAssetFileName());
        setTypeface(typeface);
    }
445619
public void setText (int row, int column, Object text, int colSpan, String... styles)
    {
        setText(row, column, String.valueOf(text));
        if (colSpan > 0) {
            getFlexCellFormatter().setColSpan(row, column, colSpan);
        }
        setStyleNames(row, column, styles);
    }
1013550
public static void setFont(Font font, PropertyOwner propertyOwner, Map<String,Object> properties)
    {
        if (font != null)
        {
            ScreenUtil.setProperty(ScreenUtil.FONT_SIZE, Integer.toString(font.getSize()), propertyOwner,  properties);
            ScreenUtil.setProperty(ScreenUtil.FONT_STYLE, Integer.toString(font.getStyle()), propertyOwner,  properties);
            ScreenUtil.setProperty(ScreenUtil.FONT_NAME, font.getName(), propertyOwner,  properties);
        }
        else
        {
            ScreenUtil.setProperty(ScreenUtil.FONT_SIZE, null, propertyOwner,  properties);
            ScreenUtil.setProperty(ScreenUtil.FONT_STYLE, null, propertyOwner,  properties);
            ScreenUtil.setProperty(ScreenUtil.FONT_NAME, null, propertyOwner,  properties);
        }
    }