/** * Reads the information from the given stream. * * @param StreamInterface $stream The stream to read from. */ public function read(StreamInterface $stream) { $this->bCharSet = $stream->readByte(); $this->xRatio = $stream->readByte(); $this->yStartRatio = $stream->readByte(); $this->yEndRatio = $stream->readByte(); }
/** * Reads the information from the given stream. * * @param StreamInterface $stream The stream to read from. */ public function read(StreamInterface $stream) { $this->recs = $stream->readUShort(); $this->startsz = $stream->readByte(); $this->endsz = $stream->readByte(); $this->entry = array(); for ($i = 0; $i < $this->recs; ++$i) { $record = new VTableRecord(); $record->read($stream); $this->entry[] = $record; } }
/** * Reads the data from the given stream. * * @param StreamInterface $stream The stream to read from. */ public function read(StreamInterface $stream) { // Read the format number... $stream->readUShort(); $this->setLength($stream->readUShort()); $this->setLanguage($stream->readUShort()); for ($i = 0; $i < 256; ++$i) { $this->setGlyphId($i, $stream->readByte()); } }
/** * @param StreamInterface $stream The stream to read from. */ public function read(StreamInterface $stream) { $this->version = $stream->readUShort(); $this->xAvgCharWidth = $stream->readShort(); $this->usWeightClass = $stream->readUShort(); $this->usWidthClass = $stream->readUShort(); $this->fsType = $stream->readUShort(); $this->ySubscriptXSize = $stream->readShort(); $this->ySubscriptYSize = $stream->readShort(); $this->ySubscriptXOffset = $stream->readShort(); $this->ySubscriptYOffset = $stream->readShort(); $this->ySuperscriptXSize = $stream->readShort(); $this->ySuperscriptYSize = $stream->readShort(); $this->ySuperscriptXOffset = $stream->readShort(); $this->ySuperscriptYOffset = $stream->readShort(); $this->yStrikeoutSize = $stream->readShort(); $this->yStrikeoutPosition = $stream->readShort(); $this->sFamilyClass = $stream->readShort(); $this->panose = array(); for ($i = 0; $i < 10; ++$i) { $this->panose[] = $stream->readByte(); } $this->ulUnicodeRange1 = $stream->readULong(); $this->ulUnicodeRange2 = $stream->readULong(); $this->ulUnicodeRange3 = $stream->readULong(); $this->ulUnicodeRange4 = $stream->readULong(); $this->achVendID = array(); for ($i = 0; $i < 4; ++$i) { $this->achVendID[] = $stream->readChar(); } $this->fsSelection = $stream->readUShort(); $this->usFirstCharIndex = $stream->readUShort(); $this->usLastCharIndex = $stream->readUShort(); $this->sTypoAscender = $stream->readShort(); $this->sTypoDescender = $stream->readShort(); $this->sTypoLineGap = $stream->readShort(); $this->usWinAscent = $stream->readUShort(); $this->usWinDescent = $stream->readUShort(); $this->ulCodePageRange1 = $stream->readULong(); $this->ulCodePageRange2 = $stream->readULong(); $this->sxHeight = $stream->readShort(); $this->sCapHeight = $stream->readShort(); $this->usDefaultChar = $stream->readUShort(); $this->usBreakChar = $stream->readUShort(); $this->usMaxContext = $stream->readUShort(); }