mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-10 19:03:30 +00:00
Freetype + lunasvg, ImGui compilation error #6842
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#6842
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
My Issue/Question:
Hi,
I'm trying to make svg font work. I've followed the instruction here: https://github.com/ocornut/imgui/tree/master/misc/freetype. I have Freetype 2.13 installed on my system, and I've added the latest version of lunasvg (v.2.3.8) to my project.
If I define IMGUI_ENABLE_FREETYPE_LUNASVG, then I get the following compilation error (on gcc 11.3):
If I look at the line in
imgui_freetype.cpp, I see that:If I replace
IM_DELETEbyIM_FREE, the code compiles, because_stateis not an object. However, I'm not so familiar with theimgui_freetype.cpp, so I'm not sure if this introduces a memory leak. Should I make a PR for the correction ?You'll need to move this to discussions if you want an answer.
Looks like GCC introducing a new over-zealous warning with calling delete on a
void*or something. Will investigate.The correct call would be
IM_DELETE((LunasvgPortState*)*_state);here.This caused indeed a small leak, and GCC warning was useful.
Pushed fix:
d6360c1Thank you!