coldtype.pens.datpen.DATPens

class DATPens(pens=[])

A set/collection of DATPen’s

Behaves like a list but can be queried somewhat like a DOM

addFrame(frame, typographic=False, passthru=False)

Add a frame that isn’t derived from the bounds

clearFrames()

Get rid of any non-bounds-derived pen frames; i.e. frames set by Harfbuzz

copy(with_data=False)

Get a completely new copy of this whole set of pens, usually done so you can duplicate and further modify a DATPens without mutating the original

getFrame(th=False, tv=False)

Get the frame of the DATPens; th means (t)rue (h)orizontal; ty means (t)rue (v)ertical; passing either ignores a non-bounds-derived frame in either dimension

indexed_subset(indices)

Take only the pens at the given indices

removeBlanks()

Remove blank pens from the set

reversePens()

Reverse the order of the pens; useful for overlapping glyphs from the left-to-right rather than right-to-left (as is common in OpenType applications)

rp()

Reverse the order of the pens; useful for overlapping glyphs from the left-to-right rather than right-to-left (as is common in OpenType applications)