Sets the font.

@param mixed $font CINFont or int
173110
public function setFont($font) {
        if (is_int($font)) {
            if ($font === 0) {
                $font = null;
            } else {
                $font = new CINFontPhp($font);
            }
        }

        $this->font = $font;
    }
20080
public function setText($text) {
        $this->text = $text;
        $this->font->setText($this->text);
    }
556547
public void setLcdFont(final LcdFont FONT) {
        if (null == lcdFont) {
            _lcdFont = null == FONT ? LcdFont.DIGITAL_BOLD : FONT;
            fireUpdateEvent(RESIZE_EVENT);
        } else {
            lcdFont.set(FONT);
        }
    }
948949
public function setText($text)
    {

        if (!empty($text)) {
            $this->text = $text;
        } else if (isset($this->text)) {
            unset($this->text);
        }

    }
472244
public function setDefaultFont($default = null)
    {
        $old = $this->defaultFont;
        $this->defaultFont = $default;
        if ($default) {
            $this->value['font-family'] = $default;
        }
        return $old;
    }
117605
public function set_script($script) {
        if ($script == 1) {
            $this->format['font']['superScript'] = true;
        } else if ($script == 2) {
            $this->format['font']['subScript'] = true;
        } else {
            $this->format['font']['superScript'] = false;
            $this->format['font']['subScript'] = false;
        }
    }
136573
public function setFontSize(int $size): PdfInterface
    {
        $this->fontSize = (int) $size;
        $this->mpdf->SetDefaultFontSize($this->fontSize);

        return $this;
    }
56963
public function setText(string $text): void
    {
        $this->text = $text;

        if ( ! is_null($this->encode)) {
            $text = $this->encode->convert($text);

            // remember the conversion
            $this->convertedText = $text;
        }
    }
527254
public function setType($type)
	{
		if ($type === self::TYPE_CSS || $type === self::TYPE_JS)
			$this->_options['type'] = $type;
		else
			throw new Exception('Invalid type: '.$type);
	}
591036
public StyleSet setFont(Font font, boolean ignoreHead) {
		if(false == ignoreHead) {
			this.headCellStyle.setFont(font);
		}
		this.cellStyle.setFont(font);
		this.cellStyleForNumber.setFont(font);
		this.cellStyleForDate.setFont(font);
		return this;
	}
600977
def assignFont(self):
        
        font = self.currentFont()
        font.setFamily(self._fontPickerWidget.currentFamily())
        font.setPointSize(self._fontPickerWidget.pointSize())
        self.setCurrentFont(font)
601511
public function setFont($font) {
        if ($font === null) {
            throw new CINArgumentException('Font cannot be null.', 'font');
        }

        $this->font = clone $font;
        $this->font->setText($this->text);
        $this->font->setRotationAngle($this->rotationAngle);
        $this->font->setBackgroundColor($this->backgroundColor);
        $this->font->setForegroundColor($this->foregroundColor);
    }
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);
    }
973805
protected void setFont(Font newFont)
    {
        if (font == null || !font.equals(newFont))
        {
            font = new Font(newFont.getAttributes());
            invalidateCache();
            invalidateTextLayout();
        }
    }
170696
public function setTextFont($path)
    {
        if (!is_file($path) || !is_readable($path)) {
            throw new \InvalidArgumentException(
                'Unable to load font file at ' . $path
            );
        }

        $this->textFontPath = realpath($path);

        return $this;
    }
870964
public static function setFont( $object, $config )
	{
		$name	= self::getConfigValue( $config, 'font.name' );
		$type	= self::getConfigValue( $config, 'font.type', FS_NORMAL );
		$size	= self::getConfigValue( $config, 'font.size', 10 );
		if( $name )
			$object->setFont( $name, $type, $size );
	}
424105
public function setFontType(string $fontname = null): PdfInterface
    {
        /**
         * Font sets to be used for PDF documents:
         *
         *   - Arial           - Times             - Tahoma
         *   - Georgia         - Trebuchet         - Courier
         *   - Lucida          - Lucida-Bright     - Palatino
         *   - Garamond        - Verdana           - Console
         *   - Monaco          - Helvetica         - Calibri
         *   - Avant-Garde     - Cambria
         */
        $this->setProperty('fontType', $this->getFontFamily(strtolower($fontname)));
        $this->mpdf->SetDefaultBodyCSS('font-family', $this->getProperty('fontType'));

        return $this;
    }