Use the paid 'regular' font of FontAwesome 5. As a side effect, every FontAwesome icon on the same page is switched to FontAwesome 5.2.0. By default, the icon set is the older version 4.7.0. <P>
Usually this method is called internally by the JSF engine.
334988
public void setIconRegular(boolean _iconRegular) {
		if (_iconRegular) {
			AddResourcesListener.setFontAwesomeVersion(5, this);
		}
		getStateHelper().put(PropertyKeys.iconRegular, _iconRegular);
	}
139187
private boolean isFontAwesomeComponentUsedAndRemoveIt() {
		FacesContext fc = FacesContext.getCurrentInstance();
		UIViewRoot viewRoot = fc.getViewRoot();
		ListIterator<UIComponent> resourceIterator = (viewRoot.getComponentResources(fc, "head")).listIterator();
		UIComponent fontAwesomeResource = null;
		while (resourceIterator.hasNext()) {
			UIComponent resource = resourceIterator.next();
			String name = (String) resource.getAttributes().get("name");
			// rw.write("\n<!-- res: '"+name+"' -->" );
			if (name != null) {
				if (name.endsWith("font-awesome.css"))
					fontAwesomeResource = resource;
			}
		}
		if (null != fontAwesomeResource) {
			fontAwesomeResource.setInView(false);
			viewRoot.removeComponentResource(fc, fontAwesomeResource);
			// System.out.println("-3" + fontAwesomeResource.getClientId());
			return true;
		}
		return false;
	}
935986
public BaseFont awtToPdf(Font font) {
        try {
            BaseFontParameters p = getBaseFontParameters(font.getFontName());
            if (p != null)
                return BaseFont.createFont(p.fontName, p.encoding, p.embedded, p.cached, p.ttfAfm, p.pfb);
            String fontKey = null;
            String logicalName = font.getName();

            if (logicalName.equalsIgnoreCase("DialogInput") || logicalName.equalsIgnoreCase("Monospaced") || logicalName.equalsIgnoreCase("Courier")) {

                if (font.isItalic()) {
                    if (font.isBold()) {
                        fontKey = BaseFont.COURIER_BOLDOBLIQUE;

                    } else {
                        fontKey = BaseFont.COURIER_OBLIQUE;
                    }

                } else {
                    if (font.isBold()) {
                        fontKey = BaseFont.COURIER_BOLD;

                    } else {
                        fontKey = BaseFont.COURIER;
                    }
                }

            } else if (logicalName.equalsIgnoreCase("Serif") || logicalName.equalsIgnoreCase("TimesRoman")) {

                if (font.isItalic()) {
                    if (font.isBold()) {
                        fontKey = BaseFont.TIMES_BOLDITALIC;

                    } else {
                        fontKey = BaseFont.TIMES_ITALIC;
                    }

                } else {
                    if (font.isBold()) {
                        fontKey = BaseFont.TIMES_BOLD;

                    } else {
                        fontKey = BaseFont.TIMES_ROMAN;
                    }
                }

            } else {  // default, this catches Dialog and SansSerif

                if (font.isItalic()) {
                    if (font.isBold()) {
                        fontKey = BaseFont.HELVETICA_BOLDOBLIQUE;

                    } else {
                        fontKey = BaseFont.HELVETICA_OBLIQUE;
                    }

                } else {
                    if (font.isBold()) {
                        fontKey = BaseFont.HELVETICA_BOLD;
                    } else {
                        fontKey = BaseFont.HELVETICA;
                    }
                }
            }
            return BaseFont.createFont(fontKey, BaseFont.CP1252, false);
        }
        catch (Exception e) {
            throw new ExceptionConverter(e);
        }
    }
134740
@SuppressWarnings("WeakerAccess")
	public void registerFont(String fontName, File fontFile) {
		if (!fontFile.exists())
			throw new IllegalArgumentException("Font " + fontFile + " does not exist!");
		FontEntry entry = new FontEntry();
		entry.overrideName = fontName;
		entry.file = fontFile;
		fontFiles.add(entry);
	}
1186031
function () {
            var messageTypes = this.data.messageTypes;
            var res = this.DEFAULT_ICON;
            var icons = this.ICONS;
            for (var i = 0, l = icons.length; i < l; i++) {
                var curIcon = icons[i];
                if (messageTypes[curIcon.type] > 0) {
                    res = curIcon.icon;
                    break;
                }
            }
            return res;
        }
1071083
function(){
		var isgothic = this.puzzle.getConfig('font')===1;
		if(this.puzzle.pzpr.env.OS.Android){
			this.fontfamily = (isgothic ? 'Helvetica, Verdana, Arial, ' : '"Times New Roman", ');
		}
		else{ this.fontfamily = '';}
		this.fontfamily += (isgothic ? 'sans-serif' : 'serif');
	}
