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

Bug: font studio generates broken fonts #14

Closed
Vine1 opened this issue Jan 22, 2021 · 7 comments
Closed

Bug: font studio generates broken fonts #14

Vine1 opened this issue Jan 22, 2021 · 7 comments
Labels
bug Something isn't working freetype imgui freetype

Comments

@Vine1
Copy link

Vine1 commented Jan 22, 2021

Hi! You created an awersome tool. Thank you! But it doesn't work for me.
I get an error after generating a font:
image
As far as I understand, it tries to load just generated font, but it can't because the font is broken. Also, I tried to manually open generated font using OS font viewer and font studio, both give an error.

How I have compiled it:

  • Cloned master branch with submodules
  • Executed terminal command cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
  • Then cmake --build build --config Release
    And it was built successfully.

Then I just created a new project, opened just downloaded FontAwersome font, selected all glyphs, and pressed generate. I didn't change any settings.
Font studio opened header file (ok), png (ok), but the font generated by the studio was broken, so, I got this error message.
Also, I tried different fonts.

OS: Linux 5.10
Compiler: GCC (10.2)
CMake: latest (3.19)

Screenshot:
image

I hope for your help! Thanks in advance!

@aiekick
Copy link
Owner

aiekick commented Jan 22, 2021

So its not an awesome tool, if you cant make it working :(

i reproduce the same issue than you. freetype was NOk, but stb was OK

if you select STB rasterizer he is working ?

i know, than the font writer have issues with freetype (this is why there is no release for the moment, many bugs on generation)
im curently write my own, for quit sfntly

for your issue i will analyse and maybe adress a quick fix if i found it :)

aiekick added a commit that referenced this issue Jan 22, 2021
…o load the font. (not STB) (#14)

[UPD] : update of ImGui v1.80 and ImGuiFileDialog
@aiekick
Copy link
Owner

aiekick commented Jan 22, 2021

i just commited a fix. its working on my side. can you confirm ?

@aiekick aiekick added bug Something isn't working freetype imgui freetype labels Jan 22, 2021
@Vine1
Copy link
Author

Vine1 commented Jan 22, 2021

@aiekick I checked the STB rasterizer in the previous commit, it doesn't work too.
Also, I checked the latest commit, but there is another problem. I can't generate a font. It gives me an error "Could not open font file", but the font file had been opened earlier. Screenshot:
image
Also, I tried to do it several times with other font files under root, still doesn't work. With STB too.

@aiekick
Copy link
Owner

aiekick commented Jan 22, 2021

yes i seen this issue with a bad message. jsut corrected too.

now its working ?

@Vine1
Copy link
Author

Vine1 commented Jan 22, 2021

Oh, I just forgot to select glyphs =)
Now fonts generate correctly with both modes. Almost. Generated font can be correctly opened in font studio and from ImGui, but the Linux default font viewer still can't read the font. The original font reads normal.
Original font:
image
Font generated by font studio with all selected glyphs(but works in ImGui and font studio):
image
This is not a big problem, the main thing is that imgui normally opens the font.

@aiekick
Copy link
Owner

aiekick commented Jan 22, 2021

ok, until i not regenerate all font object; this kind of things can happen. my goal is not to do a general font tool. for that there is better alternative like fontforge. my tool is mores specific for programmer and especially embedded font. and truetype is a old format many tool sue different rules for say if a ttf is ok or not. some time freetype not want to open font, but other tool are ok..
so not sure if we can have a good way in all cases :)
i will check this tool. but maybe another table is wrong, i just generated the base tables..

i jsut tried with fontawesome.ttf (in sample_fonts) dir and it work also in linux font viewer i have on my ubuntu.. weird..

@Vine1 Vine1 closed this as completed Jan 22, 2021
@aiekick
Copy link
Owner

aiekick commented Jan 23, 2021

to be sure, what is the name of your foot viewer ? for found it and do some tests with him

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