Skip to content

Instantly share code, notes, and snippets.

@bluebat
Created January 20, 2016 05:49
Show Gist options
  • Save bluebat/a4759b727a0f87789417 to your computer and use it in GitHub Desktop.
Save bluebat/a4759b727a0f87789417 to your computer and use it in GitHub Desktop.
Vertical Font Converter
#!/usr/bin/fontforge
if ($argc !=2)
Print("Usage: ", $0, " fontname")
Quit()
else
Open($1)
endif
SelectAll()
foreach
# FindIntersections()
# RemoveOverlap()
# CorrectDirection()
# ExpandStroke(10, 0, 0, 0, 1)
# Simplify()
if (GlyphInfo("Width") == 1024)
Rotate(90,512,308)
endif
endloop
Select(0u3008,0u3011,0u3014,0u3019,0uff08,0uff09,0uff1c,0uff1e,0uff3b,0uff3d,0uff5b,0uff5e)
foreach
Rotate(-90,512,308)
endloop
Generate($1:r+"@.ttf")
Close()
Quit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment