Skip to content

Get assert while enable bitmap mode for freetype #4145

Closed
@xyc19970716

Description

@xyc19970716

Version/Branch of Dear ImGui:

Version: 1.83 WIP
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp
Compiler: mingw64 gcc8.1.0
Operating System: windows 10 x64

My Issue/Question:

I use the clion to program my project. When i see the imgui_freetype.h/.cpp, it can enable bitmap mode. I want to use this function, but i get assert like next screenshot after i set like this pull 3879.

Screenshots/Video
image

Standalone, minimal, complete and verifiable example: (see #2261)

ImFontConfig font_config;
font_config.SizePixels = 13.0f;
font_config.FontBuilderFlags = ImGuiFreeTypeBuilderFlags_Bitmap;
io.Fonts->AddFontFromFileTTF("c:\\windows\\fonts\\msgothic.ttc", 13.0f, &font_config, io.Fonts->GetGlyphRangesJapanese());

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions