Working With Transformations

Before asking a question on FontCreator look here for possible solutions and tutorials. Please do not post support requests here.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 6934
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Working With Transformations

Post by Bhikkhu Pesala » Sun Jan 08, 2006 11:10 am

In FontCreator 11.0, in Tools, Options, Advanced, “Copy Data Files to User Data Folder” now copies the Transform scripts to a folder along with Composite and Unicode data. Backup this folder if you create custom scripts. The originals will remain in the Program Files folder should you wish to restore them.

The transform feature is useful for making new typestyles from existing fonts. It is not available in the Home Edition, but only in the Professional Edition or in the thirty-day Free Trial. Please see this comparison chart and the Registration Page for details.

Oblique or ItalicOutline or HollowMaths Symbol and SymbolCondensed ThinSuperscriptsThin With High ContrastSmall Capitals in the Private Use Area

New Features in FontCreator 10

Optimize ContoursOverride Range by Glyph NameInverse

New Features in FontCreator 10.1

Unmapped Small CapitalsUnmapped Tabular or Proportional FiguresUnmapped Stylistic Alternates

General Advice for Working With Transformations

Select at least one glyph (e.g. the space glyph) before running transformations. If no glyphs are selected at all, all glyphs in the font will be prepared for transformation, the transformation will take longer, and all hinting will be removed.

Because transformations cannot be undone, copy the glyphs that you are going to transform, and leave them selected. After running the transformation, paste the clipboard contents back into the same glyphs, and undo the paste operation. You can then redo the paste operation if you want to try different values for the transformation.

Small Capitals

Before running this transformation, copy the Capital Letters of your font to the lowercase positions, and select them.

The Small Capitals transformation scales the uppercase by about 75%. To compensate for the scaling the stroke weight needs to be increased with a bold transformation.

Code: Select all

Scale 73,73, about fixed point 0,0
Bold 22,15 (adjust to suit your font)
Move 22,15 (align visual baselines)
Left side-bearing at x = 0
However, the bold transformation is not perfect. Thin strokes and serifs are made thicker by the same amount as thick strokes. After applying the transformation one needs to make some corrections. This is easy when you know what to look for. Compare the original E and the transformed result.

Serifs Are Too Thick

Image

The Serifs are too thick. Zoom in close to see exactly what happened.

Image

All you need to do is select a few nodes and move them to the right:

Image

Intersectinh Co-ordinates

Sometimes when a node is moved it crosses the contour giving a result like this (Capital A).

Image

Just move the offending node to correct this problem.

Thin Strokes

Thin strokes are made bolder by the same amount as thick strokes.
Ideally, they should be made bolder in proportion to their original weight.

Image

Use the lassoo tool to select the nodes that need to be moved.

Image

Move them to the left until the strokes are in the correct proportion.

Image

Reduce the advance width by the same amount.
Last edited by Bhikkhu Pesala on Sat May 26, 2007 9:17 am, edited 7 times in total.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Oblique or Italic Transformations

Post by Bhikkhu Pesala » Wed May 31, 2006 10:33 am

Oblique or Italic (Updated for FontCreator 6.2)

These are easy and usually work well, though they can only make an oblque version of your font, not a true italic. To convert a regular font to oblique, first you need to modify the settings on Format, Setttings, Classification, Mac Style and Font Design, to Italic.

Then set the italic angle on the General tab of the same dialogue. Italic angles are usually negative. Enter the value you want, e.g. -7.5º (the dialogue will round this to an integer), then calculate the caret slope rise and run. Note the caret slope run value. For -7.5º the caret rise/run will be 1000/132, so the skew value you need to use in the transformation is 13.2

The Italic transformation in recent versions of FontCreator will do the above steps automatically if you check the box on the Transform Wizard that says: “Set font subfamily and font design to italic.”
Italic Transformation.png
Italic Transformation.png (20.23 KiB) Viewed 17934 times
Select all of the glyphs that you want to transform, and copy them to the clipboard (because Transforms cannot be undone). From the tools menu, select "Glyph Transformer" or click the Glyph Transformer icon on the Standard toolbar.

On the glyph Transform Wizard Dialogue, open a script. Since Oblique7.5 is not listed, pick any other oblique transform, and modify the horizontal skew value to 13.2

All of the oblique transforms skew the glyph about the origin. Before you proceed, and while the glyphs are still selected, paste the glyphs from the clipboard, and undo the paste operation.

If you're not satisfied with the result, you can now redo the paste operation and make adjustments to the transformation.

For example, you may find that you also need to move the glyphs horizontally. When you are satisfied that you have found the best combination of skew and horizontal movement, save your transformation for future reuse from the Transform Wizard dialogue.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Outline or Hollow Transformations

Post by Bhikkhu Pesala » Thu Jun 01, 2006 5:19 pm

Outline or Hollow

This is another easy transformation to use that generally works well.

Select all of the glyphs that you want to transform, and copy them to the clipboard (because Transforms cannot be undone). From the tools menu, select "Glyph Transformer" or click the Glyph Transformer icon on the Standard toolbar.

On the glyph Transform Wizard Dialogue, open the Outline script. The default weight of the outline stroke is 50 funits. Click OK to apply the transformation.

Before you proceed, and while the glyphs are still selected, paste the glyphs from the clipboard, and undo the paste operation. If you're not satisfied with the result, you can now redo the paste operation and make adjustments to the transformation.

This is How the Transformation Works

Image

The glyph gets bigger by 50 funits in each dimension, and a reversed (white) contour is generated inside of it. The dotted lines shows the original contours of the glyph. You may need to adjust glyph metrics to compensate for the slight increase in size (about 3% in this example), or you could scale the glyph by 97% in each direction to compensate for the increase in size.

Problem Glyphs

As with most transformations, there may be some glyphs where it doesn't work perfectly. Wherever there is a sharp change of direction in the contours, some manual adjustment may be needed afterwards as in this lowercase r illustrated below — before (left) and after manual adjustment.

Image
Last edited by Bhikkhu Pesala on Sun Jun 18, 2006 8:26 am, edited 2 times in total.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Maths Symbol and Symbol

Post by Bhikkhu Pesala » Thu Jun 01, 2006 8:10 pm

These two are very simple. All they do is set the width and centre the glyph. In most fonts the maths symbols like < = > + ± should be the same width as the figures. Just modify the width value to suit your font and save the transformation for reuse.

The Symbols transformation is intended for use with Miscellaneous Symbols, Dingbat, or Arrows. Many of these should be the same width, e.g. all of the Chess pieces.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Condensed Thin

Post by Bhikkhu Pesala » Thu Jun 01, 2006 8:21 pm

This transformation scales the glyph horizontally, reduces the stroke weight, and scales the glyph vertically to compensate for the resulting reduction in the glyph height. I designed it to maintain the glyph height for the template font (Bitstream Vera), and to reduce the vertical stroke weight from 202 funits to 82. This results in a Panose Classification of Thin. See Dave Crosby's Panose Tutorial for an explanation of the Weight Ratio.

For different fonts, you will have to adjust the values both for scaling, and for reducing the stroke weight.

As with the previous transformations, copy the selected glyphs that you are going to transform so that you can paste and undo/redo the paste operation to try different values until you get the ideal result.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Superscripts

Post by Bhikkhu Pesala » Mon Jun 19, 2006 10:12 am

Superscripts can be scaled from the existing figures in a font, but if we just scale them, they will be too light compared to the rest of the font.

First, measure the weight of digit 1.

Image

In this font it is 160 funits. If the superscript transformation scales this by 65% horizontally it will be only 104 funits. To compensate, we need to use the bold transform with a horizontal value of 28 funits. This will thicken the stroke by 28 funits in both directions, resulting in a vertical stroke of 160 funits — 104 + 28 + 28.

The horizontal strokes in this font are 140 funits. If the vertical scale factor is 60% the vertical transformation would again need to be 28 (140 - 84)/2

This illustration shows the original digit 2, the digit 2 after scaling (centre), and the digit 2 afer scaling and bold transformation (right).

Image

You can see that with scaling alone, even though we compensate by scaling 65% horizontally but only 60% vertically, the superscript is too light. The weight of the superscript is correct after the bold transformation has been applied. However, the thin strokes and serifs are now too heavy. We need to adjust them manually by moving a few nodes.

Image

Each font will need a slightly different transformation. The superscript transformation installed with FontCreator only suggests average values. You may also prefer to raise the superscripts higher. The transformation is designed to align the tops of superscripts with the tops of numerals. 1¹

The width of the superscripts can be calculated from the figure width. If the figure width is 1000 funits, the superscript width should be set to 650 + 56 funits = 706 funits.

Subscripts

After you have made the superscripts, you can use the Subscript Transformation to insert the Subscripts. This merely creates composites of the superscripts, and moves them down by a fixed value as defined in CompositeData.xml. The most useful position for subscripts as recommended by Microsoft Typography is subscripts that are bisected by the baseline. Depending on the size and height of the superscripts in your font, you will have to adjust them all vertically by the same amount. The widths are normally uniform, and the same as the superscripts.

