Skip to content

Commit

Permalink
[imgui] Switch to plutosvg
Browse files Browse the repository at this point in the history
Still doesn't build with lunasvg 3,
and imgui misc/freetype/imgui_freetype.cpp states:
2024/10/17: added plutosvg support for SVG Fonts (seems faster/better than lunasvg).
  • Loading branch information
dg0yt committed Feb 1, 2025
1 parent 33820b6 commit f78c6c9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions ports/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ if(IMGUI_FREETYPE)
target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE)
endif()

if(IMGUI_FREETYPE_LUNASVG)
find_package(unofficial-lunasvg CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC unofficial::lunasvg::lunasvg)
target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE_LUNASVG)
if(IMGUI_FREETYPE_SVG)
find_package(plutosvg CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC plutosvg::plutosvg)
target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE_PLUTOSVG)
endif()

if(IMGUI_USE_WCHAR32)
Expand Down
4 changes: 2 additions & 2 deletions ports/imgui/imgui-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ if (@IMGUI_FREETYPE@)
find_dependency(freetype CONFIG)
endif()

if (@IMGUI_FREETYPE_LUNASVG@)
find_dependency(unofficial-lunasvg CONFIG)
if (@IMGUI_FREETYPE_SVG@)
find_dependency(plutosvg CONFIG)
endif()

if (@IMGUI_BUILD_ALLEGRO5_BINDING@)
Expand Down
2 changes: 1 addition & 1 deletion ports/imgui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
vulkan-binding IMGUI_BUILD_VULKAN_BINDING
win32-binding IMGUI_BUILD_WIN32_BINDING
freetype IMGUI_FREETYPE
freetype-lunasvg IMGUI_FREETYPE_LUNASVG
freetype-svg IMGUI_FREETYPE_SVG
wchar32 IMGUI_USE_WCHAR32
test-engine IMGUI_TEST_ENGINE
)
Expand Down
7 changes: 4 additions & 3 deletions ports/imgui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "imgui",
"version": "1.91.8",
"port-version": 1,
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
"homepage": "https://github.com/ocornut/imgui",
"license": "MIT",
Expand Down Expand Up @@ -50,16 +51,16 @@
"freetype"
]
},
"freetype-lunasvg": {
"description": "Add support to render OpenType SVG fonts using LunaSVG",
"freetype-svg": {
"description": "Add support to render OpenType SVG fonts",
"dependencies": [
{
"name": "imgui",
"features": [
"freetype"
]
},
"lunasvg"
"plutosvg"
]
},
"glfw-binding": {
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,7 +3682,7 @@
},
"imgui": {
"baseline": "1.91.8",
"port-version": 0
"port-version": 1
},
"imgui-node-editor": {
"baseline": "0.9.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/imgui.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0acf8f3c1aefea0176cdb6e5a610bbeaf2d610f6",
"version": "1.91.8",
"port-version": 1
},
{
"git-tree": "7da1879e3d83f8699c2be2dfb1553db32e033d42",
"version": "1.91.8",
Expand Down

0 comments on commit f78c6c9

Please sign in to comment.