From 62788b62dc21a8cde26277adbb5b258cdddec238 Mon Sep 17 00:00:00 2001 From: ac79b0c6 <105047743+ac79b0c6@users.noreply.github.com> Date: Tue, 10 May 2022 13:32:20 +0800 Subject: update mkvlib:fix bug --- mkvlib/ass.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mkvlib') diff --git a/mkvlib/ass.go b/mkvlib/ass.go index f7c195c..8226191 100644 --- a/mkvlib/ass.go +++ b/mkvlib/ass.go @@ -530,7 +530,11 @@ func (self *assProcessor) createFontSubset(font *fontInfo) bool { fn := fmt.Sprintf(`%s.txt`, randomStr(8)) _, fn, _, _ = splitPath(fn) fn = path.Join(os.TempDir(), fn) - _, n, _, _ := splitPath(font.file) + _, n, e, _ := splitPath(font.file) + e = strings.ToLower(e) + if e == ".ttc" { + e = ".ttf" + } if os.MkdirAll(self.output, os.ModePerm) != nil { printLog(self.lcb, "Failed to create the output folder.") return false @@ -543,7 +547,7 @@ func (self *assProcessor) createFontSubset(font *fontInfo) bool { if !self.rename { n = font.oldName } - _fn := fmt.Sprintf("%s.%s.ttf", n, randomStr(8)) + _fn := fmt.Sprintf("%s.%s%s", n, randomStr(8), e) _fn = path.Join(self.output, _fn) args := make([]string, 0) args = append(args, "--text-file="+fn) -- cgit v1.2.1