Automating import image

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
anesterenko
Posts: 3
Joined: Wed Mar 04, 2015 5:55 pm

Automating import image

Post by anesterenko »

Is there a way to automate the importing of images? I have hundreds, perhaps thousands of images that need to be converted into font codepoints, and i'd hate to do it manually for each image.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9877
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Automating import image

Post by Bhikkhu Pesala »

If you have the images already saved with suitable file names, just Drag and Drop them all at once into FontCreator. PDF or AI files will be very much faster. Bitmaps should be big enough to give a good trace, but bigger images will be slower, of course.

Size Does Matter Do some thorough testing with the import threshold settings and decide how big the images need to be to get a smooth trace. Don't bother creating hundreds or thousands of images that are next to useless for the required task.

Otherwise, try the method described in this tutorial.

Scanning an Entire Alphabet.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
poppakap
Posts: 2
Joined: Tue Jun 23, 2015 2:24 am

Re: Automating import image

Post by poppakap »

Other than drag and drop, there is no other way?
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9877
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Automating import image

Post by Bhikkhu Pesala »

poppakap wrote:Other than drag and drop, there is no other way?
What other way do other programs use?
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
poppakap
Posts: 2
Joined: Tue Jun 23, 2015 2:24 am

Re: Automating import image

Post by poppakap »

Often times programs will accept arguments. Other times they will allow you to script functionality for operations that are commonly performed.

For example, if one were to open up a text file, one could click the notepad icon, and navigate through the menu to select a text document to open.

Or one could write a bat script to pass in the name of 10,000 text files as arguments to notepad one at a time.

I can generate a thousand images using Java or another programming language, but manually importing the images into another program takes a considerable amount of effort and time.

I am asking because I do see that with the newer version of FontCreator, there is a new feature allowing the use of scripts, but I don't know what flexibility the scripts provide and I cannot find adequate documentation to answer these questions. I won't purchase the program unless I know that this is possible.

Thank you in advance!
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9877
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Automating import image

Post by Bhikkhu Pesala »

poppakap wrote:Often times programs will accept arguments. Other times they will allow you to script functionality for operations that are commonly performed.
What I meant was, “What other font editor programs will allow you to import images using scripting?” What are your alternatives to doing it manually?

OpenType scripting is for things like Glyph Substitution. For example, a font can contain a feature for using OldStyle figures. If the user enables OldStyle Figures in the supporting application for a font that has the OpenType OldStyle Figures feature, the script will automatically substitute a different glyph when the user types 0-9.

Code: Select all

lookup OldStyleFigures {
  sub zero -> zero.onum;
  sub one -> one.onum;
  sub two -> two.onum;
  sub three -> three.onum;
  sub four -> four.onum;
  sub five -> five.onum;
  sub six -> six.onum;
  sub seven -> seven.onum;
  sub eight -> eight.onum;
  sub nine -> nine.onum;
}
OldStyle Figures.png
OldStyle Figures.png (20.49 KiB) Viewed 3590 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9877
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Automating import image

Post by Bhikkhu Pesala »

The other kind of scripting that FontCreator supports is the Complete Composites feature, which can be used in conjunction with the Transform Wizard to add multiple new glyphs with character mappings to a font, but it won't generate new outlines from images.

The kind of macro scripting language that I imagine you're thinking of is discussed in this feature request thread. It is on the ToDo list, but not implemented yet. I honestly don't think there is much need for it now that we have the other automation features.

If you can generate the images with Java, drag and drop will soon get them into FontCreator, especially if you can generate Adobe Illustrator, EPS, or PDF vectors.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Post Reply