MCPcopy Create free account
hub / github.com/coldtype/st2 / add_blocks

Method add_blocks

ST2/typesetter.py:352–368  ·  view source on GitHub ↗
(self, p)

Source from the content-addressed store, hash-verified

350 print(">>> SCRIPT ERROR: no `modify` function found")
351
352 def add_blocks(self, p):
353 from ST2.importer import C
354
355 def block(_p):
356 return (C.P(_p.ambit(
357 tx=not self.st2.block_horizontal_metrics,
358 ty=not self.st2.block_vertical_metrics)
359 .inset(self.st2.block_inset_x, self.st2.block_inset_y))
360 #.skew(0.5, 0)
361 #.translate(0.2, 0)
362 .cond(self.st2.block_diff, lambda p: p.difference(_p.copy())))
363
364 if self.st2.combine_glyphs:
365 p = block(p)
366 else:
367 p.mapv(block)
368 return p
369
370 def apply_outline(self, p, shapewise):
371 if shapewise:

Callers 1

two_dimensionalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected