From 01ab2fd8d008f31309043c7ff341238ea3675a1e Mon Sep 17 00:00:00 2001 From: b5f0d6c3 Date: Sun, 1 May 2022 23:01:55 +0800 Subject: update mkvlib:add get font info --- mkvlib/c/exports.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mkvlib/c/exports.go') diff --git a/mkvlib/c/exports.go b/mkvlib/c/exports.go index c728b69..5cb8c0f 100644 --- a/mkvlib/c/exports.go +++ b/mkvlib/c/exports.go @@ -195,6 +195,16 @@ func Check(check, strict bool) { getter.GetProcessorInstance().Check(check, strict) } +//export GetFontInfo +func GetFontInfo(p *C.char) *C.char { + if !checkInstance() { + return cs("") + } + info := getter.GetProcessorInstance().GetFontInfo(gs(p)) + data, _ := json.Marshal(info) + return cs(string(data)) +} + func cs(gs string) *C.char { return C.CString(gs) } -- cgit v1.2.1