Superscripts and Subscripts in Italic typestyles may need to be offset horizontally to compensate for the italic angle. The recommended position is centred between figure zeros.

Image
Last edited by Bhikkhu Pesala on Wed Jun 13, 2007 9:05 am, edited 2 times in total.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Thin With High Contrast

Post by Bhikkhu Pesala » Mon Feb 19, 2007 6:07 pm

If the glyphs have even strokes you can use a single transformation on the whole font and get a satisfactory result. However, if the glyphs have a high contrast between thick and thin strokes you must apply the transformation several times to the thick strokes, but only once to the thin strokes. This is rather labour intensive, but here is how you could do it.

Cutting the Glyph

Zoom in close using Point Mode and cut the glyph with the knife tool to separate the thick and thin strokes.

Image

At the same time, measure the thin and thick strokes.

Image

For this glyph, the thin strokes were 43 funits and the thick strokes were 184 funits. I decided to reduce the weight to 33 funits and 144 funits respectively.

After cutting, the glyph looks like this in Contour Mode:

Image

Applying the Transformation

Cut the thin strokes to the clipboard and open the Glyph Transform Wizard dialogue.

Image

Clear any existing transformation from the right pane by clicking on the X icon. From the Effects group on the left, choose the Thin Transformation. Enter appropriate values for horizontal and vertical transformations. Save the script so that you can resuse it later on other glyphs or during later sessions. The last used transformation will be remembered by FontCreator.

Click OK to apply the transformation once to the remaining thick stroke. Repeat twice more, then paste the thin strokes back into the glyph, and apply the transformation again. Total, four times for the thick stroke, and once for the thin strokes. The result will now be like this:

Image

Notice how the thick stroke has moved up by 20 funits due to the four vertical transformations. Select it and move it down by pressing the Down Cursor key twice. Select the thin strokes and move them down by 5 funits by pressing Control + Down Cursor five times.

Zoom in and align the strokes using Control + Left/Right Cursor keys so that they join neatly at the top.

Image

The glyph now looks like this:

Image

Select all and join the contours together with "Get Union of Contours" from the Glyph Toolbar. If necessary, adjust the advance width to allow for the slightly reduced width of the glyph.

We can refine the transformation by adding a transformation to move the contours after making them thinner. From the Outlines group in the left pane select the move transformation and enter appropriate values to compensate for the Thin transformation.

Image
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

hhnguyen
Posts: 5
Joined: Thu Jan 28, 2010 4:14 pm

Re: Working With Transformations

Post by hhnguyen » Thu Dec 06, 2012 3:38 am

Many thanks for the tut

Hung

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

Re: Working With Transformations

Post by Bhikkhu Pesala » Sat Dec 08, 2012 11:07 pm

I have updated the PDF version of the tutorial again with an appendix summarising the code-points used in the Private Use Area for composing additional glyphs for adding OpenType features to fonts.
Attachments
Using Glyph Transformations.pdf
(762.36 KiB) Downloaded 540 times
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Re: Working With Transformations

Post by Bhikkhu Pesala » Thu Dec 27, 2012 9:08 pm

The attached PDF file documents the code-points used by a wide range of character sets, including the Private Use Area code-points used for OpenType features created with Glyph Transformations and/or Complete Composites. The template uses my Guru font.
Attachments
Unicode Character Sets.pdf
(535.5 KiB) Downloaded 500 times
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Petite Capitals in the Private Use Area

Post by Bhikkhu Pesala » Wed Jul 01, 2015 7:05 am

The predefined scripts were designed for a particular font — my own font Garava, which I used when developing the scripts. For other fonts they will need fine-tuning to make the Petite Capitals the right size and weight. This is how I design mine. The intention is to make the height of Petite Capitals exactly the same as the x-height, and the advance widths roughly the same as lowercase: The stroke weights should also match so that the Petite Capitals have the same "colour" as the lowercase. Simply scaling the capitals would result in them being lighter than the lowercase.
Petite Capitals.png
Petite Capitals.png (14.91 KiB) Viewed 5527 times
Open the Glyph Transformer from the Tools Menu, and load the Petite Capitals Private Use transform script using the Open folder icon on the Transform Wizard dialogue. The comments in the script describe what each part of the script should do. The script assumes that the font already contains glyphs for Basic Latin and Latin-1 Supplement, i.e. a complete ANSI character set.
Petite Capitals PUA.png
Petite Capitals PUA.png (57.3 KiB) Viewed 5527 times
Running the script will insert the characters in the Private Use Area and complete composites.

