Sets the font.

@param newFont
the new font
973805
protected void setFont(Font newFont)
    {
        if (font == null || !font.equals(newFont))
        {
            font = new Font(newFont.getAttributes());
            invalidateCache();
            invalidateTextLayout();
        }
    }
53486
public void setDetailsFont(String font_family, int font_size) {
        this.detailsLabel
                .setStyle("-fx-font-family: \"" + font_family + "\";"
                        + "-fx-font-size:" + Integer.toString(font_size) + "px;");
    }
770266
protected function billetSetFont($font)
    {
        $f = static::FONTS[$font];
        $this->SetFont($f[0], $f[1], $f[2]);
        if (count($f) > 3) {
            $this->SetTextColor(...$f[3]);
        }
    }
219835
protected void setPropertiesFromAttributes(AttributeSet attr)
    {
        if (attr != null)
        {
            Font newFont = (Font) attr.getAttribute(Constants.ATTRIBUTE_FONT);
            if (newFont != null)
            {
                setFont(newFont);
            }
            else
            {
                // the font is the most important for us
                throw new IllegalStateException("Font can not be null !");
            }

            setForeground((Color) attr.getAttribute(Constants.ATTRIBUTE_FOREGROUND));
            setFontVariant((String) attr.getAttribute(Constants.ATTRIBUTE_FONT_VARIANT));

            @SuppressWarnings("unchecked")
            List<TextDecoration> attribute = (List<TextDecoration>) attr.getAttribute(Constants.ATTRIBUTE_TEXT_DECORATION);
            setTextDecoration(attribute);
        }
    }
1085340
public StyleSet setFont(short color, short fontSize, String fontName, boolean ignoreHead) {
		final Font font = StyleUtil.createFont(this.workbook, color, fontSize, fontName);
		return setFont(font, ignoreHead);
	}
957106
private void setNewButtonStyle(CmsPushButton newButton) {

        newButton.setImageClass(I_CmsButton.ADD_SMALL);
        newButton.setButtonStyle(ButtonStyle.FONT_ICON, null);
    }
95360
public void label(String text, Font font, double... coord) {
        Label label = new Label(text, coord);
        label.setFont(font);
        add(label);
    }
1193514
public void addFont(Font font) {
        if (font.getBaseFont() != null) {
            fonts.add(font);
            return;
        }
        BaseFont bf = font.getCalculatedBaseFont(true);
        Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
        fonts.add(f2);
    }
1155431
def set_plain_text_font(self, font, color_scheme=None):
        """"""
        self.plain_text.set_font(font, color_scheme=color_scheme)
744841
public void setMonthTypeFace(String fontName) {
        mMonthTypeFace = Typeface.createFromAsset(mContext.getAssets(), "fonts/" + fontName);
        mMonthTypeFaceSet = true;
    }
677182
public void setFont(Font font) {
		if (isInitialized) {
			dateEditor.getUiComponent().setFont(font);
			jcalendar.setFont(font);
		}
		super.setFont(font);
	}
795806
public void setFontStyle() {

        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(m_styleName)) {
            removeStyleName(m_styleName);
        }
        String id = new CmsUUID().getStringValue();
        m_styleName = CSS_CLASSNAME + "_" + id;
        addStyleName(m_styleName);
        String js = "var elements = document.getElementsByClassName('"
            + m_styleName
            + "');"
            + "var iframeContainer = elements[0];"
            + "var iframe = iframeContainer.getElementsByTagName('iframe')[0];"
            + "var iframeBody = iframe.contentDocument.getElementsByTagName('body')[0];"
            + "iframeBody.style.fontFamily='\"Open Sans\", sans-serif';";

        JavaScript.getCurrent().execute(js);

    }
289966
public function setFont(PHPRtfLite_Font $font)
    {
        $columns = $this->_table->getColumns();
        foreach ($columns as $i => $column) {
            $cell = $this->_table->getCell($this->_rowIndex, $column->getColumnIndex());
            $cell->setFont($font);
        }
    }
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);
	}
1125764
private static Font lookupDefaultDialogFont() {
        Font buttonFont = UIManager.getFont("Button.font");
        return buttonFont != null
                ? buttonFont
                : new JButton().getFont();
    }
753053
protected void setFontName(String fontName) {
        this.fontName = fontName;
        if(document != null) {
            this.fontNumber = document.getDocumentHeader().getFontNumber(this);
        }
    }
581195
public static void setFontSize(String inFontSize) {

        // weconsultants@users 20050215 - Changed for Compatbilty fix for JDK 1.3
        // Convert Strng to float for deriveFont() call
        Float stageFloat = new Float(inFontSize);
        float fontSize   = stageFloat.floatValue();
        Font  fonttTree  = fOwner.tTree.getFont().deriveFont(fontSize);

        fOwner.tTree.setFont(fonttTree);

        Font fontTxtCommand =
            fOwner.txtCommand.getFont().deriveFont(fontSize);

        fOwner.txtCommand.setFont(fontTxtCommand);

        Font fontTxtResult = fOwner.txtResult.getFont().deriveFont(fontSize);

        fOwner.txtResult.setFont(fontTxtResult);
    }