diff options
| author | b5f0d6c3 <[email protected]> | 2021-11-02 19:09:21 +0800 |
|---|---|---|
| committer | b5f0d6c3 <[email protected]> | 2021-11-02 19:09:21 +0800 |
| commit | c00d2c26277f9522ef29f3f41eb1b60eb859e6a7 (patch) | |
| tree | 9aee87a137eb2c91151d2641756cfb2aeddf3e42 /mkvlib | |
| parent | e38ba86cce6f25efd2725f43f1afe046166cfe31 (diff) | |
update mkvlib
Diffstat (limited to 'mkvlib')
| -rw-r--r-- | mkvlib/ass.go | 5 | ||||
| -rw-r--r-- | mkvlib/shared.go | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mkvlib/ass.go b/mkvlib/ass.go index e3c1f53..a8e5ef6 100644 --- a/mkvlib/ass.go +++ b/mkvlib/ass.go @@ -140,7 +140,7 @@ func (self *assProcessor) dumpFont(file string, full bool) bool { ok := false count := 1 _, n, _, _ := splitPath(file) - if e, _ := regexp.MatchString(`\.(?i)ttc$`, n); e { + if strings.HasSuffix(strings.ToLower(n), ".ttc") { count = self.getTTCCount(file) if count < 1 { printLog(self.lcb, `Failed to get the ttc font count: "%s".`, n) @@ -271,9 +271,10 @@ func (self *assProcessor) createFontSubset(font *fontInfo) bool { ok := false fn := fmt.Sprintf(`%s.txt`, font.file) _, n, e, ne := splitPath(font.file) - if _e, _ := regexp.MatchString(`^\.(?i)ttc$`, e); _e { + if strings.ToLower(e) == ".ttc" { e = ".ttf" } + e = strings.ToLower(e) if os.MkdirAll(self.output, os.ModePerm) != nil { printLog(self.lcb, "Failed to create the output folder.") return false diff --git a/mkvlib/shared.go b/mkvlib/shared.go index e2fa424..3358d89 100644 --- a/mkvlib/shared.go +++ b/mkvlib/shared.go @@ -11,7 +11,7 @@ import ( ) const libName = "mkvlib" -const libVer = "v1.1.5" +const libVer = "v1.1.6" const LibFName = libName + " " + libVer |
