#FLM: Add 1 Units to each side to current glyph # Description: # Increase current glyph sidebearings by 1 units on each side # Credits: # Pablo Impallari # http://www.impallari.com from robofab.world import CurrentFont,CurrentGlyph f = CurrentFont() g = CurrentGlyph() OldLeft = g.leftMargin OldRight = g.rightMargin g.leftMargin = OldLeft + 1 g.rightMargin = OldRight + 1 f.update()
#FLM: Add 2 Units to each side to current glyph # Description: # Increase current glyph sidebearings by 2 units on each side # Credits: # Pablo Impallari # http://www.impallari.com from robofab.world import CurrentFont,CurrentGlyph f = CurrentFont() g = CurrentGlyph() OldLeft = g.leftMargin OldRight = g.rightMargin g.leftMargin = OldLeft + 2 g.rightMargin = OldRight + 2 f.update()
#FLM: Set 50 50 sidebearings # Description: # Set base sidebearings # Credits: # Pablo Impallari # http://www.impallari.com from robofab.world import CurrentFont,CurrentGlyph f = CurrentFont() g = CurrentGlyph() g.leftMargin = 50 g.rightMargin = 50 f.update()
for g in font.glyphs: if g.name == name: result = True return result font = CurrentFont() cglyph = CurrentGlyph() sb = AskString('SB values') values = sb.split(',') if check(font,values[0]): valueL=font[values[0]].leftMargin else: valueL = cglyph.leftMargin if check(font,values[1]): valueR=font[values[1]].rightMargin else: valueL = cglyph.rightMargin if valueL == 0: valueL = cglyph.leftMargin if valueR == 0: valueR = cglyph.rightMargin print valueL,valueR cglyph.leftMargin = valueL cglyph.rightMargin = valueR font.update()
#FLM: Set 50 50 sidebearings # Description: # Set base sidebearings # Credits: # Pablo Impallari # http://www.impallari.com from robofab.world import CurrentFont, CurrentGlyph f = CurrentFont() g = CurrentGlyph() g.leftMargin = 50 g.rightMargin = 50 f.update()