Skip to content

Instantly share code, notes, and snippets.

@bluebat
Created January 20, 2016 05:49

Revisions

  1. bluebat created this gist Jan 20, 2016.
    29 changes: 29 additions & 0 deletions font@.pe
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    #!/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)