Sets the Font of this Text.

@param font The Font of the Text.
340096
public final void setFont(Font font) {
        this.font = font;
        textRenderer = new TextRenderer(font.getAWTFont(), true, true);
    }
201632
private static int fontStyleToInt(FontStyle style) {
        switch (style) {
        case PLAIN:
            return java.awt.Font.PLAIN;
        case BOLD:
            return java.awt.Font.BOLD;
        case ITALIC:
            return java.awt.Font.ITALIC;
        default:
            return java.awt.Font.PLAIN;
        }
    }
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);
			}
		}
	}
163512
def setFont(self, font):
        
        super(XTimeEdit, self).setFont(font)

        # update the fonts for the time combos
        self._hourCombo.setFont(font)
        self._minuteCombo.setFont(font)
        self._secondCombo.setFont(font)
        self._timeOfDayCombo.setFont(font)
892265
def set_font(self, font):
        """"""
        self.setFont(font)
        self.set_pythonshell_font(font)
        cursor = self.textCursor()
        cursor.select(QTextCursor.Document)
        charformat = QTextCharFormat()
        charformat.setFontFamily(font.family())
        charformat.setFontPointSize(font.pointSize())
        cursor.mergeCharFormat(charformat)
916161
public FontChooser setSelectedFont(Font font) {
        setSelectedFontFamily(font.getFamily());
        setSelectedFontStyle(font.getStyle());
        setSelectedFontSize(font.getSize());
        return this;
    }
5692
def set_font_size(self, pt=None, px=None):
        """"""
        self.font.set_size(pt, px)

        self._render()
13256
public static void apply(@NonNull TextView textView, @StringRes int fontStringId) {
        apply(textView, textView.getContext().getString(fontStringId));
    }
994253
public void fontSelection() {
        
        FontChooserPanel panel = new FontChooserPanel(textFont);
        int result
                = JOptionPane.showConfirmDialog(
                        this, panel, "Font Selection",
                        JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE
                );
        
        if (result == JOptionPane.OK_OPTION) {
            textFont = panel.getSelectedFont();
            
        }
    }
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;
                }
            }

        }
    }
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;");
    }
516981
public void setDateTypeFace(String fontName) {
        mDateTypeFace = Typeface.createFromAsset(mContext.getAssets(), "fonts/" + fontName);
        mDateTypeFaceSet = true;
    }
766780
public function setFont($font) {

		if(false === is_string($font)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($font)), E_USER_ERROR);
		}

		$file = new File($font);

		if(false === $file -> exists()) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be an existing font', __METHOD__), E_USER_ERROR);
		}

		$this -> font = $file;

		return $this;
	}
1113081
public void setFontOptions(FontOptions fontOptions)
	{
		checkNotNull(fontOptions);
		buildLines = this.fontOptions.isBold() != fontOptions.isBold() || this.fontOptions.getFontScale() != fontOptions.getFontScale();
		this.fontOptions = fontOptions;
	}
227453
void setSelectedFont(Font font) {
    this.selectedFont = font;
    fontNameList.setSelectedValue(font.getFamily(), true);
    fontStyleList.setSelectedValue(getStyle(font), true);
    fontSizeList.setSelectedValue(font.getSize(), true);
  }
46473
public void setText(String strText)
    {
        if ((strText == null) || (strText.length() == 0))
        {
            if (!m_bInFocus)
            {
                strText = m_strDescription;
                this.changeFont(true);
            }
        }
        else
            this.changeFont(false);
        super.setText(strText);
    }
173110
public function setFont($font) {
        if (is_int($font)) {
            if ($font === 0) {
                $font = null;
            } else {
                $font = new CINFontPhp($font);
            }
        }

        $this->font = $font;
    }