diff options
| author | b5f0d6c3 <[email protected]> | 2022-03-23 10:05:46 +0800 |
|---|---|---|
| committer | b5f0d6c3 <[email protected]> | 2022-03-23 10:05:46 +0800 |
| commit | 825aa89ea0f6ca70daaf4e51421cb7b9d20d7eb4 (patch) | |
| tree | c2bb280ad18cd41d21e3d1fe8b487f8c3f0bd9f2 /mkvlib/c/exports.go | |
| parent | 342b29b8767d8ea2f4c84e3ba6a2e33c413e1ef3 (diff) | |
update sdks
Diffstat (limited to 'mkvlib/c/exports.go')
| -rw-r--r-- | mkvlib/c/exports.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mkvlib/c/exports.go b/mkvlib/c/exports.go index c79431e..2729ff5 100644 --- a/mkvlib/c/exports.go +++ b/mkvlib/c/exports.go @@ -141,6 +141,32 @@ func GetFontsList(dir *C.char, lcb C.logCallback) *C.char { return cs(string(data)) } +//export CreateFontsCache +func CreateFontsCache(dir, output *C.char, lcb C.logCallback) *C.char { + if !checkInstance() { + return cs("") + } + list := getter.GetProcessorInstance().CreateFontsCache(gs(dir), gs(output), _lcb(lcb)) + data, _ := json.Marshal(list) + return cs(string(data)) +} + +//export CopyFontsFromCache +func CopyFontsFromCache(subs, dist *C.char, lcb C.logCallback) bool { + if !checkInstance() { + return false + } + return getter.GetProcessorInstance().CopyFontsFromCache(gs(subs), gs(dist), _lcb(lcb)) +} + +//export Cache +func Cache(p *C.char) { + if !checkInstance() { + return + } + getter.GetProcessorInstance().Cache(gs(p)) +} + func cs(gs string) *C.char { return C.CString(gs) } |
