#!/usr/local/bin/fontforge Open($1) strokeWidths = [210, 280, 315, 420] mainFontName = "GortonDigital" familyName = "Gorton Digital" strokeNames = ["Light", "Regular", "Medium", "Heavy"] weightNames = [300, 400, 500, 700] strokeIndex = 0 while (strokeIndex < SizeOf(strokeWidths)) strokeWidth = strokeWidths[strokeIndex] strokeName = strokeNames[strokeIndex] SetFontNames(mainFontName + strokeName, familyName, familyName + " " + strokeName, strokeName) SetOS2Value("Weight", weightNames[strokeIndex]) #strokeWidth = 420 SelectWorthOutputting() SelectFewerSingletons(" ", 0uA0) UnlinkReference() ClearHints() SetLBearing(strokeWidth/2, 1) #SetRBearing(strokeWidth * 3 / 2, 1) SetRBearing(630, 1) Move(strokeWidth/2, 0) ExpandStroke(strokeWidth, 1, 1) RemoveOverlap() RoundToInt() AutoHint() AddExtrema() Generate($1:r + strokeName + ".otf") Revert() strokeIndex = strokeIndex + 1 endloop