Allows an easy way to set current font

@param string $font Key for FONTS
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]);
        }
    }
1130354
protected function loadInternalFonts(): void
    {
        $path = \dirname(__DIR__) . '/BuiltIn/Resources/art-fonts/';
        $group = self::INTERNAL_GROUP;

        foreach (self::$internalFonts as $font) {
            $this->fonts[$group][$font] = $path . $font . '%s.txt';
        }

        $this->groups[$group] = $path;
    }
1182085
def choose_font(self, font=None):
        """"""
        fmt_widget = self.parent()
        if font is None:
            if self.current_font:
                font, ok = QFontDialog.getFont(
                    self.current_font, fmt_widget,
                    'Select %s font' % self.fmto_name,
                    QFontDialog.DontUseNativeDialog)
            else:
                font, ok = QFontDialog.getFont(fmt_widget)
            if not ok:
                return
        self.current_font = font
        properties = self.load_properties()
        properties.update(self.qfont_to_artist_props(font))
        fmt_widget.set_obj(properties)
        self.refresh()
1218769
def _update_font(self, textfont):
        

        try:
            fontface_id = self.fonts.index(textfont)
        except ValueError:
            fontface_id = 0

        self.font_choice_combo.Select(fontface_id)
510218
public static void setStyle() {

        int style = Font.PLAIN;

        if (ckbbold.isSelected()) {
            style |= Font.BOLD;
        }

        if (ckbitalic.isSelected()) {
            style |= Font.ITALIC;
        }

        fOwner.tTree.setFont(fOwner.txtCommand.getFont().deriveFont(style));
        fOwner.txtCommand.setFont(
            fOwner.txtCommand.getFont().deriveFont(style));
        fOwner.txtResult.setFont(
            fOwner.txtResult.getFont().deriveFont(style));
    }
1139384
public function setFontPath($fontPath)
    {
        if (is_file($fontPath)) {
            $this->fontTruetype = true;
            $this->fontPath = $fontPath;
        }

        return $this;
    }
183902
public function cloneFontFrom(&$pdf)
    {
        $this->n                = &$pdf->getN();
        $this->fonts            = &$pdf->getFonts();
        $this->FontFiles        = &$pdf->getFontFiles();
        $this->diffs            = &$pdf->getDiffs();
        $this->fontlist         = &$pdf->getFontList();
        $this->numfonts         = &$pdf->getNumFonts();
        $this->fontkeys         = &$pdf->getFontKeys();
        $this->font_obj_ids     = &$pdf->getFontObjIds();
        $this->annotation_fonts = &$pdf->getAnnotFonts();
    }
1007109
public function setFontColor($fontColor)
    {
        $this->fontColor = $fontColor;
        $this->hasSetFontColor = true;
        $this->shouldApplyFont = true;
        return $this;
    }
671695
def setFont(self, font):
        
        super(XSplitButton, self).setFont(font)
        self.rebuild()
628657
public void setFont(Font f) {
        if (f == null)
            return;
        if (onlyShapes) {
            font = f;
            return;
        }
        if (f == font)
            return;
        font = f;
        fontSize = f.getSize2D();
        baseFont = getCachedBaseFont(f);
    }
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)
1170625
private function createDeleteForm(Font $font)
    {
        return $this->createFormBuilder()
            ->setAction($this->generateUrl('coreextra_font_delete', array('id' => $font->getId())))
            ->setMethod('DELETE')
            ->getForm()
        ;
    }
417789
def set_font(self, font, option):
        """"""
        # Update fonts in all plugins
        set_font(font, option=option)
        plugins = self.main.widgetlist + self.main.thirdparty_plugins
        for plugin in plugins:
            plugin.update_font()
763478
public static function registerFonts($fonts = array())
    {
        if (empty($fonts))
            return;

        foreach ($fonts as $font) {
            Icon::registerIconFontSet($font);
        }
    }
1085548
def setFontItalic(self, state):
        
        font = self.currentFont()
        font.setItalic(state)
        self.setCurrentFont(font)
936432
public function set_underline($underline) {
        if ($underline == 1) {
            $this->format['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_SINGLE;
        } else if ($underline == 2) {
            $this->format['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_DOUBLE;
        } else {
            $this->format['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_NONE;
        }
    }
990229
function setFontFamily(fontFamily) {
        var editor = EditorManager.getCurrentFullEditor();

        if (currFontFamily === fontFamily) {
            return;
        }

        _removeDynamicFontFamily();
        if (fontFamily) {
            _addDynamicFontFamily(fontFamily);
        }

        exports.trigger("fontFamilyChange", fontFamily, currFontFamily);
        currFontFamily = fontFamily;
        prefs.set("fontFamily", fontFamily);

        if (editor) {
            editor.refreshAll();
        }
    }