DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

How to display Greek letters

Open qazrfvop opened this issue 7 months ago • 2 comments

The interface cannot display Greek letters (for example :α, β). Even after registering different fonts, it still cannot be displayed. How can this be achieved

qazrfvop avatar Jun 04 '25 06:06 qazrfvop

with dpg.font_registry(): with dpg.font("fonts/simsun.ttc", 20) as font1:

    # add the default font range
    dpg.add_font_range_hint(dpg.mvFontRangeHint_Default)

    # helper to add range of characters
    #    Options:
    #        mvFontRangeHint_Japanese
    #        mvFontRangeHint_Korean
    #        mvFontRangeHint_Chinese_Full
    #        mvFontRangeHint_Chinese_Simplified_Common
    #        mvFontRangeHint_Cyrillic
    #        mvFontRangeHint_Thai
    #        mvFontRangeHint_Vietnamese
    dpg.add_font_range_hint(dpg.mvFontRangeHint_Japanese)

    # add specific range of glyphs
    dpg.add_font_range(0x0300, 0x03ff)

qazrfvop avatar Jun 04 '25 07:06 qazrfvop

Can you show your entire code, or a minimal example that one can copy-paste and run? With what little code you've provided, it's pure guesswork.

v-ein avatar Jun 04 '25 18:06 v-ein