Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4882800
build: Updated ImGui to version 1.92.5 and ImPlot to version 0.17.
v-ein Mar 1, 2026
69ac525
build: Updated ImNodes to the latest commit from master.
v-ein Jan 12, 2026
1de0867
fix (textures): Partially moved to new ImTextureID/ImTextureRef mecha…
v-ein Jan 9, 2026
353cd5d
fix (textures): Simplified texture access by making a base mvTextureI…
v-ein Jan 9, 2026
396b1f0
fix (fonts): Fixed the display of atlas size.
v-ein Jan 9, 2026
4e3f138
fix (styles): Updated style constants and values to match new ImGui v…
v-ein Mar 1, 2026
ea20cfa
fix (styles): Updated styles in DearPyGui_Ext to match new ImGui and …
v-ein Jan 11, 2026
a897f3a
fix: Updated flags on ImGui::BeginChild() calls.
v-ein Jan 11, 2026
6c991b6
fix (fonts): Updated Font Registry tool.
v-ein Jan 11, 2026
d97c55c
fix (textures): Changed ImTextureID to use more generic types (to avo…
v-ein Jan 12, 2026
0b5f9b5
build: Re-generated API files.
v-ein Jan 12, 2026
10fc1b6
fix: Modified the GenStyleConstants script to also generate styles an…
v-ein Jan 12, 2026
7cf626e
chore: Renamed GenStyleConstants.py
v-ein Jan 12, 2026
e93413c
fix: Removed mvThemeCol_TextLink and updated node editor colors
v-ein Jan 12, 2026
8295540
fix: Adding Dummy after SetCursorPos calls that restore cursor positi…
v-ein Jan 13, 2026
9d81bf2
fix: Enabled (restored) keyboard navigation on drawlists
v-ein Jan 13, 2026
d708107
fix: A couple of improvements in the Fonts tool.
v-ein Jan 15, 2026
2d51a9d
fix (fonts): Removed font ranges since they are useless with new ImGui.
v-ein Jan 15, 2026
704b0cf
fix (fonts): Removed mention of mvFontRangeHint in DearPyGui_Ext.
v-ein Jan 15, 2026
f9e71a8
fix (fonts): Reworked the code setting the default font (bind_font).
v-ein Jan 16, 2026
8a8ae02
fix (fonts): ImGui::PushFont now requires an explicit font size.
v-ein Jan 16, 2026
d0860d5
fix (fonts): Adding back the default Proggy font as a fallback when a…
v-ein Jan 16, 2026
3074eb0
fix (fonts): Proper setting of global font scale.
v-ein Jan 16, 2026
2afaef3
feat (fonts): Allow dynamic changes to font size via configure_item.
v-ein Jan 17, 2026
aca49e6
fix (fonts): Make "set as default" buttons in Font Manager work again.
v-ein Jan 17, 2026
caac4c0
fix (fonts): Size can be dynamically updated for the default font as …
v-ein Jan 17, 2026
ebd6080
feat: Added an option to disable Alt+Enter on Win32.
v-ein Jan 21, 2026
be3bc5a
fix: Restored behavior of alpha_preview on color widgets.
v-ein Jan 22, 2026
9d1bb75
fix: Changed error recovery defaults to not spam the console with ImG…
v-ein Jan 22, 2026
3a098ac
feat: Ctrl+C can be used to copy window contents (opt-in)
v-ein Jan 23, 2026
7dbbadd
build: Added a script to generate boilerplate code for item flags.
v-ein Jan 23, 2026
9ecdf41
chore: The GenItemFlags script can now handle different DPG items tha…
v-ein Jan 25, 2026
8b8e0ac
fix: Restored default behavior of alpha_preview on color widgets (edi…
v-ein Jan 26, 2026
7f098f1
feat: Added new flags to many items.
v-ein Jan 27, 2026
731d3ee
chore: GenItemFlags script improvement: indentation, multiple DPG wid…
v-ein Jan 27, 2026
661f290
refac: Reordered and grouped #include statements in .cpp
v-ein Jan 28, 2026
df99941
build: Enabled precompiled headers (so far on MVDIST builds only).
v-ein Jan 28, 2026
5e9e5ef
build: Removed irrelevant #include's.
v-ein Jan 28, 2026
fedd376
build: Moved ImGui/ImPlot internal headers to files actually using them.
v-ein Jan 28, 2026
d429b0c
build: Removed/replaced irrelevant #include's.
v-ein Jan 28, 2026
3806c38
build: Enabled precompiled headers on the sandbox build.
v-ein Jan 28, 2026
8733ced
build: Corrected target name in the sandbox build.
v-ein Jan 28, 2026
53f4a14
feat (mvTreeNode): Added lines that show tree structure.
v-ein Jan 28, 2026
7bea347
build: Moved IMGUI_DEFINE_MATH_OPERATORS from CMake files to mvImGuiC…
v-ein Jan 28, 2026
cbd7fed
feat (mvStyleWindow): Uncovered tree line styles and added help toolt…
v-ein Jan 28, 2026
032d523
fix: Fixed build warnings (mostly type conversions).
v-ein Jan 29, 2026
5cc89ed
build: #include cleanup + fixed build of mvDrawings.cpp that required…
v-ein Jan 29, 2026
86a9c8f
build: Added Objective-C to CMake for macOS builds. Should aid with p…
v-ein Mar 1, 2026
40c0c3a
fix: Fixed build warnings on macOS.
v-ein Feb 19, 2026
35d1788
fix: A minor fix in the texture registry tool.
v-ein Mar 1, 2026
244ffd0
build: Disabled precompiled headers on Linux and macOS due to errors …
v-ein Mar 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
cmake_minimum_required (VERSION 3.13)
cmake_minimum_required (VERSION 3.16)

project ("DearPyGui")
if(APPLE)
# When using precompiled headers on macOS, we need to enable Objective-C
# as a distinct language. This won't work on other platforms (will fail to
# find the Obj-C compiler), hence the "if APPLE".
project ("DearPyGui" LANGUAGES C CXX OBJC OBJCXX)
else()
project ("DearPyGui")
endif()

if(WIN32)
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiConfig.h")
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiConfig_win32.h")
add_definitions(-DMV_PLATFORM="windows")
elseif(APPLE)
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiLinuxConfig.h")
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiConfig_apple.h")
add_definitions(-DMV_PLATFORM="apple")
else() # Linux
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiLinuxConfig.h")
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiConfig_linux.h")
add_definitions(-DMV_PLATFORM="linux")
endif()

Expand Down
86 changes: 46 additions & 40 deletions dearpygui/_dearpygui.pyi

Large diffs are not rendered by default.

195 changes: 128 additions & 67 deletions dearpygui/_dearpygui_RTD.py

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions dearpygui/_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,3 +423,55 @@ def is_item_search_delayed(item: Union[int, str]) -> Union[bool, None]:
def set_start_callback(callback):
""" deprecated function """
return internal_dpg.set_frame_callback(3, callback)

@deprecated("This call is a no-op because character ranges are now automatic")
def add_font_chars(chars : Union[List[int], Tuple[int, ...]], *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, **kwargs) -> Union[int, str]:
""" (deprecated function) Adds specific font characters to a font.

Args:
chars (Union[List[int], Tuple[int, ...]]):
label (str, optional): Overrides 'name' as label.
user_data (Any, optional): User data for callbacks
use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid).
tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label.
parent (Union[int, str], optional): Parent to add this item to. (runtime adding)
id (Union[int, str], optional): (deprecated)
Returns:
Union[int, str]
"""
pass

@deprecated("This call is a no-op because character ranges are now automatic")
def add_font_range(first_char : int, last_char : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, **kwargs) -> Union[int, str]:
""" (deprecated function) Adds a range of font characters to a font.

Args:
first_char (int):
last_char (int):
label (str, optional): Overrides 'name' as label.
user_data (Any, optional): User data for callbacks
use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid).
tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label.
parent (Union[int, str], optional): Parent to add this item to. (runtime adding)
id (Union[int, str], optional): (deprecated)
Returns:
Union[int, str]
"""
pass

@deprecated("This call is a no-op because character ranges are now automatic")
def add_font_range_hint(hint : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, **kwargs) -> Union[int, str]:
""" (deprecated function) Adds a range of font characters (mvFontRangeHint_ constants).

Args:
hint (int):
label (str, optional): Overrides 'name' as label.
user_data (Any, optional): User data for callbacks
use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid).
tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label.
parent (Union[int, str], optional): Parent to add this item to. (runtime adding)
id (Union[int, str], optional): (deprecated)
Returns:
Union[int, str]
"""
pass
291 changes: 170 additions & 121 deletions dearpygui/dearpygui.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dearpygui/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def _color_picker_configs(sender, value, user_data):
dpg.add_radio_button(("mvColorEdit_input_rgb", "mvColorEdit_input_hsv"), callback=_color_picker_configs,
user_data=_color_picker_id, horizontal=True)

dpg.add_color_picker((255, 0, 255, 200), label="Color Picker", alpha_preview=True, no_alpha=False, alpha_bar=True,
dpg.add_color_picker((255, 0, 255, 200), label="Color Picker", alpha_preview=dpg.mvColorEdit_AlphaPreviewNone, no_alpha=False, alpha_bar=True,
width=200, tag=_color_picker_id)

_add_config_options(_color_picker_id, 3,
Expand Down
55 changes: 27 additions & 28 deletions docs/source/documentation/fonts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,26 @@ folder you can find an example of a otf font.
Readme First
------------

All loaded fonts glyphs are rendered into a single texture atlas ahead of time.
Adding/Removing/Modifying fonts will cause the font atlas to be rebuilt.
All loaded fonts glyphs are rendered into a single texture atlas. Rendering occurs
on-the-fly as characters are encountered in UI strings (item labels, input contents, etc. -
anything that gets displayed in the viewport).

You can use the style editor
You can use the Fonts Manager tool
:py:func:`show_font_manager <dearpygui.dearpygui.show_font_manager>`
to browse your fonts and understand what's going on if you have an issue.

Font Loading Instructions
-------------------------

To add your own fonts, you must first create a font registry to
add fonts to. Next, add fonts to the registry. By default only basic latin
and latin supplement glyphs are added (0x0020 - 0x00FF).
add fonts to. Next, add fonts to the registry.

For a font to take effect, it must be either bound globally with :py:func:`bind_font <dearpygui.dearpygui.bind_font>`
or bound to a particular item with :py:func:`bind_item_font <dearpygui.dearpygui.bind_item_font>`.
In the latter case, the font is "inherited" by all child item if it is bound to
a container. To remove font binding and revert to the default font (or inherit from
the parent item), call `bind_font`/`bind_item_font` again, passing 0 in the `font`
argument.

.. code-block:: python

Expand All @@ -39,13 +46,14 @@ and latin supplement glyphs are added (0x0020 - 0x00FF).
default_font = dpg.add_font("NotoSerifCJKjp-Medium.otf", 20)
second_font = dpg.add_font("NotoSerifCJKjp-Medium.otf", 10)

dpg.bind_font(default_font)

with dpg.window(label="Font Example", height=200, width=200):
dpg.add_button(label="Default font")
b2 = dpg.add_button(label="Secondary font")
dpg.add_button(label="default")

# set font of specific widget
dpg.bind_font(default_font)
dpg.bind_item_font(b2, second_font)

dpg.show_font_manager()
Expand All @@ -59,8 +67,19 @@ and latin supplement glyphs are added (0x0020 - 0x00FF).
Loading Specific Unicode Characters
-----------------------------------

There are several ways to add specific characters from a font file.
You can use range hints, ranges, and specific characters. You can also remap characters.
.. note::
This section previously described how to load specific characters from font file
so that they are displayed in the UI correctly. Since DPG version 2.3, character
glyphs are rendered automatically and there is no need to specify them in advance.
This section is no longer relevant, and the functions `add_font_chars`, `add_font_range`,
and `add_font_range_hint` are obsolete and do nothing if you call them.

Remapping Characters
-----------------------------------

For convenience, you can remap a character to a different character code and use
this replacement in your text strings. In particular, it might be useful with icon
fonts. Here is an example of how to do such remapping.

.. code-block:: python

Expand All @@ -71,26 +90,6 @@ You can use range hints, ranges, and specific characters. You can also remap cha
with dpg.font_registry():
with dpg.font("NotoSerifCJKjp-Medium.otf", 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(0x3100, 0x3ff0)

# add specific glyphs
dpg.add_font_chars([0x3105, 0x3107, 0x3108])

# remap や to %
dpg.add_char_remap(0x3084, 0x0025)

Expand Down
2 changes: 1 addition & 1 deletion sandbox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.13)
cmake_minimum_required (VERSION 3.16)

add_executable (DearSandbox)

Expand Down
3 changes: 1 addition & 2 deletions sandbox/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
log.log_critical("log critical")

with dpg.font_registry():
with dpg.font("../../assets/NotoSerifCJKjp-Medium.otf", 20, tag="custom font"):
dpg.add_font_range_hint(dpg.mvFontRangeHint_Default)
dpg.add_font("../../assets/NotoSerifCJKjp-Medium.otf", 20, tag="custom font")
dpg.bind_font(dpg.last_container())

demo.show_demo()
Expand Down
Loading
Loading