class final Core · roukmoute/pdf 0.6.2
PDF\Document\Fonts\FontDescriptorTable 122 descriptor built solely from explicit PDF values.Inheritance and contracts
Parent : PDF\Document\Fonts\ManagedFontDictionary
Interfaces : Countable, IteratorAggregate, PDF\Document\VersionedComponent, PDF\Syntax\FileStructure\BasicType, Stringable, Traversable
Definition in the specification
Table 122 · Entries common to all font descriptors
ISO 32000-1:2008, §9.8.1 · PDF page 289 ↗
| Entry | PDF type | Source requirement | Table |
|---|---|---|---|
/Type | name | Required | 122 |
/FontName | name | Required | 122 |
/FontFamily | byte string | Optional; PDF 1.5; should be used for Type 3 fonts in Tagged PDF documents | 122 |
/FontStretch | name | Optional; PDF 1.5; should be used for Type 3 fonts in Tagged PDF documents | 122 |
/FontWeight | number | Optional; PDF 1.5; should be used for Type 3 fonts in Tagged PDF documents | 122 |
/Flags | integer | Required | 122 |
/FontBBox | rectangle | Required, except for Type 3 fonts | 122 |
/ItalicAngle | number | Required | 122 |
/Ascent | number | Required, except for Type 3 fonts | 122 |
/Descent | number | Required, except for Type 3 fonts | 122 |
/Leading | number | Optional | 122 |
/CapHeight | number | Required for fonts that have Latin characters, except for Type 3 fonts | 122 |
/XHeight | number | Optional | 122 |
/StemV | number | Required, except for Type 3 fonts | 122 |
/StemH | number | Optional | 122 |
/AvgWidth | number | Optional | 122 |
/MaxWidth | number | Optional | 122 |
/MissingWidth | number | Optional | 122 |
/FontFile | stream | Optional | 122 |
/FontFile2 | stream | Optional; PDF 1.1 | 122 |
/FontFile3 | stream | Optional; PDF 1.2 | 122 |
/CharSet | ASCII string or byte string | Optional; meaningful only in Type 1 fonts; PDF 1.1 | 122 |
Conditional descriptions remain traceable. A definition alone does not implement a codec, a signature or every format mechanism. Read the coverage.
Construction
__construct()
public function __construct((PDF\Document\Fonts\FontStream&PDF\Document\Fonts\EmbeddedFontProgram)|null $fontFile, PDF\Syntax\Object\NameType|PDF\Document\Fonts\SubsetFontName $fontName, PDF\Document\Fonts\FontDescriptorFlags $flags, ?PDF\Syntax\DataStructure\Rectangle $fontBBox, PDF\Syntax\Object\NumericType $italicAngle, ?PDF\Syntax\Object\NumericType $ascent, ?PDF\Syntax\Object\NumericType $descent, ?PDF\Syntax\Object\NumericType $capHeight, ?PDF\Syntax\Object\NumericType $stemV, PDF\Syntax\Object\DictionaryObject\Entry|PDF\Document\Fonts\FontDescriptorOptions ...$entries)Declared methods
assertCollection()
public function assertCollection(PDF\Document\Fonts\CMaps\CMapSystemInfo $collection): voidassertFor()
public function assertFor(PDF\Document\Fonts\FontSubtype $subtype): voidvalidateVersion()
public function validateVersion(PDF\Syntax\FileStructure\EffectivePdfVersion $version): voidInherited methods
12 methods from parents and contracts
__toString()
public function __toString(): stringassertUnmanaged()
protected function assertUnmanaged(string $key): voidcount()
public function count(): intdefinition()
public function definition(): PDF\Specification\TableDefinitionentries()
public function entries(): iterable@return iterable<Entry>get()
public function get(PDF\Syntax\Object\NameType|string $key): ?PDF\Syntax\FileStructure\BasicTypegetIterator()
public function getIterator(): Traversablehas()
public function has(PDF\Syntax\Object\NameType|string $key): booltoPdf()
public function toPdf(PDF\Serialization\SerializationContext $context): stringvalidate()
public function validate(): voidChecks unconditional requirements; conditional and inherited rules remain explicit.with()
public function with(PDF\Syntax\Object\DictionaryObject\Entry $entry): staticwithout()
public function without(PDF\Syntax\Object\NameType|string $key): staticProperties
| Declaration | Origin and documentation |
|---|---|
public readonly (PDF\Document\Fonts\FontStream&PDF\Document\Fonts\EmbeddedFontProgram)|null $fontFile | PDF\Document\Fonts\FontDescriptor |
public readonly PDF\Syntax\Object\NameType $fontName | PDF\Document\Fonts\FontDescriptor |
public readonly PDF\Document\Fonts\FontDescriptorOptions $options | PDF\Document\Fonts\FontDescriptor |
public readonly ?PDF\Document\Fonts\SubsetFontName $subset | PDF\Document\Fonts\FontDescriptor |
Constants
| Name | PHP value | Origin |
|---|---|---|
COMMON_TABLES | | PDF\Specification\SchemaDictionary |
TABLE | | PDF\Document\Fonts\FontDescriptor |