Open twn39 opened 4 months ago
import dearpygui.dearpygui as dpg dpg.create_context() with dpg.font_registry(): with dpg.font(r"font/YaHeiConsolas.ttf", 20) as default_font: dpg.add_font_range_hint(dpg.mvFontRangeHint_Chinese_Full) dpg.bind_font(default_font) with dpg.window(label="GUI 演示", height=200, width=200): dpg.add_text("你好,世界!") dpg.create_viewport(title='你好', width=800, height=600) dpg.setup_dearpygui() dpg.show_viewport() dpg.start_dearpygui() dpg.destroy_context()