classes-Com-Tecnick-Pdf-Font-Font

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Font extends Load

in package

Com\Tecnick\Pdf\Font\Font

Tags
since
2011-05-23
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2011-2024 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-pdf-font
phpstan-import-type

TFontData from Load

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
throws
Exception

in case of error

getFontData()

Get the font data

public getFontData() : TFontData
Return values
TFontData

getFontkey()

Get the font key

public getFontkey() : string
Return values
string

load()

Load the font data

public load() : void
Tags
throws
Exception

in case of error

setFileData()

public setFileData() : void
On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy