Font
in package
implements
ComparableInterface
\PhpOffice\PhpPresentation\Style\Font.
Table of Contents
Interfaces
- ComparableInterface
- PhpOffice\PhpPresentation\ComparableInterface.
Constants
- BASELINE_SUBSCRIPT = -250000
- BASELINE_SUPERSCRIPT = 300000
- CAPITALIZATION_ALL = 'all'
- CAPITALIZATION_NONE = 'none'
- CAPITALIZATION_SMALL = 'small'
- CHARSET_DEFAULT = 0x1
- FORMAT_COMPLEX_SCRIPT = 'cs'
- FORMAT_EAST_ASIAN = 'ea'
- FORMAT_LATIN = 'latin'
- STRIKE_DOUBLE = 'dblStrike'
- STRIKE_NONE = 'noStrike'
- STRIKE_SINGLE = 'sngStrike'
- 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'
Properties
- $baseline : int
- Baseline.
- $bold : bool
- Bold.
- $capitalization : string
- Capitalization.
- $characterSpacing : float
- Character Spacing.
- $charset : int
- Charset.
- $color : Color
- Foreground color.
- $format : string
- Format.
- $hashIndex : int
- Hash index.
- $italic : bool
- Italic.
- $name : string
- Name.
- $panose : string
- Panose.
- $pitchFamily : int
- Pitch Family.
- $size : int
- Font Size.
- $strikethrough : string
- Strikethrough.
- $underline : string
- Underline.
Methods
- __construct() : mixed
- getBaseline() : int
- Get Baseline.
- getCapitalization() : string
- Get Capitalization.
- getCharacterSpacing() : float
- Get Character Spacing.
- getCharset() : int
- Get charset.
- getColor() : Color
- Get Color.
- getFormat() : string
- Get format.
- getHashCode() : string
- Get hash code.
- getHashIndex() : null|int
- Get hash index.
- getName() : string
- Get Name.
- getPanose() : string
- Get panose.
- getPitchFamily() : int
- Get pitchFamily.
- getSize() : int
- Get Size.
- getStrikethrough() : string
- Get Strikethrough.
- getUnderline() : string
- Get Underline.
- isBold() : bool
- Get Bold.
- isItalic() : bool
- Get Italic.
- isStrikethrough() : bool
- Get Strikethrough.
- isSubScript() : bool
- Get SubScript.
- isSuperScript() : bool
- Get SuperScript.
- setBaseline() : self
- Set Baseline.
- setBold() : self
- Set Bold.
- setCapitalization() : self
- Set Capitalization.
- setCharacterSpacing() : self
- Set Character Spacing Value in pt.
- setCharset() : self
- Set charset.
- setColor() : self
- Set Color.
- setFormat() : self
- Set format.
- setHashIndex() : $this
- Set hash index.
- setItalic() : self
- Set Italic.
- setName() : self
- Set Name.
- setPanose() : self
- Set panose.
- setPitchFamily() : self
- Set pitchFamily.
- setSize() : self
- Set Size.
- setStrikethrough() : self
- Set Strikethrough.
- setSubScript() : self
- Set SubScript.
- setSuperScript() : self
- Set SuperScript.
- setUnderline() : self
- Set Underline.
Constants
BASELINE_SUBSCRIPT
public
mixed
BASELINE_SUBSCRIPT
= -250000
BASELINE_SUPERSCRIPT
public
mixed
BASELINE_SUPERSCRIPT
= 300000
CAPITALIZATION_ALL
public
mixed
CAPITALIZATION_ALL
= 'all'
CAPITALIZATION_NONE
public
mixed
CAPITALIZATION_NONE
= 'none'
CAPITALIZATION_SMALL
public
mixed
CAPITALIZATION_SMALL
= 'small'
CHARSET_DEFAULT
public
mixed
CHARSET_DEFAULT
= 0x1
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'
STRIKE_DOUBLE
public
mixed
STRIKE_DOUBLE
= 'dblStrike'
STRIKE_NONE
public
mixed
STRIKE_NONE
= 'noStrike'
STRIKE_SINGLE
public
mixed
STRIKE_SINGLE
= 'sngStrike'
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
$baseline
Baseline.
private
int
$baseline
= 0
$bold
Bold.
private
bool
$bold
= false
$capitalization
Capitalization.
private
string
$capitalization
= self::CAPITALIZATION_NONE
$characterSpacing
Character Spacing.
private
float
$characterSpacing
= 0
$charset
Charset.
private
int
$charset
= self::CHARSET_DEFAULT
$color
Foreground color.
private
Color
$color
$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'
$panose
Panose.
private
string
$panose
= ''
$pitchFamily
Pitch Family.
private
int
$pitchFamily
= 0
$size
Font Size.
private
int
$size
= 10
$strikethrough
Strikethrough.
private
string
$strikethrough
= self::STRIKE_NONE
$underline
Underline.
private
string
$underline
= self::UNDERLINE_NONE
Methods
__construct()
public
__construct() : mixed
getBaseline()
Get Baseline.
public
getBaseline() : int
Return values
intgetCapitalization()
Get Capitalization.
public
getCapitalization() : string
Return values
stringgetCharacterSpacing()
Get Character Spacing.
public
getCharacterSpacing() : float
Return values
floatgetCharset()
Get charset.
public
getCharset() : int
Return values
intgetColor()
Get Color.
public
getColor() : Color
Return values
ColorgetFormat()
Get format.
public
getFormat() : string
Return values
stringgetHashCode()
Get hash code.
public
getHashCode() : string
Return values
string —Hash code
getHashIndex()
Get hash index.
public
getHashIndex() : null|int
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
null|int —Hash index
getName()
Get Name.
public
getName() : string
Return values
stringgetPanose()
Get panose.
public
getPanose() : string
Return values
stringgetPitchFamily()
Get pitchFamily.
public
getPitchFamily() : int
Return values
intgetSize()
Get Size.
public
getSize() : int
Return values
intgetStrikethrough()
Get Strikethrough.
public
getStrikethrough() : string
Return values
stringgetUnderline()
Get Underline.
public
getUnderline() : string
Return values
stringisBold()
Get Bold.
public
isBold() : bool
Return values
boolisItalic()
Get Italic.
public
isItalic() : bool
Return values
boolisStrikethrough()
Get Strikethrough.
public
isStrikethrough() : bool
Use getStrikethrough
Return values
boolisSubScript()
Get SubScript.
public
isSubScript() : bool
getBaseline() === self::BASELINE_SUBSCRIPT
Return values
boolisSuperScript()
Get SuperScript.
public
isSuperScript() : bool
getBaseline() === self::BASELINE_SUPERSCRIPT
Return values
boolsetBaseline()
Set Baseline.
public
setBaseline(int $pValue) : self
Parameters
- $pValue : int
Return values
selfsetBold()
Set Bold.
public
setBold([bool $pValue = false ]) : self
Parameters
- $pValue : bool = false
Return values
selfsetCapitalization()
Set Capitalization.
public
setCapitalization([string $pValue = self::CAPITALIZATION_NONE ]) : self
Parameters
- $pValue : string = self::CAPITALIZATION_NONE
Return values
selfsetCharacterSpacing()
Set Character Spacing Value in pt.
public
setCharacterSpacing([float $pValue = 0 ]) : self
Parameters
- $pValue : float = 0
Return values
selfsetCharset()
Set charset.
public
setCharset(int $pValue) : self
Parameters
- $pValue : int
Return values
selfsetColor()
Set Color.
public
setColor(Color $pValue) : self
Parameters
- $pValue : Color
Return values
selfsetFormat()
Set format.
public
setFormat([string $value = self::FORMAT_LATIN ]) : self
Parameters
- $value : string = self::FORMAT_LATIN
Return values
selfsetHashIndex()
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
$thissetItalic()
Set Italic.
public
setItalic([bool $pValue = false ]) : self
Parameters
- $pValue : bool = false
Return values
selfsetName()
Set Name.
public
setName([string $pValue = 'Calibri' ]) : self
Parameters
- $pValue : string = 'Calibri'
Return values
selfsetPanose()
Set panose.
public
setPanose(string $pValue) : self
Parameters
- $pValue : string
Return values
selfsetPitchFamily()
Set pitchFamily.
public
setPitchFamily(int $pValue) : self
Parameters
- $pValue : int
Return values
selfsetSize()
Set Size.
public
setSize([int $pValue = 10 ]) : self
Parameters
- $pValue : int = 10
Return values
selfsetStrikethrough()
Set Strikethrough.
public
setStrikethrough([bool|string $pValue = false ]) : self
$pValue as boolean
Parameters
- $pValue : bool|string = false
Return values
selfsetSubScript()
Set SubScript.
public
setSubScript([bool $pValue = false ]) : self
setBaseline(self::BASELINE_SUBSCRIPT)
Parameters
- $pValue : bool = false
Return values
selfsetSuperScript()
Set SuperScript.
public
setSuperScript([bool $pValue = false ]) : self
setBaseline(self::BASELINE_SUPERSCRIPT)
Parameters
- $pValue : bool = false
Return values
selfsetUnderline()
Set Underline.
public
setUnderline([string $pValue = self::UNDERLINE_NONE ]) : self
Parameters
- $pValue : string = self::UNDERLINE_NONE
-
Underline type