diff options
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 |
