From 2a4cbf0d59bceb27f0ced4edb3610ffed9d25aba Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 10 Oct 2021 10:14:41 -0700 Subject: [PATCH] freetype: expose sfnt name functions --- deps/freetype/bindings.h | 1 + deps/freetype/src/lib.rs | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/deps/freetype/bindings.h b/deps/freetype/bindings.h index 0567b1311..eaa974009 100644 --- a/deps/freetype/bindings.h +++ b/deps/freetype/bindings.h @@ -7,3 +7,4 @@ #include #include #include +#include diff --git a/deps/freetype/src/lib.rs b/deps/freetype/src/lib.rs index 415d76e4f..16f0b4ba3 100644 --- a/deps/freetype/src/lib.rs +++ b/deps/freetype/src/lib.rs @@ -1875,3 +1875,34 @@ extern "C" { extern "C" { pub fn FT_Matrix_Invert(matrix: *mut FT_Matrix) -> FT_Error; } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct FT_SfntName_ { + pub platform_id: FT_UShort, + pub encoding_id: FT_UShort, + pub language_id: FT_UShort, + pub name_id: FT_UShort, + pub string: *mut FT_Byte, + pub string_len: FT_UInt, +} +pub type FT_SfntName = FT_SfntName_; +extern "C" { + pub fn FT_Get_Sfnt_Name_Count(face: FT_Face) -> FT_UInt; +} +extern "C" { + pub fn FT_Get_Sfnt_Name(face: FT_Face, idx: FT_UInt, aname: *mut FT_SfntName) -> FT_Error; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct FT_SfntLangTag_ { + pub string: *mut FT_Byte, + pub string_len: FT_UInt, +} +pub type FT_SfntLangTag = FT_SfntLangTag_; +extern "C" { + pub fn FT_Get_Sfnt_LangTag( + face: FT_Face, + langID: FT_UInt, + alangTag: *mut FT_SfntLangTag, + ) -> FT_Error; +}