CImGui Greek Characters

Is possible to add some greek characters into CImGui text windows?
I tried on demo example and I figured out that all the ttf files in fonts directory of CImGui packages are out of every language except latin chars, so I downloaded OpenSans font copied to fonts directory and add to CImGui.
Here’s the code for Cyrillic(its just part of demo.jl with changed font and added glyph ranges):

fonts_dir = joinpath(@__DIR__, "..", "fonts")

fonts = CImGui.GetIO().Fonts

# default_font = CImGui.AddFontDefault(fonts)

# CImGui.AddFontFromFileTTF(fonts, joinpath(fonts_dir, "Cousine-Regular.ttf"), 15)

CImGui.AddFontFromFileTTF(fonts, joinpath(fonts_dir, "OpenSans-Regular.ttf"), 15, C_NULL, CImGui.GetGlyphRangesCyrillic(fonts))

And now I can add Chinese, Cyrillic, Japanese, Korean and Thai characters, but not Greek which are only(except latin, which is default) needed ones.

Can you be more specific about why Greek characters don’t work? Do you get an error? Do they not render correctly? Etc.

1 Like

There just ? signs occurring at places of these chars.
greekLetters

That seems to me like either the backing font library failed to render it (and you should try to figure out how to get the error log, if one exists), or such glyphs aren’t actually included in your font package.

1 Like

They are. I downloaded it from Google Fonts and I included greek characters in that. I even downloaded GFSDidot-Regular and it didn’t render Greek letters.

Ok, gotcha. Any chance that you could file an issue on https://github.com/ocornut/imgui with relevant details (and make sure you tell them you’re using the Julia package of CImGui.jl)? They might ask you to reproduce the behavior in C++, but it should be pretty straightforward to do so.

Probably solved now: