class CFFFontSubset {
/**
* The function creates a private dict for a font that was not CID
* All the keys are copied as is except for the subrs key
* @param Font the font
* @param Subr The OffsetItem for the subrs of the private
*/
void CreateNonCIDPrivate(int Font,OffsetItem Subr)
{
// Go to the beginning of the private dict and read until the end
seek(fonts[Font].privateOffset);
while (getPosition() < fonts[Font].privateOffset+fonts[Font].privateLength)
{
int p1 = getPosition();
getDictItem();
int p2 = getPosition();
// If the dictItem is the "Subrs" then,
// use marker for offset and write operator number
if (key=="Subrs") {
OutputList.addLast(Subr);
OutputList.addLast(new UInt8Item((char)19)); // Subrs
}
// Else copy the entire range
else
OutputList.addLast(new RangeItem(buf,p1,p2-p1));
}
}
}