aiekick / ImGuiFontStudio

Embedded Font Helper Gui Tool for programming
Apache License 2.0
384 stars 33 forks source link

How to merge all final glyphs to a new file #9

Open SuperWangKai opened 4 years ago

SuperWangKai commented 4 years ago

Hi Aiekick,

Thank you for such a cool tool!

I'm testing a feature to save all final selected fonts to a single .ttf file and generate a header for all the glyph. In this case, no matter if a source font file in the project is used (i.e. has its glyph(s) selected), since it is a candidate and I may use it next time, a final .ttf should be exported.

I'm not sure if the "Merge" mode is the correct mode in this use case, but the Generator::GenerateFontFile_Merged function returned with error.

aiekick commented 4 years ago

Hello,

Thank you

yes, at the moment the blend mode has a big problem, it also crashes on my end every other time. and when it succeeds, there is a problem with fonts that do not have the same scale. some glyphs are small and some are tall.

for now, it is better to have a font file in subsets, instead of using merge mode.

but you can also help fix this feature via PR or other. it's complicated to write a TTF file format, especially the GLYF table. Google's sfntly lib helps a lot, but it's still difficult for the moment and for several months I will not have time for that

Sorry :)

SuperWangKai commented 4 years ago

Thank you Aiekick! For this project and the patient explanation. Currently, I'm converting all icons in SVG format into a single ttf file and using ImGuiFontStudio to validate and generate C/C++ header! The workflow works alright. I will open source my scripts if I have other weekend time.

Best regards

SuperWangKai commented 3 years ago

https://github.com/SuperWangKai/iconify2font

Uploaded scripts used to generate font files from iconify (https://github.com/iconify/iconify).

aiekick commented 3 years ago

what is the relation with this post ?

SuperWangKai commented 3 years ago

@aiekick Please see my last comment.

aiekick commented 3 years ago

i see your last comment but i always dont know the relation with this post. because this stuff is not related ti ImGuiFontStudio its more like an advertising :) ? is not ?

SuperWangKai commented 3 years ago

Haha, not really, I really wish this issue got fixed so I don't need to use my temporary scripts for the work around, which is never expected to be a serious project. Additionally, we need colored icons which will be supported by ImguiFontStudio. This tool has project to manage all the icons, which is also a big plus.

aiekick commented 3 years ago

ok haha, nice poject btw