Skip to content
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

[Function Request] dpg.create_viewport(title='xxx'),Utf-8 coding problem #2265

Closed
monkeycc opened this issue Jan 24, 2024 · 1 comment
Closed
Labels
state: pending not addressed yet

Comments

@monkeycc
Copy link

monkeycc commented Jan 24, 2024

Is your feature request related to a problem? Please describe.

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport(title='我是中文', width=600, height=200)
dpg.setup_dearpygui()



with dpg.font_registry():
    with dpg.font(r"C:\Windows\Fonts\msyh.ttc", 20) as default_font:
        dpg.add_font_range_hint(dpg.mvFontRangeHint_Chinese_Full)
dpg.bind_font(default_font) # Binds the font globally


with dpg.window(label="我是中国文字"):
    dpg.add_text("你好, 世界")

dpg.show_viewport()

# below replaces, start_dearpygui()
while dpg.is_dearpygui_running():
    # insert here any code you would like to run in the render loop
    # you can manually stop by using stop_dearpygui()
    print("this will run every frame")
    dpg.render_dearpygui_frame()

dpg.destroy_context()

微信截图_20220511003735

#1760

#1667

#2237

#2073

Unfortunately, the new version has not fixed this issue all along

@monkeycc monkeycc added the state: pending not addressed yet label Jan 24, 2024
@v-ein
Copy link
Contributor

v-ein commented Jan 24, 2024

Duplicates #2261.

@monkeycc monkeycc closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet
Projects
None yet
Development

No branches or pull requests

2 participants