From 825aa89ea0f6ca70daaf4e51421cb7b9d20d7eb4 Mon Sep 17 00:00:00 2001 From: b5f0d6c3 Date: Wed, 23 Mar 2022 10:05:46 +0800 Subject: update sdks --- mkvlib/c/exports.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'mkvlib/c/exports.go') 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) } -- cgit v1.2.1