Skip to content
Discussion options

You must be logged in to vote

Since imgui v1.92, there is no need to specify ranges when loading fonts.
Also, fonts can be used at any size (the size at which you load the font is actually not that useful: you can change the size whenever you call push_font.

For your example to work, you need to use a font that is able to display hebrew, such as https://fonts.google.com/noto/specimen/Noto+Sans+Hebrew for example

And then this code can work:

from imgui_bundle import immapp, imgui

font_default: imgui.ImFont
font_hebrew: imgui.ImFont


def gui():
    imgui.push_font(font_default, 12)
    imgui.text("Hello")
    imgui.pop_font()
    imgui.push_font(font_hebrew, 24)
    imgui.text("אבגד")
    imgui.pop_font()


def add_font

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Talbe1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants