Creating an font (OTF/TTF) with specific Asian characters

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
ozzzy
Posts: 4
Joined: Fri Feb 15, 2008 1:33 am

Creating an font (OTF/TTF) with specific Asian characters

Post by ozzzy »

Is there an automated method of pairing down an existing Asian OTF/TTF font to include only specific characters based off of a list of Unicode character codes (hex or decimal)? I'm looking to create a font with only characters used in translations and to keep the file size as small as possible.

Thanks!
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9878
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Post by Bhikkhu Pesala »

Creating a new font with only specified characters is easy enough by using the Insert Character dialogue, but I cannot think of a way to extract only specified characters from a font, or to delete all of the others. You can, of course, sort the font, then find a particular code-point, and start manually selecting and deleting from there.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
ozzzy
Posts: 4
Joined: Fri Feb 15, 2008 1:33 am

Post by ozzzy »

Thanks for the reply. Unfortunately manually deleting glyphs will be too time consuming especially if translations are updated. The Japanese font I'm working with has roughly 7000 characters and the translations use about 1500 characters. I can't delete a range because these characters are not side by side.

This seems simple enough, but there I can't find an English font tool that does this. The Japanese utility, TTEdit and OTEdit (http://musashi.or.tv/ttedit.htm) can take a list from a CSV file and copy characters into a new font, but this doesn't work with Korean Hangul characters.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9878
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Post by Bhikkhu Pesala »

I think there is a viable way to do this. Experiment on a small font first.
  • Create a new font
  • Select all, and delete all of the glyphs
  • Use insert characters to add empty glyphs with the mappings that you want from a text file of code-points, e.g. 97,99,101 to add a, c, e
  • Select all and copy, making a note of the number of glyphs (3 for this test)
  • Switch to your test font
  • Insert empty glyphs at the end of the font (3 for this test)
  • Select them and use Paste Special
  • Add mappings, with Overrule same mappings
At this stage the desired glyphs exist in the font, but have been stripped of their mappings. They still have their Postscript names.
  • Sort the font by the default order.
  • The desired glyphs with no mappings now appear at the end of the font.
  • It is now easy to select the rest of the unwanted glyphs with click and shift click (leaving the essential glyphs at the start of the font).
  • Delete them.
  • Format, Platform Manager, and delete all of the platforms.
  • Add back the platforms you need, choosing to generate mappings from the postscript names.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Dave Crosby
Typographer
Typographer
Posts: 793
Joined: Mon Feb 23, 2004 1:13 pm
Location: Enoch, Utah

Sample

Post by Dave Crosby »

Another possibility is to use Sample.

Start a new font and make the old font the Sample on the left side.
Drag in the glyphs you want.
This way you are entering 1500 glyphs instead of deleting 5500.

Personally, I think Deleting in batches is the best solution.

1. From the main window select a beginning glyph.
2. Hold down the Shift key and select the last glyph in the series you wish to delete.
All selected glyphs in the series will change color.
3. Press the delete button.
4. Move on to the next batch.
Aut nunc aut nunquam
ozzzy
Posts: 4
Joined: Fri Feb 15, 2008 1:33 am

Post by ozzzy »

Thanks for the workaround and all of your help Bhikkhu. I think I have it working up until sorting the unmapped glyphs.

The Japanese font that I'm using to test (FOT-RodinPro DB) does not appear to have Postscript names filled in for any of the glyphs. I'm currently looking for a way to autoname them based off of their unicode mappings.

Several characters are missing unicode mappings too; The Mappings section in the glyph's properties is blank (Properties > Mappings). I presume these can be removed from the font as these cannot be referenced anyways.

Also I'd like to clarify a few of the steps:

Add mappings, with Overrule same mappings

Glyph Outline Data, Glyph Metrics and Glyph Mappings are all selected when pasting the characters from the new font?

Sort the font by the default order

Sorting by "Microsoft Unicode or Symbol code points" is correct?

It is now easy to select the rest of the unwanted glyphs with click and shift click (leaving the essential glyphs at the start of the font)

I'm not that much of a font expert, is there a specific unicode range to leave in?
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9878
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Post by Bhikkhu Pesala »

ozzzy wrote:The Japanese font that I'm using to test (FOT-RodinPro DB) does not appear to have Postscript names filled in for any of the glyphs. I'm currently looking for a way to autoname them based off of their unicode mappings.
Format, Post, Generate Names.
Several characters are missing unicode mappings too; The Mappings section in the glyph's properties is blank (Properties > Mappings). I presume these can be removed from the font as these cannot be referenced anyways.
Unmapped glyphs may be referenced internally by composites. Right-click and check "Used by." They can also be referenced by OpenType Glyph Substitutions. If they are used by composites, removing them will increase the file size as the composites will all be made simple. Minglu uses many unmapped glyphs as composite members — each brush stroke.
Glyph Outline Data, Glyph Metrics and Glyph Mappings are all selected when pasting the characters from the new font?
Make sure you uncheck what you don't want to paste. I think you want only the mappings. If you don't check overwrite same mappings it won't strip the mappings off of the existing gyphs.
Sorting by "Microsoft Unicode or Symbol code points" is correct?
Whatever works for you is correct. This is very much experimental. I have never needed to do anything like this before. It may not even work at all, which is why I suggested experimenting on a small font first as your large font will take a long time to sort. On my PC, working with Minhlu.ttf is painfully slow.
I'm not that much of a font expert, is there a specific unicode range to leave in?
See Recommended Glyphs in the manual.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
ozzzy
Posts: 4
Joined: Fri Feb 15, 2008 1:33 am

Post by ozzzy »

Okay, Postscript naming is set for everything that is mapped.

The "Used By..." option is grayed out on all of the unmapped glyphs. This font file is OTF, it appears to be using the GSUB for quite a few characters, the TTX dump of the GSUB table is big. Many of these are sideways and circled/squared characters.

I'll try this out, removing the unmapped glyphs and comparing the number of characters to the original character list to ensure everything copied over.

Thanks again!
Post Reply