Documentation

Font
in package
implements ComparableInterface

\PhpOffice\PhpPresentation\Style\Font.

Interfaces, Classes and Traits

ComparableInterface
PhpOffice\PhpPresentation\ComparableInterface.

Table of Contents

FORMAT_COMPLEX_SCRIPT  = 'cs'
FORMAT_EAST_ASIAN  = 'ea'
FORMAT_LATIN  = 'latin'
UNDERLINE_DASH  = 'dash'
UNDERLINE_DASHHEAVY  = 'dashHeavy'
UNDERLINE_DASHLONG  = 'dashLong'
UNDERLINE_DASHLONGHEAVY  = 'dashLongHeavy'
UNDERLINE_DOTDOTDASH  = 'dotDotDash'
UNDERLINE_DOTDOTDASHHEAVY  = 'dotDotDashHeavy'
UNDERLINE_DOTHASH  = 'dotDash'
UNDERLINE_DOTHASHHEAVY  = 'dotDashHeavy'
UNDERLINE_DOTTED  = 'dotted'
UNDERLINE_DOTTEDHEAVY  = 'dottedHeavy'
UNDERLINE_DOUBLE  = 'dbl'
UNDERLINE_HEAVY  = 'heavy'
UNDERLINE_NONE  = 'none'
UNDERLINE_SINGLE  = 'sng'
UNDERLINE_WAVY  = 'wavy'
UNDERLINE_WAVYDOUBLE  = 'wavyDbl'
UNDERLINE_WAVYHEAVY  = 'wavyHeavy'
UNDERLINE_WORDS  = 'words'
$bold  : bool
Bold.
$characterSpacing  : float
Character Spacing.
$color  : Color
Foreground color.
$format  : string
Format
$hashIndex  : int
Hash index.
$italic  : bool
Italic.
$name  : string
Name.
$size  : int
Font Size.
$strikethrough  : bool
Strikethrough.
$subScript  : bool
Subscript.
$superScript  : bool
Superscript.
$underline  : string
Underline.
__construct()  : mixed
getCharacterSpacing()  : float
Get Character Spacing.
getColor()  : Color
Get Color.
getFormat()  : string
Get format
getHashCode()  : string
Get hash code.
getHashIndex()  : int|null
Get hash index.
getName()  : string
Get Name
getSize()  : int
Get Size.
getUnderline()  : string
Get Underline.
isBold()  : bool
Get Bold.
isItalic()  : bool
Get Italic.
isStrikethrough()  : bool
Get Strikethrough.
isSubScript()  : bool
isSuperScript()  : bool
Get SuperScript.
setBold()  : self
Set Bold.
setCharacterSpacing()  : self
Set Character Spacing Value in pt.
setColor()  : self
Set Color.
setFormat()  : self
Set format
setHashIndex()  : $this
Set hash index.
setItalic()  : self
Set Italic.
setName()  : self
Set Name
setSize()  : self
Set Size.
setStrikethrough()  : self
Set Strikethrough.
setSubScript()  : self
setSuperScript()  : self
Set SuperScript.
setUnderline()  : self
Set Underline.

Constants

FORMAT_COMPLEX_SCRIPT

public mixed FORMAT_COMPLEX_SCRIPT = 'cs'

FORMAT_EAST_ASIAN

public mixed FORMAT_EAST_ASIAN = 'ea'

FORMAT_LATIN

public mixed FORMAT_LATIN = 'latin'

UNDERLINE_DASH

public mixed UNDERLINE_DASH = 'dash'

UNDERLINE_DASHHEAVY

public mixed UNDERLINE_DASHHEAVY = 'dashHeavy'

UNDERLINE_DASHLONG

public mixed UNDERLINE_DASHLONG = 'dashLong'

UNDERLINE_DASHLONGHEAVY

public mixed UNDERLINE_DASHLONGHEAVY = 'dashLongHeavy'

UNDERLINE_DOTDOTDASH

public mixed UNDERLINE_DOTDOTDASH = 'dotDotDash'

UNDERLINE_DOTDOTDASHHEAVY

public mixed UNDERLINE_DOTDOTDASHHEAVY = 'dotDotDashHeavy'

UNDERLINE_DOTHASH

public mixed UNDERLINE_DOTHASH = 'dotDash'

UNDERLINE_DOTHASHHEAVY

public mixed UNDERLINE_DOTHASHHEAVY = 'dotDashHeavy'

UNDERLINE_DOTTED

