Bug: font studio generates broken fonts
Vine1 opened this issue · 7 comments
Hi! You created an awersome tool. Thank you! But it doesn't work for me.
I get an error after generating a font:
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)
I hope for your help! Thanks in advance!
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 :)
i just commited a fix. its working on my side. can you confirm ?
@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:
Also, I tried to do it several times with other font files under root, still doesn't work. With STB too.
yes i seen this issue with a bad message. jsut corrected too.
now its working ?
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:
Font generated by font studio with all selected glyphs(but works in ImGui and font studio):
This is not a big problem, the main thing is that imgui normally opens the font.
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..
to be sure, what is the name of your foot viewer ? for found it and do some tests with him