MCPcopy
hub / github.com/larsenwork/monoid / Bearing

Function Bearing

Scripts/fontbuilder.py:116–124  ·  view source on GitHub ↗

Adjusts the left and/or right bearings of all glyphs

(left=0, right=0)

Source from the content-addressed store, hash-verified

114 return line_op
115
116def Bearing(left=0, right=0):
117 """Adjusts the left and/or right bearings of all glyphs"""
118 def bearing_op(fnt):
119 for glyph in fnt.glyphs():
120 if left != 0:
121 glyph.left_side_bearing += left
122 if right != 0:
123 glyph.right_side_bearing += right
124 return bearing_op
125
126def Swap(glyph1, glyph2):
127 """Swaps the places of two glyphs"""

Callers 1

build.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected