Tools to embed big font files (or smaller good Asian fonts?)

Hi there,

I’m sure many of you have come across the same problem. Projucer Binary Resources are limited in size because of heap errors given by the Visual Studio compiler. I’m trying to embed Korean, Chinese and Japanese fonts ( GitHub - notofonts/noto-cjk: Noto CJK fonts ) in TTF format in the plugin binary but I can’t get around those errors because of how big are the TTF files…

Do you recommend any particular libraries to include those files either compressing them to avoid VS compiler heap errors or splitting them in different files? (Projucer doesn’t split single files marked as Binary Resoures). Is there a JUCE module out there that helps out with this task? I found this tool: GitHub - jgaa/mkres: Utility to embed files in C++ projects . Any experiences with it?

Or maybe can you recommend me any good quality Asian fonts that are smaller in size? :slight_smile:

Thanks much in advance!

PS. I’d like to avoid converting the project to CMake so I have a preference for solutions that don’t require it.

I would say it depends on the number of characters that you want to include in your fonts. Let’s take Simplified Chinese fonts as an example.

If you want to include a hugh number of Simplified Chinese characters, you need to include both common characters and uncommon characters. In such case, I don’t think it is a good idea to embed the font in your plugin binary. Instead, I would suggest letting users to choose the font from their font library.

However, if you only want to support a Simplified Chinese UI, I think you can subset the font to make it only include the characters that are used in the UI, such as “增益”、“频率”、“带宽”, etc. I have used a Python library to do subsetting but I can’t remember which one.

1 Like

Brilliant, my western mind hadn’t thought of adding only the characters used! Makes sense. If you remember which pythin library you used let me know otherwise I will look that up myself. PS. Yes I’m using Simplified Chinese.

As an alternative approach, you could install the font alongside your app rather than embedding it. That has the added bonus of allowing you to have localised installers that only include the fonts your users actually need.