Font extends Load
in package
Com\Tecnick\Pdf\Font\Font
Tags
Table of Contents
Methods
- __construct() : mixed
- Load an imported font
- getFontData() : TFontData
- Get the font data
- getFontkey() : string
- Get the font key
- load() : void
- Load the font data
- setFileData() : void
Methods
__construct()
Load an imported font
public __construct(string $font[,
string $style
= ''
][,
string $ifile
= ''
][,
bool $subset
= false
][,
bool $unicode
= true
][,
bool $pdfa
= false
][,
bool $compress
= true
]) : mixed
The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined.
Parameters
- $font : string
-
Font family. If it is a standard family name, it will override the corresponding font.
- $style : string = ''
-
Font style. Possible values are (case insensitive): regular (default) B: bold I: italic U: underline D: strikeout (linethrough) O: overline
- $ifile : string = ''
-
The font definition file (or empty for autodetect). By default, the name is built from the family and style, in lower case with no spaces.
- $subset : bool = false
-
If true embedd only a subset of the font (stores only the information related to the used characters); If false embedd full font; This option is valid only for TrueTypeUnicode fonts and it is disabled for PDF/A. If you want to enable users to modify the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only a subset.
- $unicode : bool = true
-
True if we are in Unicode mode, False otherwhise.
- $pdfa : bool = false
-
True if we are in PDF/A mode.
- $compress : bool = true
-
Set to false to disable stream compression.
Tags
getFontData()
Get the font data
public getFontData()
: TFontData
Return values
TFontDatagetFontkey()
Get the font key
public getFontkey()
: string
Return values
stringload()
Load the font data
public load()
: void
Tags
setFileData()
public setFileData()
: void