classTCPDF__FONTS

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.

Static Public Member Functions

static addTTFfont ($fontfile, $fonttype=“, $enc=”, $flags=32, $outpath=“, $platid=3, $encid=1, $addcbbox=false, $link=false)
 
static _getTTFtableChecksum ($table, $length)
 
static _getTrueTypeFontSubset ($font, $subsetchars)
 
static _putfontwidths ($font, $cidoffset=0)
 
static unichr ($c, $unicode=true)
 
static unichrUnicode ($c)
 
static unichrASCII ($c)
 
static arrUTF8ToUTF16BE ($unicode, $setbom=false)
 
static UTF8ArrayToUniArray ($ta, $isunicode=true)
 
static UTF8ArrSubString ($strarr, $start=“, $end=”, $unicode=true)
 
static UniArrSubString ($uniarr, $start=“, $end=”)
 
static updateCIDtoGIDmap ($map, $cid, $gid)
 
static _getfontpath ()
 
static getFontFullPath ($file, $fontdir=false)
 
static UTF8ArrToLatin1Arr ($unicode)
 
static UTF8ArrToLatin1 ($unicode)
 
static uniord ($uch)
 
static getUniord ($uch)
 
static UTF8StringToArray ($str, $isunicode=true, &$currentfont)
 
static UTF8ToLatin1 ($str, $isunicode=true, &$currentfont)
 
static UTF8ToUTF16BE ($str, $setbom=false, $isunicode=true, &$currentfont)
 
static utf8StrRev ($str, $setbom=false, $forcertl=false, $isunicode=true, &$currentfont)
 
static utf8StrArrRev ($arr, $str=“, $setbom=false, $forcertl=false, $isunicode=true, &$currentfont)
 
static utf8Bidi ($ta, $str=“, $forcertl=false, $isunicode=true, &$currentfont)
 
static getFontRefSize ($size, $refsize=12)
 
static addTTFfont ($fontfile, $fonttype=“, $enc=”, $flags=32, $outpath=“, $platid=3, $encid=1, $addcbbox=false, $link=false)
 
static _getTTFtableChecksum ($table, $length)
 
static _getTrueTypeFontSubset ($font, $subsetchars)
 
static _putfontwidths ($font, $cidoffset=0)
 
static updateCIDtoGIDmap ($map, $cid, $gid)
 
static _getfontpath ()
 
static getFontFullPath ($file, $fontdir=false)
 
static getFontRefSize ($size, $refsize=12)
 
static unichr ($c, $unicode=true)
 
static unichrUnicode ($c)
 
static unichrASCII ($c)
 
static arrUTF8ToUTF16BE ($unicode, $setbom=false)
 
static UTF8ArrayToUniArray ($ta, $isunicode=true)
 
static UTF8ArrSubString ($strarr, $start=“, $end=”, $unicode=true)
 
static UniArrSubString ($uniarr, $start=“, $end=”)
 
static UTF8ArrToLatin1Arr ($unicode)
 
static UTF8ArrToLatin1 ($unicode)
 
static uniord ($uch)
 
static getUniord ($uch)
 
static UTF8StringToArray ($str, $isunicode=true, &$currentfont)
 
static UTF8ToLatin1 ($str, $isunicode=true, &$currentfont)
 
static UTF8ToUTF16BE ($str, $setbom=false, $isunicode=true, &$currentfont)
 
static utf8StrRev ($str, $setbom=false, $forcertl=false, $isunicode=true, &$currentfont)
 
static utf8StrArrRev ($arr, $str=“, $setbom=false, $forcertl=false, $isunicode=true, &$currentfont)
 
static utf8Bidi ($ta, $str=“, $forcertl=false, $isunicode=true, &$currentfont)
 

Static Protected Attributes

static $cache_uniord = array()
 

Detailed Description

Font methods for TCPDF library.

Member Function Documentation

static TCPDF_FONTS::_getfontpath ( )
static

Return fonts path

Returns
string static

static TCPDF_FONTS::_getfontpath ( )
static

Return fonts path

Returns
string static

static TCPDF_FONTS::_getTrueTypeFontSubset (   $font,
  $subsetchars 
)
static

Returns a subset of the TrueType font data without the unused glyphs.

Parameters
$font(string) TrueType font data.
$subsetchars(array) Array of used characters (the glyphs to keep).
Returns
(string) A subset of TrueType font data without the unused glyphs.
Author
Nicola Asuni
Since
5.2.000 (2010-06-02) static

static TCPDF_FONTS::_getTrueTypeFontSubset (   $font,
  $subsetchars 
)
static

Returns a subset of the TrueType font data without the unused glyphs.

Parameters
$font(string) TrueType font data.
$subsetchars(array) Array of used characters (the glyphs to keep).
Returns
(string) A subset of TrueType font data without the unused glyphs.
Author
Nicola Asuni
Since
5.2.000 (2010-06-02) static

static TCPDF_FONTS::_getTTFtableChecksum (   $table,
  $length 
)
static

Returs the checksum of a TTF table.

Parameters
$table(string) table to check
$length(int) length of table in bytes
Returns
int checksum
Author
Nicola Asuni
Since
5.2.000 (2010-06-02) static

static TCPDF_FONTS::_getTTFtableChecksum (   $table,
  $length 
)
static

Returs the checksum of a TTF table.

Parameters
$table(string) table to check
$length(int) length of table in bytes
Returns
int checksum
Author
Nicola Asuni
Since
5.2.000 (2010-06-02) static

static TCPDF_FONTS::_putfontwidths (   $font,
  $cidoffset = 0 
)
static

Outputs font widths

Parameters
$font(array) font data
$cidoffset(int) offset for CID values
Returns
PDF command string for font widths
Author
Nicola Asuni
Since
4.4.000 (2008-12-07) static

static TCPDF_FONTS::_putfontwidths (   $font,
  $cidoffset = 0 
)
static

Outputs font widths

Parameters
$font(array) font data
$cidoffset(int) offset for CID values
Returns
PDF command string for font widths
Author
Nicola Asuni
Since
4.4.000 (2008-12-07) static

static TCPDF_FONTS::addTTFfont (   $fontfile,
  $fonttype = ,
  $enc = ,
  $flags = 32,
  $outpath = ,
  $platid = 3,
  $encid = 1,
  $addcbbox = false,
  $link = false 
)
static

Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).

