Skip to content

Added GlyphRanges #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/gui.zig
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,33 @@ pub const io = struct {
pub const getFontsTexId = zguiIoGetFontsTexId;
extern fn zguiIoGetFontsTexId() TextureIdent;

pub const getGlyphRangesDefault = zguiIoGetGlyphRangesDefault;
extern fn zguiIoGetGlyphRangesDefault() [*]const Wchar;

pub const getGlyphRangesGreek = zguiIoGetGlyphRangesGreek;
extern fn zguiIoGetGlyphRangesGreek() [*]const Wchar;

pub const getGlyphRangesKorean = zguiIoGetGlyphRangesKorean;
extern fn zguiIoGetGlyphRangesKorean() [*]const Wchar;

pub const getGlyphRangesJapanese = zguiIoGetGlyphRangesJapanese;
extern fn zguiIoGetGlyphRangesJapanese() [*]const Wchar;

pub const getGlyphRangesChineseFull = zguiIoGetGlyphRangesChineseFull;
extern fn zguiIoGetGlyphRangesChineseFull() [*]const Wchar;

pub const getGlyphRangesChineseSimplifiedCommon = zguiIoGetGlyphRangesChineseSimplifiedCommon;
extern fn zguiIoGetGlyphRangesChineseSimplifiedCommon() [*]const Wchar;

pub const getGlyphRangesCyrillic = zguiIoGetGlyphRangesCyrillic;
extern fn zguiIoGetGlyphRangesCyrillic() [*]const Wchar;

pub const getGlyphRangesThai = zguiIoGetGlyphRangesThai;
extern fn zguiIoGetGlyphRangesThai() [*]const Wchar;

pub const getGlyphRangesVietnamese = zguiIoGetGlyphRangesVietnamese;
extern fn zguiIoGetGlyphRangesVietnamese() [*]const Wchar;

/// `pub fn zguiIoSetConfigWindowsMoveFromTitleBarOnly(bool) void`
pub const setConfigWindowsMoveFromTitleBarOnly = zguiIoSetConfigWindowsMoveFromTitleBarOnly;
extern fn zguiIoSetConfigWindowsMoveFromTitleBarOnly(enabled: bool) void;
Expand Down
46 changes: 46 additions & 0 deletions src/zgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,52 @@ extern "C"
return ImGui::GetIO().Fonts->TexID;
}

// Glyph Ranges
ZGUI_API const ImWchar *zguiIoGetGlyphRangesDefault(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesDefault();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesGreek(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesGreek();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesKorean(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesKorean();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesJapanese(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesJapanese();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesChineseFull(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesChineseFull();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesChineseSimplifiedCommon(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesChineseSimplifiedCommon();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesCyrillic(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesCyrillic();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesThai(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesThai();
}

ZGUI_API const ImWchar *zguiIoGetGlyphRangesVietnamese(void)
{
return ImGui::GetIO().Fonts->GetGlyphRangesVietnamese();
}

ZGUI_API void zguiIoSetConfigWindowsMoveFromTitleBarOnly(bool enabled)
{
ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly = enabled;
Expand Down
Loading