made substituteFont and writeEmbeddedFontToFile work.