Parameters
$fontfile(string) Font file (full path).
$fonttype(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.
$enc(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.
$flags(int) 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.
$outpath(string) Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
$platid(int) Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
$encid(int) 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.
$addcbbox(boolean) If true includes the character bounding box information on the php font file.
$link(boolean) If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
Returns
(string) TCPDF font name or boolean false in case of error.
Author
Nicola Asuni
Since
5.9.123 (2010-09-30) static

static TCPDF_FONTS::addTTFfont (   $fontfile,
  $fonttype = ,
  $enc = ,
  $flags = 32,
  $outpath = ,
  $platid = 3,
  $encid = 1,
  $addcbbox = false,
  $link = false 
)
static

Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).

Parameters
$fontfile(string) Font file (full path).
$fonttype(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.
$enc(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.
$flags(int) 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.
$outpath(string) Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
$platid(int) Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
$encid(int) 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.
$addcbbox(boolean) If true includes the character bounding box information on the php font file.
$link(boolean) If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
Returns
(string) TCPDF font name or boolean false in case of error.
Author
Nicola Asuni
Since
5.9.123 (2010-09-30) static

static TCPDF_FONTS::arrUTF8ToUTF16BE (   $unicode,
  $setbom = false 
)
static

Converts array of UTF-8 characters to UTF16-BE string.
Based on: http://www.faqs.org/rfcs/rfc2781.html

  Encoding UTF-16:
  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
Parameters
$unicode(array) array containing UTF-8 unicode values
$setbom(boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
Returns
string
Author
Nicola Asuni
Since
2.1.000 (2008-01-08) static

static TCPDF_FONTS::arrUTF8ToUTF16BE (   $unicode,
  $setbom = false 
)
static

Converts array of UTF-8 characters to UTF16-BE string.
Based on: http://www.faqs.org/rfcs/rfc2781.html

  Encoding UTF-16:
  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
Parameters
$unicode(array) array containing UTF-8 unicode values
$setbom(boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
Returns
string
Author
Nicola Asuni
Since
2.1.000 (2008-01-08) static

static TCPDF_FONTS::getFontFullPath (   $file,
  $fontdir = false 
)
static

Return font full path

Parameters
$file(string) Font file name.
$fontdir(string) Font directory (set to false fto search on default directories)
Returns
string Font full path or empty string
Author
Nicola Asuni
Since
6.0.025 static

static TCPDF_FONTS::getFontFullPath (   $file,
  $fontdir = false 
)
static

Return font full path

Parameters
$file(string) Font file name.
$fontdir(string) Font directory (set to false fto search on default directories)
Returns
string Font full path or empty string
Author
Nicola Asuni
Since
6.0.025 static

static TCPDF_FONTS::getFontRefSize (   $size,
  $refsize = 12 
)
static

Get a reference font size.

Parameters
$size(string) String containing font size value.
$refsize(float) Reference font size in points.
Returns
float value in points static

static TCPDF_FONTS::getFontRefSize (   $size,
  $refsize = 12 
)
static

Get a reference font size.

Parameters
$size(string) String containing font size value.
$refsize(float) Reference font size in points.
Returns
float value in points static

static TCPDF_FONTS::getUniord (   $uch)
static

Converts UTF-8 character to integer value.
Invalid byte sequences will be replaced with 0xFFFD (replacement character)
Based on: http://www.faqs.org/rfcs/rfc3629.html

   Char. number range  |        UTF-8 octet sequence
      (hexadecimal)    |              (binary)
   ——————–+———————————————–
   0000 0000-0000 007F | 0xxxxxxx
   0000 0080-0000 07FF | 110xxxxx 10xxxxxx
   0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
   0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
   ———————————————————————
  ABFN notation:


UTF8-octets = *( UTF8-char ) UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 UTF8-1 = x00-7F UTF8-2 = xC2-DF UTF8-tail

  UTF8-3      = xE0 xA0-BF UTF8-tail / xE1-EC 2( UTF8-tail ) /
                xED x80-9F UTF8-tail / xEE-EF 2( UTF8-tail )
  UTF8-4      = xF0 x90-BF 2( UTF8-tail ) / xF1-F3 3( UTF8-tail ) /
                xF4 x80-8F 2( UTF8-tail )
  UTF8-tail   = x80-BF


Parameters
$uch(string) character string to process.
Returns
integer Unicode value
Author
Nicola Asuni static

static TCPDF_FONTS::getUniord (   $uch)
static

Converts UTF-8 character to integer value.
Invalid byte sequences will be replaced with 0xFFFD (replacement character)
Based on: http://www.faqs.org/rfcs/rfc3629.html

   Char. number range  |        UTF-8 octet sequence
      (hexadecimal)    |              (binary)
   ——————–+———————————————–
   0000 0000-0000 007F | 0xxxxxxx
   0000 0080-0000 07FF | 110xxxxx 10xxxxxx
   0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
   0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
   ———————————————————————
  ABFN notation:


UTF8-octets = *( UTF8-char ) UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 UTF8-1 = x00-7F UTF8-2 = xC2-DF UTF8-tail

  UTF8-3      = xE0 xA0-BF UTF8-tail / xE1-EC 2( UTF8-tail ) /
                xED x80-9F UTF8-tail / xEE-EF 2( UTF8-tail )
  UTF8-4      = xF0 x90-BF 2( UTF8-tail ) / xF1-F3 3( UTF8-tail ) /
                xF4 x80-8F 2( UTF8-tail )
  UTF8-tail   = x80-BF


Parameters
$uch(string) character string to process.
Returns
integer Unicode value
Author
Nicola Asuni static

static TCPDF_FONTS::UniArrSubString (   $uniarr,
  $start = ,
  $end =  
)
static

Extract a slice of the $uniarr array and return it as string.

Parameters
$uniarr(string) The input array of characters.
$start(int) the starting element of $strarr.
$end(int) first element that will not be returned.
Returns
Return part of a string
Since
4.5.037 (2009-04-07) static

static TCPDF_FONTS::UniArrSubString (   $uniarr,
  $start = ,
  $end =  
)
static

Extract a slice of the $uniarr array and return it as string.

Parameters
$uniarr(string) The input array of characters.
$start(int) the starting element of $strarr.
$end(int) first element that will not be returned.
Returns
Return part of a string
Since
4.5.037 (2009-04-07) static

static TCPDF_FONTS::unichr (   $c,
  $unicode = true 
)
static

Returns the unicode caracter specified by the value

Parameters
$c(int) UTF-8 value
$unicode(boolean) True if we are in unicode mode, false otherwise.
Returns
Returns the specified character.
Since
2.3.000 (2008-03-05) static

static TCPDF_FONTS::unichr (   $c,
  $unicode = true 
)
static

Returns the unicode caracter specified by the value

Parameters
$c(int) UTF-8 value
$unicode(boolean) True if we are in unicode mode, false otherwise.
Returns
Returns the specified character.
Since
2.3.000 (2008-03-05) static

static TCPDF_FONTS::unichrASCII (   $c)
static

Returns the unicode caracter specified by ASCII value

Parameters
$c(int) UTF-8 value
Returns
Returns the specified character. static

static TCPDF_FONTS::unichrASCII (   $c)
static

Returns the unicode caracter specified by ASCII value

Parameters
$c(int) UTF-8 value
Returns
Returns the specified character. static

static TCPDF_FONTS::unichrUnicode (   $c)
static

Returns the unicode caracter specified by UTF-8 value

Parameters
$c(int) UTF-8 value
Returns
Returns the specified character. static

static TCPDF_FONTS::unichrUnicode (   $c)
static

Returns the unicode caracter specified by UTF-8 value

Parameters
$c(int) UTF-8 value
Returns
Returns the specified character. static

static TCPDF_FONTS::uniord (   $uch)
static

Converts UTF-8 character to integer value.
Uses the getUniord() method if the value is not cached.

Parameters
$uch(string) character string to process.
Returns
integer Unicode value static

static TCPDF_FONTS::uniord (   $uch)
static

Converts UTF-8 character to integer value.
Uses the getUniord() method if the value is not cached.

Parameters
$uch(string) character string to process.
Returns
integer Unicode value static

static TCPDF_FONTS::updateCIDtoGIDmap (   $map,
  $cid,
  $gid 
)
static

Update the CIDToGIDMap string with a new value.

Parameters
$map(string) CIDToGIDMap.
$cid(int) CID value.
$gid(int) GID value.
Returns
(string) CIDToGIDMap.
Author
Nicola Asuni
Since
5.9.123 (2011-09-29) static

static TCPDF_FONTS::updateCIDtoGIDmap (   $map,
  $cid,
  $gid 
)
static

Update the CIDToGIDMap string with a new value.

Parameters
$map(string) CIDToGIDMap.
$cid(int) CID value.
$gid(int) GID value.
Returns
(string) CIDToGIDMap.
Author
Nicola Asuni
Since
5.9.123 (2011-09-29) static

static TCPDF_FONTS::UTF8ArrayToUniArray (   $ta,
  $isunicode = true 
)
static

Convert an array of UTF8 values to array of unicode characters

Parameters
$ta(array) The input array of UTF8 values.
$isunicode(boolean) True for Unicode mode, false otherwise.
Returns
Return array of unicode characters
Since
4.5.037 (2009-04-07) static

static TCPDF_FONTS::UTF8ArrayToUniArray (   $ta,
  $isunicode = true 
)
static

Convert an array of UTF8 values to array of unicode characters

Parameters
$ta(array) The input array of UTF8 values.
$isunicode(boolean) True for Unicode mode, false otherwise.
Returns
Return array of unicode characters
Since
4.5.037 (2009-04-07) static

static TCPDF_FONTS::UTF8ArrSubString (   $strarr,
  $start = ,
  $end = ,
  $unicode = true 
)
static

Extract a slice of the $strarr array and return it as string.

Parameters
$strarr(string) The input array of characters.
$start(int) the starting element of $strarr.
$end(int) first element that will not be returned.
$unicode(boolean) True if we are in unicode mode, false otherwise.
Returns
Return part of a string static

static TCPDF_FONTS::UTF8ArrSubString (   $strarr,
  $start = ,
  $end = ,
  $unicode = true 
)
static

Extract a slice of the $strarr array and return it as string.

Parameters
$strarr(string) The input array of characters.
$start(int) the starting element of $strarr.
$end(int) first element that will not be returned.
$unicode(boolean) True if we are in unicode mode, false otherwise.
Returns
Return part of a string static

static TCPDF_FONTS::UTF8ArrToLatin1 (   $unicode)
static

Converts UTF-8 characters array to array of Latin1 string

Parameters
$unicode(array) array containing UTF-8 unicode values
Returns
array
Author
Nicola Asuni
Since
4.8.023 (2010-01-15) static

static TCPDF_FONTS::UTF8ArrToLatin1 (   $unicode)
static

Converts UTF-8 characters array to array of Latin1 string

Parameters
$unicode(array) array containing UTF-8 unicode values
Returns
array
Author
Nicola Asuni
Since
4.8.023 (2010-01-15) static

static TCPDF_FONTS::UTF8ArrToLatin1Arr (   $unicode)
static

Converts UTF-8 characters array to array of Latin1 characters array

Parameters
$unicode(array) array containing UTF-8 unicode values
Returns
array
Author
Nicola Asuni
Since
4.8.023 (2010-01-15) static

static TCPDF_FONTS::UTF8ArrToLatin1Arr (   $unicode)
static

Converts UTF-8 characters array to array of Latin1 characters array

Parameters
$unicode(array) array containing UTF-8 unicode values
Returns
array
Author
Nicola Asuni
Since
4.8.023 (2010-01-15) static

static TCPDF_FONTS::utf8Bidi (   $ta,
  $str = ,
  $forcertl = false,
  $isunicode = true,
$currentfont 
)
static

Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).

Parameters
$ta(array) array of characters composing the string.
$str(string) string to process
$forcertl(bool) if ‘R’ forces RTL, if ‘L’ forces LTR
$isunicode(boolean) True if the document is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
array of unicode chars
Author
Nicola Asuni
Since
2.4.000 (2008-03-06) static

static TCPDF_FONTS::utf8Bidi (   $ta,
  $str = ,
  $forcertl = false,
  $isunicode = true,
$currentfont 
)
static

Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).

Parameters
$ta(array) array of characters composing the string.
$str(string) string to process
$forcertl(bool) if ‘R’ forces RTL, if ‘L’ forces LTR
$isunicode(boolean) True if the document is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
array of unicode chars
Author
Nicola Asuni
Since
2.4.000 (2008-03-06) static

static TCPDF_FONTS::utf8StrArrRev (   $arr,
  $str = ,
  $setbom = false,
  $forcertl = false,
  $isunicode = true,
$currentfont 
)
static

Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).

Parameters
$arr(array) array of unicode values.
$str(string) string to manipulate (or empty value).
$setbom(bool) if true set the Byte Order Mark (BOM = 0xFEFF)
$forcertl(bool) if true forces RTL text direction
$isunicode(boolean) True if the document is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Author
Nicola Asuni
Since
4.9.000 (2010-03-27) static

static TCPDF_FONTS::utf8StrArrRev (   $arr,
  $str = ,
  $setbom = false,
  $forcertl = false,
  $isunicode = true,
$currentfont 
)
static

Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).

Parameters
$arr(array) array of unicode values.
$str(string) string to manipulate (or empty value).
$setbom(bool) if true set the Byte Order Mark (BOM = 0xFEFF)
$forcertl(bool) if true forces RTL text direction
$isunicode(boolean) True if the document is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Author
Nicola Asuni
Since
4.9.000 (2010-03-27) static

static TCPDF_FONTS::UTF8StringToArray (   $str,
  $isunicode = true,
$currentfont 
)
static

Converts UTF-8 strings to codepoints array.
Invalid byte sequences will be replaced with 0xFFFD (replacement character)

Parameters
$str(string) string to process.
$isunicode(boolean) True when the documetn is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
array containing codepoints (UTF-8 characters values)
Author
Nicola Asuni static

static TCPDF_FONTS::UTF8StringToArray (   $str,
  $isunicode = true,
$currentfont 
)
static

Converts UTF-8 strings to codepoints array.
Invalid byte sequences will be replaced with 0xFFFD (replacement character)

Parameters
$str(string) string to process.
$isunicode(boolean) True when the documetn is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
array containing codepoints (UTF-8 characters values)
Author
Nicola Asuni static

static TCPDF_FONTS::utf8StrRev (   $str,
  $setbom = false,
  $forcertl = false,
  $isunicode = true,
$currentfont 
)
static

Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).

