SetaPDF_Core_Font_TrueType_Table_GlyphData_Description_Simple A class representing a simple glyph description.

File: /SetaPDF v2/Core/Font/TrueType/Table/GlyphData/Description/Simple.php

Class hierarchy

Summary

Constants

ON_CURVE_POINT

If set, the point is on the curve; otherwise, it is off the curve.

REPEAT_FLAG

If set, the next byte (read as unsigned) specifies the number of additional times this flag is to be repeated — that is, the number of additional logical flag entries inserted after this entry. In this way, the number of flags listed can be smaller than the number of points in the glyph description.

X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR

This flag has two meanings, depending on how the X_SHORT_VECTOR flag is set. If X_SHORT_VECTOR is set, this bit describes the sign of the value, with 1 equalling positive and 0 negative. If X_SHORT_VECTOR is not set and this bit is set, then the current x-coordinate is the same as the previous x-coordinate. If X_SHORT_VECTOR is not set and this bit is also not set, the current x-coordinate is a signed 16-bit delta vector.

X_SHORT_VECTOR

If set, the corresponding x-coordinate is 1 byte long. If not set, it is two bytes long. For the sign of this value, see the description of the X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR flag.

Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR

This flag has two meanings, depending on how the Y_SHORT_VECTOR flag is set. If Y_SHORT_VECTOR is set, this bit describes the sign of the value, with 1 equalling positive and 0 negative. If Y_SHORT_VECTOR is not set and this bit is set, then the current y-coordinate is the same as the previous y-coordinate. If Y_SHORT_VECTOR is not set and this bit is also not set, the current y-coordinate is a signed 16-bit delta vector.

Y_SHORT_VECTOR

If set, the corresponding y-coordinate is 1 byte long. If not set, it is two bytes long. For the sign of this value, see the description of the Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR flag.


Properties

$_length

The glyph description length

$_offset

The glyph description offset


Methods

__construct()

SetaPDF_Core_Font_TrueType_Table_GlyphData_Description constructor.

Parameters
$glyph : SetaPDF_Core_Font_TrueType_Table_GlyphData_Glyph
 
$offset : int
 
$length : int
 

_readBytes()

protected SetaPDF_Core_Font_TrueType_Table_GlyphData_Description::_readBytes (
int $length, int $offset
): string
Parameters
$length : int
 
$offset : int
 

cleanUp()

getInstructionSize()

Returns the size of the instructions.

getPointCount()

Returns the number of points in the glyph.

getRawData()

Returns the raw glyph description.