This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process(f, g, t, index): | |
fl.SetUndo(index) | |
upm = f.upm | |
g.RemoveOverlap() | |
outlines = Glyph(g) | |
g.Distance(upm/100, upm/100, 1) | |
g.RemoveOverlap() | |
outlines.Bsubtract(t) | |
g.Bsubtract(outlines) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script_name="Little Scripts" | |
script_description="" | |
script_version="0.0.1" | |
script_author="line0" | |
local LineCollection = require("a-mo.LineCollection") | |
local l0Common = require("l0.Common") | |
local ASSTags = require("l0.ASSTags") | |
function flattenClips(sub, sel) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script_name="Insert Line Breaks" | |
script_description="" | |
script_version="0.0.1" | |
script_author="line0" | |
local LineCollection = require("a-mo.LineCollection") | |
local util = require("aegisub.util") | |
local unicode = require("aegisub.unicode") | |
local l0Common = require("l0.Common") | |
local ASSTags = require("l0.ASSTags") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process(f, g, t, index): | |
fl.SetUndo(index) | |
upm = f.upm | |
g.RemoveOverlap() | |
outlines = Glyph(g) | |
g.Distance(upm/100, upm/100, 1) | |
g.RemoveOverlap() | |
outlines.Bsubtract(t) | |
g.Bsubtract(outlines) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sel = [ | |
{"name": ".notdef", "unicode": None}, | |
{"name": "cid1", "unicode": 0}, | |
{"name": "cid2", "unicode": 33}, | |
{"name": "cid3", "unicode": 34}, | |
{"name": "cid4", "unicode": 35}, | |
{"name": "cid5", "unicode": 36}, | |
{"name": "cid6", "unicode": 37}, | |
{"name": "cid7", "unicode": 38}, | |
{"name": "cid8", "unicode": 39}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import robofab | |
import random | |
def drawRaster(glyph, raster, box): | |
colCnt = len(raster) | |
rowCnt = len(raster[0]) | |
pen = glyph.getPen() | |
offY = box[1] | |
offX = box[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import Tk | |
tk = Tk() | |
import json | |
tk.withdraw() | |
sel = json.loads(tk.clipboard_get()) | |
tk.destroy() | |
glyphs = fl.font.glyphs | |
fl.Unselect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import Tk | |
tk = Tk() | |
import json | |
glyphs = fl.font.glyphs | |
sel = [] | |
for i in range(len(glyphs)): | |
if fl.Selected(i): | |
sel.append({'name':glyphs[i].name, 'unicode':glyphs[i].unicode}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
import ctypes as ct | |
class GetPoint(ct.Structure): | |
_fields_ = [("x", ct.c_long), ("y", ct.c_long)] | |
def get_mousepos(): | |
pt = GetPoint() | |
ct.windll.user32.GetCursorPos(ct.byref(pt)) | |
return int(pt.x), int(pt.y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src=last | |
Spline36Resize(width*2,height*2) | |
a=tcolormask("$ffffb5 $ecc96c $eff1ac $eeecbf $ecc250 $eef1ee",14,false,true).mt_expand_multi(sw=4, sh=4).mt_inflate().Spline36Resize(1920,1080) | |
b=tcolormask("$ffffb5 $ecc96c $eff1ac $eeecbf $ecc250 $dcc85f",11,false,true).mt_expand_multi(sw=6, sh=6).mt_inpand_multi(sw=2,sh=2).Spline36Resize(1920,1080) | |
ribbon=src.tcolormask("$e57f7f",16).mt_expand_multi(sw=3, sh=3).mt_inflate() | |
exclude=src.tcolormask("$65a2a6 $2f91a6 $357d98 $47a9c0 $84b0af",12,false,true).mt_expand_multi(sw=8,sh=8).mt_inpand_multi(sw=8,sh=8).RemoveGrain(17).mt_invert() | |
b.Crop(0,0,1232,0).StackHorizontal(a.mt_logic(exclude,"and").Crop(1232,0,0,0)).mt_logic(ribbon, "or") | |
HiAA(aa="sangnom2", preaa=True, ss="nnedi3") | |
mt_invert().ConvertToY8() |