566576
private void setDefaultValues() {

        //Setup icon
        m_icon.setContentMode(ContentMode.HTML);
        m_icon.setValue(FontOpenCms.WARNING.getHtml());

        //Set Mode option.
        m_mode.setValue("keysAndVariations");
    }
701531
@NonNull
    public IconicsDrawable iconText(@NonNull String icon, @Nullable Typeface typeface) {
        mPlainIcon = icon;
        mIcon = null;
        mIconBrush.getPaint().setTypeface(typeface == null ? Typeface.DEFAULT : typeface);

        invalidateSelf();
        return this;
    }
25438
public static Font getFont (Font font, Size size) {
		float s;
		switch (size) {
		case smallest:		s = (float) (font.getSize() * 0.5); break;
		case much_smaller:	s = (float) (font.getSize() * 0.7); break;
		case smaller:		s = (float) (font.getSize() * 0.8); break;
		case standard:		s = (float) font.getSize(); break;
		case larger:		s = (float) (font.getSize() * 1.5); break;
		case much_larger:	s = (float) (font.getSize() * 3); break;
		case huge:			s = (float) (font.getSize() * 4); break;
		default: 			s = (float) (font.getSize()); break;
		}
		return font.deriveFont(s);
	}
235450
function font() {
  return src([`${svgDir}/*.svg`])
    .pipe(
      iconfontCss({
        fontName: config.name,
        path: template,
        targetPath: '../src/index.less',
        normalize: true,
        firstGlyph: 0xf000,
        cssClass: fontName // this is a trick to pass fontName to template
      })
    )
    .pipe(
      iconfont({
        fontName,
        formats
      })
    )
    .pipe(dest(srcDir));
}
1144321
private String fontAvailable(String family, String[] avail)
    {
        for (int i = 0; i < avail.length; i++)
            if (avail[i].equalsIgnoreCase(family)) return avail[i];
        return null;
    }
209285
private void encodeIcon(final FacesContext context, final SlideOut slideOut) throws IOException {
        if (slideOut.getIcon() == null) {
            return;
        }

        // fontawesome icons are OK but themeroller we need to add styles
        String icon = slideOut.getIcon().trim();
        if (icon.startsWith("ui")) {
            icon = "ui-icon " + icon + " ui-slideouttab-icon";
        }

        // <i class="ui-icon fa fa-television"></i>
        final ResponseWriter writer = context.getResponseWriter();
        writer.startElement("span", null);
        writer.writeAttribute("class", icon, null);
        writer.endElement("span");
        writer.write(" ");
    }
748545
@Override
	public void resetTheme() {
		if (this.currentTheme != null && this.currentTheme.getIconFont() != null) {
			this.icons = this.currentTheme.getIconFont();
		} else if (this.defaultTheme.getIconFont() != null) {
			this.icons = this.defaultTheme.getIconFont();
		}
		if (this.icons != null) {
			this.getHead().appendChild(this.icons.getLink());
		}
		this.insertLinks(this.defaultTheme);
		this.insertLinks(this.currentTheme);
	}
1125764
private static Font lookupDefaultDialogFont() {
        Font buttonFont = UIManager.getFont("Button.font");
        return buttonFont != null
                ? buttonFont
                : new JButton().getFont();
    }
1005864
public static Typeface getFont(Context context, String fontName) {
        synchronized (cache) {
            if (!cache.containsKey(fontName)) {
                try {
                    Typeface t = Typeface.createFromAsset(context.getAssets(), fontName);
                    cache.put(fontName, t);
                } catch (Exception e) {
                    return null;
                }
            }
            return cache.get(fontName);
        }
    }
1306227
private static IconSet resolveIconSet(String iconCode) {
        CharSequence unicode;

        for (IconSet set : getRegisteredIconSets()) {

            if (set.fontPath().equals(FontAwesome.FONT_PATH) || set.fontPath().equals(Typicon.FONT_PATH) || set.fontPath().equals(MaterialIcons.FONT_PATH)) {
                continue; // already checked previously, ignore
            }

            unicode = set.unicodeForKey(iconCode);

            if (unicode != null) {
                return set;
            }
        }

        String message = String.format("Could not find FontIcon value for '%s', " +
                "please ensure that it is mapped to a valid font", iconCode);

        throw new IllegalArgumentException(message);
    }
1312966
protected void setFontVariant(String newFontVariant)
    {
        if (fontVariant == null || !fontVariant.equals(newFontVariant))
        {
            FontVariant val[] = FontVariant.values();

            for (FontVariant aVal : val)
            {
                if (aVal.toString().equals(newFontVariant))
                {
                    fontVariant = newFontVariant;
                    invalidateCache();
                    return;
                }
            }

        }
    }