To Adjust the script for your font, open the Petite Capital X in the Glyph Edit Window, Complete Composites, Make simple, then use the Scale Tab on the Transform Toolbar to estimate the appropriate vertical scale factor — 71% in the case of the font illustrated below.
Vertical Scale.png
Vertical Scale.png (14.94 KiB) Viewed 5527 times
The Bold and Move lines of the script can then be modified to fine-tune the size after scaling and making the horizontal and vertical strokes bolder so that the height of the glyph is exactly right, and the visual weight of the glyphs is similar to the lowercase glyphs. Adjust the horizontal scale factor so that the advance width of A-Z Petite Caps is approximately equal to the advance width of a-z lowercase. In my font this needed a horizontal scale factor of 77%.

Each time you make an adjustment, select the A-Z Petite Capitals, Complete Composites, make simple, and run the script again on the selected Petite Capital glyphs. The insert characters lines must be deleted after running the script the first time. Only the scale, bold, and move lines need to be adjusted and rerun until the Petite Capital glyphs are the right size and weight for your font.
Petite Capitals Stone Regular.png
Petite Capitals Stone Regular.png (55.18 KiB) Viewed 5527 times
In the script — Bold (14,7) preserve bearings — means: add 14 funits to each side of vertical strokes, add 7 funits to the top and bottom of horizontal strokes, and preserve the side-bearings, i.e. add 28 funits to the advance width. Move (0,7) will move the glyph contours up by 7 funits to compensate for the bold action of adding 7 funits to the bottom of the glyphs horizontal strokes, thus keeping the X on the baseline.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Small Capitals in the Private Use Area

Post by Bhikkhu Pesala » Wed Jul 01, 2015 10:55 am

The transform script for Small Capitals in the Private Use Area is very similar to that for Petite Capitals, and uses the same code-points. The difference is in the way that the capital glyphs are scaled. The default script is designed to create Small Capitals at about 80% of the height of Capitals. The aspect ratio is closer to that of Capitals than it is for Petite Capitals, which tend to be expanded horizontally.
Small Capitals PUA.png
Small Capitals PUA.png (56.36 KiB) Viewed 5523 times
If you want both Small Capitals and Petite Capitals in the same font, it can be done in this way.
  1. Run the Small Capitals script and finish designing the glyphs and composites. Give them appropriate glyph names.
  2. Tag all of the glyphs and select them
  3. Right-click, and remove the codepoints
  4. Run the Petite Capitals script and design those glyphs.
  5. Give them appropriate glyph names.
  6. Add the OpenType features that you want
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Optimize Contours

Post by Bhikkhu Pesala » Fri Jun 24, 2016 9:07 am

This is a very simple transformation feature to use. It has no parameters. Use it on the current glyph or on all selected glyphs.
Optimize Transformation.png
Optimize Transformation.png (31.63 KiB) Viewed 3386 times
The Optimize feature is also available on the right-click menu in the Glyph Edit window, where it can be applied to selected contours or to all contours in the current glyph. Unlike the same feature in the Transform Wizard, undo is possible.

This feature reduces the number of points used to define a contour. With a complex glyph like that illustrated below, the number of points before and after can change significantly. The number of contours won't change, but the curves might change slightly. Use the Background Image toolbar to compare before and after results.
Optimize.png
Optimize.png (19.45 KiB) Viewed 3377 times
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Override Range by Glyph Name

Post by Bhikkhu Pesala » Fri Jun 24, 2016 9:18 am

In addition to Override Range by Codepoint, FontCreator 10 adds a feature to Override Range by Glyph Name. This can be used in scripts to select a number of glyphs on which to perform some other operations.
Override Range by Glyph Name.png
Override Range by Glyph Name.png (38.99 KiB) Viewed 3374 times
Click the validate button on the above dialogue to check that the glyph names exist, sort them in order, and count them.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

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

Inverse

Post by Bhikkhu Pesala » Fri Jun 24, 2016 9:23 am

This is another simple feature with no parameters.
Inverse Transformation.png
Inverse Transformation.png (31.1 KiB) Viewed 3380 times
It creates a black (clockwise) rectangle a few funits greater than the advance width of the glyph, and the full height of WinDescent to WinAscent. Then it reverses the contour directions to create white glyphs on a black background.
Inverse Transformation.png
Inverse Transformation.png (10.45 KiB) Viewed 3381 times
Be mindful that if you run it again, it does not remove the black rectangle, but inserts a second white rectangle over it. Follow the general advice to copy glyphs before running this transform script if you just want to try it out, then paste the previous glyphs back to undo its effects.
My FontsReviews: MainTypeFont CreatorHelpFC11.0 Pro + MT7.0 @ Win10 1703

Locked

Who is online

Users browsing this forum: No registered users and 5 guests