/** * The constructor * @params array $directions of mixed the directions. the value -1 is reserved for global information * array has a default value of 0 (horizontal) and 1 (vertical). Sets the direction to be $directions[0] * @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. */ public function __construct($directions, &$encoding) { parent::__construct($encoding); $this->font_metrics = array(); foreach ($directions as $direction) { if ($direction != -1) { //-1 is reserved for global font metric info $this->font_metrics[$direction] = new I2CE_FontMetric($encoding); } } $this->font_metrics[-1] = $this; $this->directions = $directions; $this->direction = $directions[0]; }