## Related Reference
1. [PDF 1.7 Reference](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf) page 468
> The following TrueType tables are always required: “head,” “hhea,” “loca,” “maxp,” “cvt ,” “prep,” “glyf,” “hmtx,” and “fpgm.” If used with a simple font dictionary, the font program must additionally contain a “cmap” table.
2. The C pseudo-code in [OpenType spec - glyf](https://learn.microsoft.com/en-us/typography/opentype/spec/glyf)
do {
uint16 flags;
uint16 glyphIndex;
if ( flags & ARG_1_AND_2_ARE_WORDS) {
(int16 or FWORD) argument1;
(int16 or FWORD) argument2;
} else {
uint16 arg1and2; / (arg1 << 8) | arg2 /
}
if ( flags & WE_HAVE_A_SCALE ) {
F2DOT14 scale; / Format 2.14 /
} else if ( flags & WE_HAVE_AN_X_AND_Y_SCALE ) {
F2DOT14 xscale; / Format 2.14 /
F2DOT14 yscale; / Format 2.14 /
} else if ( flags & WE_HAVE_A_TWO_BY_TWO ) {
F2DOT14 xscale; / Format 2.14 /
F2DOT14 scale01; / Format 2.14 /
F2DOT14 scale10; / Format 2.14 /
F2DOT14 yscale; / Format 2.14 /
}
} while ( flags & MORE_COMPONENTS )
if (flags & WE_HAVE_INSTR){
uint16 numInstr
uint8 instr[numInstr]
Fix Composite Glyph Output
Problem Reproduction
use Dompdf\Dompdf;
$dompdf = new Dompdf(); $dompdf->loadHtml('
');
$dompdf->setPaper('A4', 'protrait');
$dompdf->render();
$dompdf->stream('test.pdf', [ 'Attachment' => 0 ]);
do { uint16 flags; uint16 glyphIndex; if ( flags & ARG_1_AND_2_ARE_WORDS) { (int16 or FWORD) argument1; (int16 or FWORD) argument2; } else { uint16 arg1and2; / (arg1 << 8) | arg2 / } if ( flags & WE_HAVE_A_SCALE ) { F2DOT14 scale; / Format 2.14 / } else if ( flags & WE_HAVE_AN_X_AND_Y_SCALE ) { F2DOT14 xscale; / Format 2.14 / F2DOT14 yscale; / Format 2.14 / } else if ( flags & WE_HAVE_A_TWO_BY_TWO ) { F2DOT14 xscale; / Format 2.14 / F2DOT14 scale01; / Format 2.14 / F2DOT14 scale10; / Format 2.14 / F2DOT14 yscale; / Format 2.14 / } } while ( flags & MORE_COMPONENTS ) if (flags & WE_HAVE_INSTR){ uint16 numInstr uint8 instr[numInstr]