diff options
| author | ac79b0c6 <[email protected]> | 2022-05-10 13:32:20 +0800 |
|---|---|---|
| committer | ac79b0c6 <[email protected]> | 2022-05-10 13:32:20 +0800 |
| commit | 62788b62dc21a8cde26277adbb5b258cdddec238 (patch) | |
| tree | 31332cccf66f0dd6482bead0e23e00dd94785e70 /mkvlib | |
| parent | 8da88160cace9c824bb443a8a0d992453de2a450 (diff) | |
update mkvlib:fix bug
Diffstat (limited to 'mkvlib')
| -rw-r--r-- | mkvlib/ass.go | 8 |
1 files changed, 6 insertions, 2 deletions
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) |
