class | TCPDF_FONTS Font methods for TCPDF library. |
---|---|
package | com.tecnick.tcpdf |
version | 1.1.0 |
author | Nicola Asuni - info@tecnick.com |
_getfontpath(): string
public | static |
---|---|
string
_getTrueTypeFontSubset(string $font,array $subsetchars): string
author | Nicola Asuni |
---|---|
since | 5.2.000 (2010-06-02) |
public | static |
string
TrueType font data.
array
Array of used characters (the glyphs to keep).
string
A subset of TrueType font data without the unused glyphs.
_getTTFtableChecksum(string $table,integer $length): integer
author | Nicola Asuni |
---|---|
since | 5.2.000 (2010-06-02) |
public | static |
string
table to check
integer
length of table in bytes
integer
checksum
_putfontwidths(array $font,integer $cidoffset): string
author | Nicola Asuni |
---|---|
since | 4.4.000 (2008-12-07) |
public | static |
array
font data
integer
offset for CID values
string
PDF command string for font widths
addTTFfont(string $fontfile,string $fonttype = '',string $enc = '',integer $flags = 32,string $outpath = '',integer $platid = 3,integer $encid = 1,boolean $addcbbox = false,boolean $link = false): string|false
author | Nicola Asuni |
---|---|
since | 5.9.123 (2010-09-30) |
public | static |
string
Font file (full path).
string
Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional.
string
Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
integer
Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font.
string
Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
integer
Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
integer
Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4.
boolean
If true includes the character bounding box information on the php font file.
boolean
If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
string|false
TCPDF font name or boolean false in case of error.
arrUTF8ToUTF16BE(array $unicode,boolean $setbom = false): string
Encoding of a single character from an ISO 10646 character value to UTF-16 proceeds as follows. Let U be the character number, no greater than 0x10FFFF.
1) If U < 0x10000, encode U as a 16-bit unsigned integer and terminate.
2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF, U' must be less than or equal to 0xFFFFF. That is, U' can be represented in 20 bits.
3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and 0xDC00, respectively. These integers each have 10 bits free to encode the character value, for a total of 20 bits.
4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order bits of W1 and the 10 low-order bits of U' to the 10 low-order bits of W2. Terminate.
Graphically, steps 2 through 4 look like: U' = yyyyyyyyyyxxxxxxxxxx W1 = 110110yyyyyyyyyy W2 = 110111xxxxxxxxxx
protected | |
---|---|
author | Nicola Asuni |
since | 2.1.000 (2008-01-08) |
public | static |
array
array containing UTF-8 unicode values
boolean
if true set the Byte Order Mark (BOM = 0xFEFF)
string
getFontFullPath(string $file,string $fontdir = false): string
author | Nicola Asuni |
---|---|
since | 6.0.025 |
public | static |
string
Font file name.
string
Font directory (set to false fto search on default directories)
string
Font full path or empty string
getFontRefSize(string $size,float $refsize = 12): float
public | static |
---|
string
String containing font size value.
float
Reference font size in points.
float
value in points
getUniord(string $uch): integer
UTF8-octets = *( UTF8-char ) UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 UTF8-1 = %x00-7F UTF8-2 = %xC2-DF UTF8-tail
author | Nicola Asuni |
---|---|
public | static |
string
character string to process.
integer
Unicode value
UniArrSubString(array<mixed,string> $uniarr,integer $start = '',integer $end = ''): string
since | 4.5.037 (2009-04-07) |
---|---|
public | static |
array<mixed,string>
The input array of characters.
integer
the starting element of $strarr.
integer
first element that will not be returned.
string
Return part of a string
unichr(integer $c,boolean $unicode = true): string
since | 2.3.000 (2008-03-05) |
---|---|
public | static |
integer
UTF-8 value
boolean
True if we are in unicode mode, false otherwise.
string
Returns the specified character.
unichrASCII(integer $c): string
public | static |
---|
integer
UTF-8 value
string
Returns the specified character.
unichrUnicode(integer $c): string
public | static |
---|
integer
UTF-8 value
string
Returns the specified character.
uniord(string $uch): integer
public | static |
---|
string
character string to process.
integer
Unicode value
updateCIDtoGIDmap(string $map,integer $cid,integer $gid): string
author | Nicola Asuni |
---|---|
since | 5.9.123 (2011-09-29) |
public | static |
string
CIDToGIDMap.
integer
CID value.
integer
GID value.
string
CIDToGIDMap.
UTF8ArrayToUniArray(array $ta,boolean $isunicode = true): array
since | 4.5.037 (2009-04-07) |
---|---|
public | static |
array
The input array of UTF8 values.
boolean
True for Unicode mode, false otherwise.
array
Return array of unicode characters
UTF8ArrSubString(array<mixed,string> $strarr,integer $start = '',integer $end = '',boolean $unicode = true): string
public | static |
---|
array<mixed,string>
The input array of characters.
integer
the starting element of $strarr.
integer
first element that will not be returned.
boolean
True if we are in unicode mode, false otherwise.
string
Return part of a string
UTF8ArrToLatin1(array $unicode): string
author | Nicola Asuni |
---|---|
since | 4.8.023 (2010-01-15) |
public | static |
array
array containing UTF-8 unicode values
string
UTF8ArrToLatin1Arr(array $unicode): array
author | Nicola Asuni |
---|---|
since | 4.8.023 (2010-01-15) |
public | static |
array
array containing UTF-8 unicode values
array
utf8Bidi(array $ta,string $str,boolean $forcertl,boolean $isunicode,array &$currentfont): array
author | Nicola Asuni |
---|---|
since | 2.4.000 (2008-03-06) |
public | static |
array
array of characters composing the string.
string
string to process
boolean
if 'R' forces RTL, if 'L' forces LTR
boolean
True if the document is in Unicode mode, false otherwise.
array
Reference to current font array.
array
of unicode chars
utf8StrArrRev(array $arr,string $str,boolean $setbom,boolean $forcertl,boolean $isunicode,array &$currentfont): string
author | Nicola Asuni |
---|---|
since | 4.9.000 (2010-03-27) |
public | static |
array
array of unicode values.
string
string to manipulate (or empty value).
boolean
if true set the Byte Order Mark (BOM = 0xFEFF)
boolean
if true forces RTL text direction
boolean
True if the document is in Unicode mode, false otherwise.
array
Reference to current font array.
string
UTF8StringToArray(string $str,boolean $isunicode,array &$currentfont): array
author | Nicola Asuni |
---|---|
public | static |
string
string to process.
boolean
True when the documetn is in Unicode mode, false otherwise.
array
Reference to current font array.
array
containing codepoints (UTF-8 characters values)
utf8StrRev(string $str,boolean $setbom,boolean $forcertl,boolean $isunicode,array &$currentfont): string
author | Nicola Asuni |
---|---|
since | 2.1.000 (2008-01-08) |
public | static |
string
string to manipulate.
boolean
if true set the Byte Order Mark (BOM = 0xFEFF)
boolean
if true forces RTL text direction
boolean
True if the document is in Unicode mode, false otherwise.
array
Reference to current font array.
string
UTF8ToLatin1(string $str,boolean $isunicode,array &$currentfont): string
since | 3.2.000 (2008-06-23) |
---|---|
public | static |
string
string to process.
boolean
True when the documetn is in Unicode mode, false otherwise.
array
Reference to current font array.
string
UTF8ToUTF16BE(string $str,boolean $setbom,boolean $isunicode,array &$currentfont): string
author | Nicola Asuni |
---|---|
since | 1.53.0.TC005 (2005-01-05) |
public | static |
string
string to process.
boolean
if true set the Byte Order Mark (BOM = 0xFEFF)
boolean
True when the documetn is in Unicode mode, false otherwise.
array
Reference to current font array.
string
cache_uniord :
protected | |
---|---|