Auto copy a batch of characters from a font file to another?

I am a newer to FC. Now I have a font file contains about 40,000 glyph. Now I only need about 20,000. I konw the unicode ranges of the glyph I want:

{0x20ac,0x20ac,0x0023},
{0x2103,0x2103,0x0024},
{0x2116,0x2116,0x0025},
{0x2160,0x2179,0x0026},
{0x2190,0x2199,0x0040},
{0x2208,0x2208,0x004a},
{0x220f,0x2211,0x004b},
{0x221a,0x223d,0x004e},
{0x2248,0x224c,0x0072},
{0x2260,0x2265,0x0077},
{0x226e,0x226f,0x007d},
{0x2299,0x2299,0x007f},
{0x22a5,0x22a5,0x0080},

So now I want to create a font file with only the glyph I want from the original font file. Is there an antomatic way to do this? There are so many ranges, and it is difficult to do this manually.

It is easier and probably safer to just remove the glyphs you no longer need.

You can use the override range feature within the Glyph Transformer to select all glyphs you want to keep.
E.g. Characters: $0020,$0023-$0026,$20ac

Then you can invert the selection (Edit → Invert Selection) to delete all glyphs (Edit → Delete) you want to remove. Do ensure the first four glyphs are not selected when you delete the unwanted glyphs, as they should remain in the font.

It seems a good idea, but I still have problems. “Override range” could only select max 1000 glyphs, while I need about 20,000. How to solve this problem?

Also, I don’t understand why there are several limitation of 1000 glyphs in Font Maker.

Thanks

Ok, make yourself a brand new font file with the same mapping platforms (check Format:Platforms) and add 30000 glyphs, then try doing the override range thing (I didn’t even know about this feature before this conversation). Cut the 1000 selected glyphs from the origin font, then paste special with the outline, metrics, mappings, and postscript into the new font, overruling the mappings and just pasting over any characters the new font started with - they don’t matter to you. I assume that it will keep selecting the first 1000 that are still in the source font, so each time, you just keep removing the next thousand characters in the collection and pasting them in your new temp font. Once you’ve removed all the desired characters from the source font, select and delete all the remaining glyphs - except the first four. Then copy / paste special all the glyphs from your temp font back into the original one, and you should only have the characters you want.

I have two questions about this:

  1. Why not use temp font file (after add the first four glyths) as the final font file? Any differences by delete all but the first four and copy from temp file back to orignal one?
  2. By this way, I found the file size is even much larger than the original one, although the latter contains much more glyths. The basic aim of delete some glyths is to reduce the file size.

Thanks.

  1. The reason to use the original font file is that all the name fields, metrics, tables, italic angle, PANOSE, etc. don’t have to be generated from scratch.

  2. Check the font for a bunch of blue colored postscript names. It could be that a bunch of characters are actually composites that are simply two other characters put together. Copying them over to another font will convert the composite characters into simple outline characters, requiring some more storage. I don’t think that’s the issue, but Erwin may have some idea. If you were willing to post the fonts to the forum, I could take a look at them and see if I can suss out what the issue is.

Then you also know the Unicode codepoints you no longer want.

Use the Glyph Transformer to select them per 1000 (due to the limit of the characters you can put into the override range feature) and then delete the selection. You will have to perform this step at least 20 times, each with the remaining codepoints you want to remove.

OK. This seems the best solution. Thank you all.