Applies font to provided TextView.<br/>
Note: this class will only accept fonts under <code>fonts/</code> directory
and fonts starting with <code>font:</code> prefix.
13256
public static void apply(@NonNull TextView textView, @StringRes int fontStringId) {
        apply(textView, textView.getContext().getString(fontStringId));
    }
12772
@Override
    protected void apply(TextView view, TypedArray typedArray) {
        String typefacePath = typedArray.getString(R.styleable.FontDecorator_decorTypefaceAsset);
        if(typefacePath == null) return;
        view.setTypeface(Typeface.createFromAsset(
                view.getResources().getAssets(), typefacePath));
    }
973805
protected void setFont(Font newFont)
    {
        if (font == null || !font.equals(newFont))
        {
            font = new Font(newFont.getAttributes());
            invalidateCache();
            invalidateTextLayout();
        }
    }
243328
public void setFont(Font font) {
		if (days != null) {
			for (int i = 0; i < 49; i++) {
				days[i].setFont(font);
			}
		}
		if (weeks != null) {
			for (int i = 0; i < 7; i++) {
				weeks[i].setFont(font);
			}
		}
	}
669908
@Nonnull
  public ExcelStyle setFont (@Nonnull final Font aFont)
  {
    ValueEnforcer.notNull (aFont, "Font");
    return setFontIndex (aFont.getIndexAsInt ());
  }
42549
public function apply()
    {
        $fonts = $this->getOnFonts($this->config->getArrayCopy());
        $url = $this->fontsUrl($fonts);
        $this->enqueue($url);
    }
57249
public static void applyStyle(Element element, Style style) {
		if (style != null && element != null) {
			if (style instanceof ShapeStyle) {
				applyShapeStyle(element, (ShapeStyle) style);
			} else if (style instanceof FontStyle) {
				FontStyle fontStyle = (FontStyle) style;
				element.getStyle().setProperty("fontSize", "" + fontStyle.getFontSize());
				element.getStyle().setProperty("color", fontStyle.getFillColor());
				element.getStyle().setProperty("fontFamily", fontStyle.getFontFamily());
				element.getStyle().setProperty("fontWeight", fontStyle.getFontWeight());
				element.getStyle().setProperty("fontStyle", fontStyle.getFontStyle());
			} else if (style instanceof PictureStyle) {
				PictureStyle picturStyle = (PictureStyle) style;
				if (SC.isIE()) { //TODO: it's a VML decoder, why make this check?
					element.getStyle().setProperty("filter", "alpha(opacity=" + 100 * picturStyle.getOpacity() + ")");
				} else {
					element.setAttribute("style", "opacity:" + picturStyle.getOpacity() + ";");
				}
			}
		}
	}
1140292
public <V extends TextView> void setTypeface(V view, String typefaceName) {
		Typeface typeface = mCache.get(typefaceName);
		view.setTypeface(typeface);
	}
73602
public static void apply(TextView textView, Face type){
        // First check for existing typefaces
        Typeface typeface = getTypeface(textView.getContext(), type);
        if (typeface != null)
            textView.setTypeface(typeface);
    }
1207148
protected void applyStyle(TextFormatting format)
	{
		if (format == TextFormatting.RESET)
		{
			FontOptions fontOptions = styles.getFirst();
			styles.clear();
			styles.add(fontOptions);
			return;
		}

		FontOptionsBuilder builder = currentStyle().toBuilder();
		builder.styles(format);
		styles.add(builder.build());
	}
577818
@NonNull
    public static Spanned style(@NonNull Context ctx,
                                @Nullable HashMap<String, ITypeface> fonts,
                                @NonNull Spanned textSpanned,
                                @Nullable List<CharacterStyle> styles,
                                @Nullable HashMap<String, List<CharacterStyle>> stylesFor) {
        fonts = init(ctx, fonts);

        //find all icons which should be replaced with the iconFont
        TextStyleContainer textStyleContainer = IconicsUtils.findIcons(textSpanned, fonts);

        //create spannableString to set the spans on
        SpannableString sb = SpannableString.valueOf(textStyleContainer.spannableStringBuilder);

        //set all the icons and styles
        IconicsUtils.applyStyles(ctx, sb, textStyleContainer.styleContainers, styles, stylesFor);

        return sb;
    }
227453
void setSelectedFont(Font font) {
    this.selectedFont = font;
    fontNameList.setSelectedValue(font.getFamily(), true);
    fontStyleList.setSelectedValue(getStyle(font), true);
    fontSizeList.setSelectedValue(font.getSize(), true);
  }
468007
@Override
	public void setPrefix(final String prefixString) {
		lock.writeLock().lock();
		try {
			if (prefixString == null || StringUtils.isBlank(prefixString)) {
				localPrefix.remove();
			} else {
				if (prefixes != null) {
					if (!prefixes.contains(prefixString)) {
						throw new IllegalArgumentException("The given prefix is not part of the prefixes.");
					}
				}
				localPrefix.set(prefixString);
			}
		} finally {
			lock.writeLock().unlock();
		}
	}
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);
    }
1285389
public void applyStyle(Element element, Style style) {
		if (element != null && style != null) {
			switch (namespace) {
				case VML:
					VmlStyleUtil.applyStyle(element, style);
					break;
				case SVG:
					if (style instanceof ShapeStyle) {
						applySvgStyle(element, (ShapeStyle) style);
					} else if (style instanceof FontStyle) {
						applySvgStyle(element, (FontStyle) style);
					} else if (style instanceof PictureStyle) {
						applySvgStyle(element, (PictureStyle) style);
					}
					break;
				case HTML:
					if (style instanceof ShapeStyle) {
						applyHtmlStyle(element, (ShapeStyle) style);
					} else if (style instanceof FontStyle) {
						applyHtmlStyle(element, (FontStyle) style);
					} else if (style instanceof PictureStyle) {
						applyHtmlStyle(element, (PictureStyle) style);
					}
					break;
			}
		}
	}
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);
        }
    }
753053
protected void setFontName(String fontName) {
        this.fontName = fontName;
        if(document != null) {
            this.fontNumber = document.getDocumentHeader().getFontNumber(this);
        }
    }