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

Not a valid font file ttf error (using Windows release binary) #17

Closed
moebiussurfing opened this issue Jun 8, 2022 · 4 comments
Closed

Comments

@moebiussurfing
Copy link

Describe the bug
Opening the generated ttf is giving an error.
.h file look fine.
That happened using one only font or/and merging/picking from many fonts.

Screenshots
fonts

Desktop (please complete the following information):
Windows 10

Additional context
Thats the binary that I used:
https://github.com/aiekick/ImGuiFontStudio/releases/download/b0.5/ImGuiFontStudio_Msvc_Win32.exe

Should I compile a new version from the repo by myself?

Thanks!

@moebiussurfing
Copy link
Author

moebiussurfing commented Jun 8, 2022

I compiled the current master branch binary,
but still getting the same error ...
(Also when only using one font.)
Any idea?

@aiekick
Copy link
Owner

aiekick commented Jun 9, 2022

Hello,
i know there is some problems with some fonts
chek this past issue : #14
the goal of this tool was first for programming and especially for imgui.
there is better tool for general use, like fontforge.
Not sure why its broken, the generation of font is partial, by ex, i not support composites glyphs and some others features.
this is why there is no release for the moment.
if you can open it with stb or freetype in ImguiFontStudio, so you will be able to open it with imgui for your app.
and this the why this tool was created.
btw you have the code, so you can try to found the bug, because i have no time to work on it for many months.

@moebiussurfing
Copy link
Author

Ok. thanks.

I tried to open the "broken" ttf and the .h into my ImGui project codes and it worked.
I don't need FontForge at all, or to open the font anywhere else,
I just want to make my ImGui buttons.

tempsnip

Now I need to learn a bit to layout fine into the buttons, centered etc..

@aiekick
Copy link
Owner

aiekick commented Jun 10, 2022

i think its better to use two font instead of one merged.
because when you merge glyphs, you have source fonts who have differents scale, base line and other things, than can produce different placement of glyphs in the same font. thais is why in ImGuiFontStudio there is a pane for preview the final font for a text.
image
because with it you can move glyphs for match your text

if you merged two font who are using the same params, its ok but if not can be an issue.

for your issue, you need to check the font scale at start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants