Class: I2CE Encoding (Development)

From IHRIS Wiki
Revision as of 15:26, 10 March 2010 by Litlfred (talk | contribs) (Created page with '{{otherversions|Class: I2CE_Encoding}} This article describes the class ''I2CE_Encoding'' . *Location: Part of the module [[TextLayout Tools Module List (Development)#textlayout|…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This article describes the class I2CE_Encoding .

helper library to store/look-up glyphnames associated to a character code.

Variables

$glyph_names

protected @var $glyph_names an array of arrays with values glyph names and keys unicode codepoints the first index of the array is the encoding type

$encoding

$mb_encoding

protected @var string $unicode_encoding

$useMB

$fix

Some common incorrect glyph names

Methods

UnicodeFromCharactercode()

get the multibyte character associated to a character code

UnicodeFromGlyphname()

get the multibyte character associated to a glyphname

UnicodeToCharacterCode()

get the character code to a unicode codepoint

UnicodeToGlyphname()

get the glpyh name associated to to a unicode codepoint

__construct()

@param string $encoding_type -- set to the encoding used needs to be one of PHP multibyte strings encodings

changeGlyphNames()

Change the glyph names @param $names an associative array with the new value being the value and the old value being the key

fixEuro()

Make sure U+20AC has the glyphname euro if it exists in this encoding

getEncodingType()

Get the unicode encoding to use

readMap()

Read in a character encoding from a file

  • Defined in textlayout/lib/I2CE_Encoding.php on line 148
  • Signature: public function readMap($enc_file)
  • Parameters:
    • string $enc_file
      the file containing the character encoded exmaples are cp1250.map ISO-8859-1.map etc. this function has been graciously stolen from makefont.php

setCharacterCode()

Set the character code assoicated to a unicode code point

setEncodingType()

setGlyphname()

Set the gylph name of a character

useMB()