Skip to content

Commit

Permalink
fix font add api for pyimgui 2.0.0 and version update
Browse files Browse the repository at this point in the history
  • Loading branch information
ny committed May 25, 2023
1 parent 67422ed commit e3409ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ff_draw/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _init_everything_in_work_process(self):
self.imgui_panel_renderer = ffd_imgui.OpenglPynputRenderer(self.window_panel)
fonts = imgui.get_io().fonts
try:
self.font = fonts.add_font_from_file_ttf(self.font_path, self.font_size, fonts.get_glyph_ranges_chinese_full())
self.font = fonts.add_font_from_file_ttf(self.font_path, self.font_size, None, fonts.get_glyph_ranges_chinese_full())
except Exception as e:
self.logger.error('load font failed, chinese wont be shown:', exc_info=e)
self.font = None
Expand Down
2 changes: 1 addition & 1 deletion nylib/utils/imgui/window_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def init_imgui(self):
imgui_io = imgui.get_io()
if os.path.exists(p := os.path.join(os.environ.get('SystemDrive','/') + os.sep, 'Windows', 'Fonts', 'msyh.ttc')):
fonts = imgui_io.fonts
self.imgui_font = fonts.add_font_from_file_ttf(p, self.font_size)
self.imgui_font = fonts.add_font_from_file_ttf(p, self.font_size, None, fonts.get_glyph_ranges_chinese_full())
else:
self.imgui_font = None
imgui_io.ini_file_name = self._ini_file_name
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.0
0.14.1

0 comments on commit e3409ee

Please sign in to comment.