imgui-sfml: [Linux] Font rendering problem
Hi @eliasdaler! Today I treid to setup Imgui and SFML on my linux machine (newest Manjaro Deepin) but an unexpected problem occured. The imgui font isn’t rendering properly, I can see only some glitches, like on the screenshoot. I asked @ocornut about it but he only said that I should ask you.
Here’s the screenshoot.

My main.cpp looks exactly like this one from the readme so the problem isn’t probably there.
my cmakelists.txt file looks like this :
cmake_minimum_required(VERSION 3.7)
project(untitled)
set(CMAKE_CXX_STANDARD 14)
set(SOURCE_FILES main.cpp)
#detect and add all imgui files
file(GLOB imgui_src "imgui-master/*.*" )
file(GLOB imgui_sfml_src "imgui-master/imgui-sfml-master/*.*" )
file(GLOB fonts "imgui-master/extra_fonts/*.*")
#prepare executable
add_executable(untitled ${SOURCE_FILES} ${imgui_src} ${imgui_sfml_src} ${fonts})
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
#Find any version 2.X of SFML
#See the FindSFML.cmake file for additional details and instructions
find_package(SFML REQUIRED network audio graphics window system)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(untitled ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
endif()
# OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
if (OPENGL_FOUND)
target_link_libraries(untitled ${OPENGL_LIBRARIES})
# or: target_link_libraries(${EXECUTABLE_NAME} ${OPENGL_gl_LIBRARY})
target_link_libraries(untitled m) # if you use maths.h
endif()
I also tried solutions mentionek in #23 , they didn’t help too.
Thanks a lot for any help!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (10 by maintainers)
@MonkahTV check it out, looks good to me. (Don’t forget to get the latest version)