How can I delete all characters from a TTF font file that are not used in a given text sample with Fontforge? In other words I want to create a subset from an existing font which contains only the characters that actually show in my text.
Here's a small example: There is a text file that contains the words "사슴 코끼리 당나귀". So how can I delete all the other characters from the font file that are not part of that small text sample? In the end I want to end up with a new TTF file that contains only the used characters. The actual text is longer than this, so searching manually in fontforge is not an option.
In fontforge there are certain selection options (Main Menu > Edit > Selection), and I tried "Select by Wildcarcds" after converting the korean characters into their unicode sequences. But no luck yet.
Thanks a lot for any ideas! kind regards
EDIT: use case: I am creating children's ebooks which by their nature consist mainly of images. The text, however, is not part of the pictures but is displayed on an additional layer that is displayed in foreground of the pictures . The ebook files (I am producing mainly for amazon kindle) consist of some meta data, the image files, layout information and of course the font files. The Amazon Kindle publishing program has very strict file size restrictions. In order for a book to be sold for the certain price range that I'm going for, the file size must not exceed 3 megabytes. That is ok when I use a western font set. But my ebooks are bilingual and for the Korean edition I need to add a Korean font (in addition to the western font). Asian font files are comparatively huge due to the nature of their alphabets / glyphs. storing 20.000 (in extreme cases up to 200.000) glyphs makes for ~ 7-12 megabytes per font weight. Again, my overall book filesize limit is 3 megabytes which has to do for all the pictures and the font files (plus the layout and meta files). Knowing that the text of an ebook is not altered by the reader it is safe to discard all the glyphs from the font that are not used in my text. Not filling up the storage of the user's reading device unneccessarily is another consideration here. I already compressed the image files heavily and cannot go any further with compression as the quality starts suffering at certain compression rates. I hope now it's clear why I think subsetting the font is a good solution.