public mixed UNDERLINE_DOTTED = 'dotted'

UNDERLINE_DOTTEDHEAVY

public mixed UNDERLINE_DOTTEDHEAVY = 'dottedHeavy'

UNDERLINE_DOUBLE

public mixed UNDERLINE_DOUBLE = 'dbl'

UNDERLINE_HEAVY

public mixed UNDERLINE_HEAVY = 'heavy'

UNDERLINE_NONE

public mixed UNDERLINE_NONE = 'none'

UNDERLINE_SINGLE

public mixed UNDERLINE_SINGLE = 'sng'

UNDERLINE_WAVY

public mixed UNDERLINE_WAVY = 'wavy'

UNDERLINE_WAVYDOUBLE

public mixed UNDERLINE_WAVYDOUBLE = 'wavyDbl'

UNDERLINE_WAVYHEAVY

public mixed UNDERLINE_WAVYHEAVY = 'wavyHeavy'

UNDERLINE_WORDS

public mixed UNDERLINE_WORDS = 'words'

Properties

$bold

Bold.

private bool $bold = false

$characterSpacing

Character Spacing.

private float $characterSpacing = 0

$format

Format

private string $format = self::FORMAT_LATIN

$hashIndex

Hash index.

private int $hashIndex

$italic

Italic.

private bool $italic = false

$name

Name.

private string $name = 'Calibri'

$size

Font Size.

private int $size = 10

$strikethrough

Strikethrough.

private bool $strikethrough = false

$subScript

Subscript.

private bool $subScript = false

$superScript

Superscript.

private bool $superScript = false

$underline

Underline.

private string $underline = self::UNDERLINE_NONE

Methods

__construct()

public __construct() : mixed
Return values
mixed

getCharacterSpacing()

Get Character Spacing.

public getCharacterSpacing() : float
Return values
float

getFormat()

Get format

public getFormat() : string
Return values
string

getHashCode()

Get hash code.

public getHashCode() : string
Return values
string

Hash code

getHashIndex()

Get hash index.

public getHashIndex() : int|null

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Return values
int|null

Hash index

getName()

Get Name

public getName() : string
Return values
string

getSize()

Get Size.

public getSize() : int
Return values
int

getUnderline()

Get Underline.

public getUnderline() : string
Return values
string

isBold()

Get Bold.

public isBold() : bool
Return values
bool

isItalic()

Get Italic.

public isItalic() : bool
Return values
bool

isStrikethrough()

Get Strikethrough.

public isStrikethrough() : bool
Return values
bool

isSubScript()

public isSubScript() : bool
Return values
bool

isSuperScript()

Get SuperScript.

public isSuperScript() : bool
Return values
bool

setBold()

Set Bold.

public setBold([bool $pValue = false ]) : self
Parameters
$pValue : bool = false
Return values
self

setCharacterSpacing()

Set Character Spacing Value in pt.

public setCharacterSpacing(float $pValue) : self
Parameters
$pValue : float
Return values
self

setColor()

Set Color.

public setColor(Color $pValue) : self
Parameters
$pValue : Color
Return values
self

setFormat()

Set format

public setFormat([string $value = self::FORMAT_LATIN ]) : self
Parameters
$value : string = self::FORMAT_LATIN
Return values
self

setHashIndex()

Set hash index.

public setHashIndex(int $value) : $this

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Parameters
$value : int

Hash index

Return values
$this

setItalic()

Set Italic.

public setItalic([bool $pValue = false ]) : self
Parameters
$pValue : bool = false
Return values
self

setName()

Set Name

public setName([string $pValue = 'Calibri' ]) : self
Parameters
$pValue : string = 'Calibri'
Return values
self

setSize()

Set Size.

public setSize([int $pValue = 10 ]) : self
Parameters
$pValue : int = 10
Return values
self

setStrikethrough()

Set Strikethrough.

public setStrikethrough([bool $pValue = false ]) : self
Parameters
$pValue : bool = false
Return values
self

setSubScript()

public setSubScript([bool $pValue = false ]) : self
Parameters
$pValue : bool = false
Return values
self

setSuperScript()

Set SuperScript.

public setSuperScript([bool $pValue = false ]) : self
Parameters
$pValue : bool = false
Return values
self

setUnderline()

Set Underline.

public setUnderline([string $pValue = self::UNDERLINE_NONE ]) : self
Parameters
$pValue : string = self::UNDERLINE_NONE

Underline type

Return values
self

Search results