setasign\SetaPDF2\Core\Font\TrueType\Table\GlyphData\Description

Composite A class representing a composite glyph description.

File: /SetaPDF v2/Core/Font/TrueType/Table/GlyphData/Description/Composite.php
Old class name (alias): \SetaPDF_Core_Font_TrueType_Table_GlyphData_Description_Composite

Class hierarchy

Summary

Constants

FLAG_ARGS_ARE_XY_VALUES

public const int Composite::FLAG_ARGS_ARE_XY_VALUES = 2

If this is set, the arguments are signed xy values; otherwise, they are unsigned point numbers.

FLAG_ARG_1_AND_2_ARE_WORDS

If this is set, the arguments are 16-bit (uint16 or int16); otherwise, they are bytes (uint8 or int8).

FLAG_MORE_COMPONENTS

public const int Composite::FLAG_MORE_COMPONENTS = 32

Indicates at least one more glyph after this one.

FLAG_OVERLAP_COMPOUND

public const int Composite::FLAG_OVERLAP_COMPOUND = 1024

If set, the components of the compound glyph overlap. Use of this flag is not required in OpenType— that is, it is valid to have components overlap without having this flag set. It may affect behaviors in some platforms, however.

FLAG_ROUND_XY_TO_GRID

public const int Composite::FLAG_ROUND_XY_TO_GRID = 4

For the xy values if the preceding is true.

FLAG_SCALED_COMPONENT_OFFSET

public const int Composite::FLAG_SCALED_COMPONENT_OFFSET = 2048

The composite is designed to have the component offset scaled.

FLAG_UNSCALED_COMPONENT_OFFSET

public const int Composite::FLAG_UNSCALED_COMPONENT_OFFSET = 4096

The composite is designed not to have the component offset scaled.

FLAG_USE_MY_METRICS

public const int Composite::FLAG_USE_MY_METRICS = 512

If set, this forces the aw and lsb (and rsb) for the composite to be equal to those from this original glyph. This works for hinted and unhinted characters.

FLAG_WE_HAVE_AN_X_AND_Y_SCALE

The x direction will use a different scale from the y direction.

FLAG_WE_HAVE_A_SCALE

public const int Composite::FLAG_WE_HAVE_A_SCALE = 8

This indicates that there is a simple scale for the component. Otherwise, scale = 1.0.

FLAG_WE_HAVE_A_TWO_BY_TWO

public const int Composite::FLAG_WE_HAVE_A_TWO_BY_TWO = 128

There is a 2 by 2 transformation that will be used to scale the component.

FLAG_WE_HAVE_INSTRUCTIONS

public const int Composite::FLAG_WE_HAVE_INSTRUCTIONS = 256

Following the last component are instructions for the composite character.


Properties

$_length

The glyph description length

$_offset

protected int Composite::$_offset

Offset of this description

$_rawComponentsData

The raw component data.


Methods

__construct()

AbstractDescription constructor.

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

_getRawComponentsData()

private Composite::_getRawComponentsData (
void
): array

Gets the components.

_readBytes()

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

cleanUp()

public AbstractDescription::cleanUp (
void
): void

Release memory.

getInstructionSize()

public Composite::getInstructionSize (
void
): int

Returns the size of the instructions.

getRawComponentsData()

public Composite::getRawComponentsData (
void
): array

Returns the components.

getRawData()

public AbstractDescription::getRawData (
void
): string

Returns the raw glyph description.

getTopLevelGlyhs()

public Composite::getTopLevelGlyhs (
void
): void

getTopLevelGlyphs()

public Composite::getTopLevelGlyphs (
void
): int[]

Returns the top level glyphs