INCORPORATING PARTS OF FontHelper FROM chronotext-toolkit