import pagebot from pagebot.fonttoolbox.objects.font import Font ROOT_PATH = pagebot.getRootPath() FONT_PATH = ROOT_PATH + '/Fonts/_private/PromisePageBot-GX.ttf' #FONT_PATH = getMasterPath() + 'BitcountGrid-GX.ttf' FONT_PATH = ROOT_PATH + '/Fonts/fontbureau/AmstelvarAlpha-VF.ttf' f = Font(FONT_PATH) print f.axes print f.info.weightClass, f.info.unitsPerEm print f.ttFont['fvar'].axes g = f.keys() g = f['a'] print g.name, g.width
fontSize=18) tw, th = textSize(fs) fill(0.4) stroke(0.4, 0.4, 0.4, 0.9) oval(p.x - 10, p.y - 10, 20, 20) text(fs, (p.x - tw / 2, p.y - th / 4)) #stroke(None) #fill(1, 0, 0) #for s in glyph.segments: # for p in s: # oval(p.x-6, p.y-6, 12, 12) restore() newPage(W, H) for glyphIndex, glyphName in enumerate(sorted(cjkF.keys())[start:end]): glyph = cjkF[glyphName] glyphs.append(glyph) print glyph x = y = 0 print len(glyphs) #newPage(1000, 1000) for glyph in glyphs: print glyph.name print glyph.contours save() transform((1, 0, 0, 1, 20 + x * W / 5, H - (y + 1) * W / 5 + 20)) scale(0.14) fill(None) stroke(1, 0, 0)