|
|
(16 intermediate revisions by one other user not shown) |
Line 1: |
Line 1: |
| This article describes the class ''I2CE_FontMetricAFM''.
| | #REDIRECT [[Class: I2CE_FontMetricAFM (4.1.12)]] |
| *Extends the class: [[Class: I2CE_FontMetricMultiDirection | I2CE_FontMetricMultiDirection]].
| |
| *Parent Classses: [[Class: I2CE_FontMetricMultiDirection | I2CE_FontMetricMultiDirection]] [[Class: I2CE_FontMetric | I2CE_FontMetric]]
| |
| *Location: Part of the module [[TextLayout Tools Module List#textlayout|textlayout]] in the package [https://launchpad.net/textlayout TextLayout Tools]
| |
| *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.0.0-release/annotate/head:/lib/I2CE_FontMetricAFM.php lib/I2CE_FontMetricAFM.php]
| |
| *Author: Carl Leitner <litlfred@ibiblio.org>
| |
| Class to contain information about font metrics. Modeled after the data contained in the Adobe Font Metrics File Format Specification http://www.adobe.com/devnet/font/pdfs/5004.AFM_Spec.pdf <br> Note 1 the function getCharacterInfo @returns mixed @param key are the character information (besides the width) in section 8 of Adobe Font Metrics File Format Specification <br>Note 2 the function getFontCharacteristic @returns mixed @param string $key are the keys in section 4.2 of Adobe Font Metrics File Format Specification values and keys are FontName string FullName string FamilyName string Weight string FontBBox number number number number Version string Notice string EncodingScheme string MappingScheme integer EscChar integer CharacterSet string Characters integer IsBaseFont boolean VVector number number IsFixedV boolean CapHeight number XHeight number Ascender number Descender number We also include section 4,3 of Adobe Font Metrics File Format Specification for the following possible keys which are direction dependent StartDirection integer EndDirection UnderlinePosition number UnderlineThickness number ItalicAngle number CharWidth number number IsFixedPitch boolean
| |
| ==Variables==
| |
| ===$gn2cc===
| |
| . Array are glpyh names values are character codes.
| |
| *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $gn2cc
| |
| | |
| ==Methods==
| |
| ===__construct()===
| |
| @param I2CE_Encoding $encoding -- the encoding used for the internal storage of strings/characters needs to be one that is a valid encoding for PHP multibyte strings.
| |
| *Signature: public function __construct($internal_encoding,$file_encoding,$afmfile)
| |
| *Parameters:
| |
| **&$internal_encoding
| |
| ** [[Class: I2CE_Encoding | I2CE_Encoding]] $file_encoding <br/>the character encoding used in the file afm file
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $afmfile <br/>the afm file to load.
| |
| ===loadFontMetricFromAFM()===
| |
| Load the font metrics from an afm file (Some of this code was stolen from makefont.php)
| |
| *Signature: protected function loadFontMetricFromAFM($encoding,$afmfile)
| |
| *Parameters:
| |
| ** [[Class: I2CE_Encoding | I2CE_Encoding]] $encoding <br/>the character encoding used in the file
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $afmfile Caution: Units for these files are 1/1000 of a point where a point is 1/72 of an inch
| |
| | |
| | |
| [[Category:Class Documentation]]
| |