Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[freetype branch] Color Font are Displayed in MonoChrome #10

Closed
aiekick opened this issue Sep 15, 2020 · 7 comments
Closed

[freetype branch] Color Font are Displayed in MonoChrome #10

aiekick opened this issue Sep 15, 2020 · 7 comments
Labels
bug Something isn't working freetype imgui freetype

Comments

@aiekick
Copy link
Owner

aiekick commented Sep 15, 2020

hello @pshurgal,

sorry for disturb you, you have created a pull request regarding imgui freetype branch for color font.

for have color font support in ImGuiFontStudio i need first to have the ability to laod and display color font.

but he not work. all glyph are displayed in monochrome.

can you check this branch if you have time, maybe im wrong somewhere?
https://github.com/aiekick/ImGuiFontStudio/tree/freetype

Thanks

@aiekick aiekick added bug Something isn't working freetype imgui freetype labels Sep 15, 2020
@pshurgal
Copy link

Hello, I have just seen you message. Ok, I'l have a look. But first are you sure you are using right font file? As i said in original PR it seems that freetype does not support colors in SVGinOT fonts yet. So you have to check are there CPAL and COLR tables listed inside your font file. You can just open the font file in HEX editor and look which tables are listed in the beginning of the file.
image

@aiekick
Copy link
Owner Author

aiekick commented Sep 18, 2020

Yep i have checked the font, and there is the tables CPAL and COLR.
i have put a button for switch freetype/imgui rasterizer and activate or not the color.
when i activate color, the smiley was filled in black, and its logic to be filled, sicne this color is layered, but dont understand why no color appearing.
im using the windows font you mention in your PR : C:\Windows\Fonts\seguiemj.ttf

@pshurgal
Copy link

Ok, I'll have a look

@aiekick
Copy link
Owner Author

aiekick commented Sep 18, 2020

see, what i was talking :
2020-09-18_12-12-18

you have a windows build here :
https://github.com/aiekick/ImGuiFontStudio/actions/runs/260916146

@aiekick
Copy link
Owner Author

aiekick commented Sep 18, 2020

i though i was just the widget display who was not ok, but when you check the texture, she appears also in two colors :
2020-09-18_12-16-16

@aiekick
Copy link
Owner Author

aiekick commented Sep 19, 2020

i found the bug haha. it was not imgui_freetpe :) but my soft

i defined the flag but not pass it to buildatlas.

in fact its weird to have extra_flags in buildatlas func, since flags can be passed directly to font_config->RasterizerFlags

ImGuiFontStudio_Msvc_x32_6zBrm4g5lo

@aiekick aiekick closed this as completed Sep 19, 2020
@pshurgal
Copy link

pshurgal commented Oct 2, 2020

@aiekick, hello, I have just added a fix into colored glyphs branch which fixes colors and antialiasing pshurgal/imgui@1cc96e7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working freetype imgui freetype
Projects
None yet
Development

No branches or pull requests

2 participants