diff --git a/automation/demos/10-furigana.ass b/automation/demos/10-furigana.ass new file mode 100644 index 000000000..5e349191e --- /dev/null +++ b/automation/demos/10-furigana.ass @@ -0,0 +1,27 @@ +[Script Info] +; Script generated by Aegisub +; http://www.aegisub.net +Title: Default Aegisub file +ScriptType: v4.00+ +PlayResX: 704 +PlayResY: 480 +Last Style Storage: Default +Video Aspect Ratio: 0 +Video Zoom: 6 +Video Position: 0 +Automation Scripts: 10-furigana.lua|E:\Anime Projekter\Binchou-tan\op\binchou-fx.lua +Export Encoding: UTF-8 +Export filters: Automation: Binchou-tan OP +WrapStyle: 0 + +[V4+ Styles] +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding +Style: Default,MS Gothic,36,&H00FFFFFF,&H0000FFFF,&H00000000,&H00000000,0,0,0,0,100,100,0.00,0.00,1,2.00,2.00,2,10,10,30,0 + +[Events] +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text +Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0000,0000,0000,,{\k20}意|い{\k5}味|み{\k7}の{\k14}な{\k6}い{\k30}test|テスト{\k2}を{\k14}魂|た{\k12}#|ま{\k4}#|し{\k8}#|い{\k10}に{\k4}頂|ちょ{\k5}#|う{\k18}戴|だ{\k14}#|い + + + + diff --git a/automation/demos/10-furigana.lua b/automation/demos/10-furigana.lua index 366014518..d74437877 100644 --- a/automation/demos/10-furigana.lua +++ b/automation/demos/10-furigana.lua @@ -20,7 +20,7 @@ function do_syllable(meta, styles, config, line, syl) end -- Place the main text local l = result.add() - l.text = string.format("{\\an8\\pos(%d,%d)\\k%d\\kf%d}%s", line.centerleft+syl.center, line.height*1.5, syl.start_time/10, syl.duration, syl.text) + l.text = string.format("{\\an8\\pos(%d,%d)\\k%d\\kf%d}%s", line.centerleft+syl.center, line.height*1.5, syl.start_time/10, syl.duration, syl.text_stripped) l.layer = 5 -- Perform the highlights for i = 0, syl.highlights.n-1 do diff --git a/automation/include/karaskel-base.lua b/automation/include/karaskel-base.lua index 9645c59dc..c225c3897 100644 --- a/automation/include/karaskel-base.lua +++ b/automation/include/karaskel-base.lua @@ -288,8 +288,11 @@ function karaskel.process_lines(meta, styles, lines, config) karaskel.trace("skel_process_lines:3:"..i) aegisub.report_progress(50+i/lines.n*50) if (lines[i].kind == "dialogue" or lines[i].kind == "comment") and lines[i].style == karaskel.ool_fx_style then + karaskel.trace("skel_process_lines: parsing ool fx: " .. lines[i].text) local fx = {} - fx.head, fx.tail = string.headtail(lines[i]) + fx.head, fx.tail = string.headtail(lines[i].text) + karaskel.trace("--- head: '" .. fx.head .. "'") + karaskel.trace("--- tail: '" .. fx.tail .. "'") fx.line = lines[i] fx.start_time, fx.end_time = fx.line.start_time, fx.line.end_time ool_fx[fx.head] = fx @@ -302,7 +305,6 @@ function karaskel.process_lines(meta, styles, lines, config) for j = 1, repl.n do table.insert(result, repl[j]) end - ool_fx = {} end end -- Done, return the stuff