Parameters
$str(string) string to manipulate.
$setbom(bool) if true set the Byte Order Mark (BOM = 0xFEFF)
$forcertl(bool) if true forces RTL text direction
$isunicode(boolean) True if the document is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Author
Nicola Asuni
Since
2.1.000 (2008-01-08) static

static TCPDF_FONTS::utf8StrRev (   $str,
  $setbom = false,
  $forcertl = false,
  $isunicode = true,
$currentfont 
)
static

Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).

Parameters
$str(string) string to manipulate.
$setbom(bool) if true set the Byte Order Mark (BOM = 0xFEFF)
$forcertl(bool) if true forces RTL text direction
$isunicode(boolean) True if the document is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Author
Nicola Asuni
Since
2.1.000 (2008-01-08) static

static TCPDF_FONTS::UTF8ToLatin1 (   $str,
  $isunicode = true,
$currentfont 
)
static

Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.

Parameters
$str(string) string to process.
$isunicode(boolean) True when the documetn is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Since
3.2.000 (2008-06-23) static

static TCPDF_FONTS::UTF8ToLatin1 (   $str,
  $isunicode = true,
$currentfont 
)
static

Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.

Parameters
$str(string) string to process.
$isunicode(boolean) True when the documetn is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Since
3.2.000 (2008-06-23) static

static TCPDF_FONTS::UTF8ToUTF16BE (   $str,
  $setbom = false,
  $isunicode = true,
$currentfont 
)
static

Converts UTF-8 strings to UTF16-BE.

Parameters
$str(string) string to process.
$setbom(boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
$isunicode(boolean) True when the documetn is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Author
Nicola Asuni
Since
1.53.0.TC005 (2005-01-05) static

static TCPDF_FONTS::UTF8ToUTF16BE (   $str,
  $setbom = false,
  $isunicode = true,
$currentfont 
)
static

Converts UTF-8 strings to UTF16-BE.

Parameters
$str(string) string to process.
$setbom(boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
$isunicode(boolean) True when the documetn is in Unicode mode, false otherwise.
$currentfont(array) Reference to current font array.
Returns
string
Author
Nicola Asuni
Since
1.53.0.TC005 (2005-01-05) static

Member Data Documentation

static TCPDF_FONTS::$cache_uniord = array()
staticprotected

Static cache used for speed up uniord performances


The documentation for this class was generated from the following file:

 

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