ImGuiFontStudio icon indicating copy to clipboard operation
ImGuiFontStudio copied to clipboard

How to merge all final glyphs to a new file

Open devkaiwang opened this issue 5 years ago • 8 comments

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.

devkaiwang avatar Aug 29 '20 11:08 devkaiwang

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 :)

aiekick avatar Aug 30 '20 06:08 aiekick

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

devkaiwang avatar Aug 30 '20 13:08 devkaiwang

https://github.com/SuperWangKai/iconify2font

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

devkaiwang avatar Oct 06 '20 12:10 devkaiwang

what is the relation with this post ?

aiekick avatar Oct 07 '20 05:10 aiekick

@aiekick Please see my last comment.

devkaiwang avatar Oct 07 '20 09:10 devkaiwang

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 ?

aiekick avatar Oct 07 '20 10:10 aiekick

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.

devkaiwang avatar Oct 07 '20 10:10 devkaiwang

ok haha, nice poject btw

aiekick avatar Oct 07 '20 11:10 aiekick