summaryrefslogtreecommitdiff
path: root/mkvlib/ass.go
diff options
context:
space:
mode:
authorb5f0d6c3 <[email protected]>2021-11-02 19:09:21 +0800
committerb5f0d6c3 <[email protected]>2021-11-02 19:09:21 +0800
commitc00d2c26277f9522ef29f3f41eb1b60eb859e6a7 (patch)
tree9aee87a137eb2c91151d2641756cfb2aeddf3e42 /mkvlib/ass.go
parente38ba86cce6f25efd2725f43f1afe046166cfe31 (diff)
update mkvlib
Diffstat (limited to 'mkvlib/ass.go')
-rw-r--r--mkvlib/ass.go5
1 files changed, 3 insertions, 2 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