OpenType features and FontCreator 7 and PagePlus X5

The FontCreator 7.0.0 (build 396) manual has the following.

5.4.3.5.2 Supported substitutions

Is there a list of all of the OpenType features that FontCreator 7 supports please?

I know that there is the default script that shows which features are used in the default script.

In the OpenType specification I am looking at the aalt feature.

http://www.microsoft.com/typography/otspec/features_ae.htm

This appears that it might be the feature being used in the last illustration in the following web page.

http://www.adobe.com/products/type/opentype.html

I do not use Adobe InDesign, I use Serif PagePlus X5.

So, even if it is possible to make a font using an aalt feature in FontCreator it may or may not be possible to use it in PagePlus X5.

Or am I looking at this matter of which OpenType features can FontCreator 7 and PagePlus X5 support from the wrong direction?

For example, is it like asking which pictures can be produced in a graphics program in that the program supports tools and there are some examples, yet there is not a list such as bird, okapi, aeroplane, boat, tree, stone and so on of pictures that can be drawn using the program?

William Overington

13 June 2013

FontCreator supports all feature tags listed on the Registered Features list maintained by Microsoft. Please note however that some features might require syntax that is not yet (fully) supported by our compiler. You can find a list of supported substitutions in the manual here

To be honest, of all fonts I’ve used to test our OpenType Layout Feature code with, I have not seen the aalt feature once so I didn’t pay too much attention to it. But if I understand it correctly it’s a huge list of all substitutions combined into a single feature. For simple substitutions (1 on 1) you could simply reference the same lookup tables as you would use for the actual feature:

  script latn {
    feature AccessAllAlternates;
    feature SmallCapitals;
  }

  feature AccessAllAlternates aalt {
    lookup SmallCapitals;
  }

  feature SmallCapitals smcp {
    lookup SmallCapitals;
  }

  lookup SmallCapitals {
    sub A -> a.smcp; 
    sub B -> b.smcp; 
    sub C -> c.smcp; 
    #... etc .. etc ...
  }

Now if the application does not support small capitals, you can still access those glyphs via the AALT feature. Note that this “trick” will only work if a glyph is substituted once if you want both small capitals and petite capitals to work for example you need to create a custom lookup table:

  script latn {
    feature AccessAllAlternates;
    feature SmallCapitals;
    feature PetiteCapitals;
  }

  feature AccessAllAlternates aalt {
    lookup AccessAllAlternates;
  }

  feature SmallCapitals smcp {
    lookup SmallCapitals;
  }

  feature PetiteCapitals pcap {
    lookup PetiteCapitals;
  }

  lookup SmallCapitals {
    sub A -> a.smcp; 
    sub B -> b.smcp; 
    sub C -> c.smcp; 
    # ... etc .. etc ...
  }

  lookup PetiteCapitals {
    sub A -> a.pcap; 
    sub B -> b.pcap; 
    sub C -> c.pcap; 
    #... etc .. etc ...
  }

  lookup AccessAllAlternates {
    sub A -> [a.smcp a.pcap];
    sub B -> [b.smcp b.pcap];
    sub C -> [c.smcp c.pcap];
    # ... etc .. etc ...
  }

Theoretically it should be possible that these aalt lookup tables are generated automatically by the compiler. This would however require some further investigation into the usefulness of this feature, because this is not something that can be added easily. Also more and more applications are supporting the most common OpenType Features and it might require little effort from the designers to add the more exotic ones into an aalt feature themselves using my examples above.

I think it is more a question of which substitutions are supported. What you need is a type 3, “one > many” substitution:

3 Alternate Yes Substitute a single glyph by one of multiple alternates (a → x or y or z)

PagePlus does support aalt.
I have used salt (stylistic alternates) in my fonts, which is similar and also uses a lookup table:

feature StylisticAlternates salt {
    lookup StylisticAlternates;
}  lookup StylisticAlternates {
    sub asterisk -> [asterisk asteriskmath uni2051 uni2042 uni203B];
    sub plus -> [plus uni2795 uni271A uni271B uni271C];
    sub at -> [at uni260E uni260F uni2121 uni213B];
    sub copyright -> [copyright uni2117 uniF000 estimated uni2139];
    sub multiply -> [multiply uni2715 uni2716 uni2717 uni2718];
    sub dagger -> [dagger uni2622 uni2623 uni26A1 uni2620];
    sub daggerdbl -> [daggerdbl uni26A0 uni2691 uni26B0 uni26B1];
    sub bullet -> [bullet uni204D uni2023 uni2767 uni2712];
    sub circle -> [circle fullmoon waninggibbousmoon lastquartermoon waningcrescentmoon];
    sub blackcircle -> [blackcircle newmoon waxingcrescentmoon firstquartermoon waxinggibbousmoon];
    sub uni2600 -> [uni2600 sunrise uni26C5 uni2602 uni2603];
}

What you want is something like

sub p => [p p1 p2 p3 p4 p5];

This will allow the user to select from five additional forms of the letter p from the context toolbar when the letter p is typed.

Here is how Stylistic Sets work in PagePlus.

The user types any one of ten base characters: * + @ × † ‡ • ○ ● and opens the context toolbar, choosing one of four Stylistic Sets. The asterisk is then replaced with one of four similar glyphs, the + sign is replaced with one of four similar glyphs, etc., depending on which set the user chooses. The user has to do this every time they want to use an alternate form of one of the ten base glyphs.

To be honest, they might as well just open the Insert special symbol dialogue, and pick the glyph they want from there, but this is another way of working, and perhaps makes it easier to find an appropriate alternative glyph.

In the case of a font like Poetica, which has several styles of P, and several styles of other letters, it makes it quite easy to type and edit normally, then refine the text later by selecting alternate forms from aalt or salt.

I don’t know enough to say which is the more useful tag to use — you will have to read up and decide for yourself which way you want to design your fonts.
Stylistic Sets.png

Thank you both.

Since I posted I remembered that I have a recent Adobe font on this computer, namely Source Sans Pro.

So I opened Source Sans Pro Regular in FontCreator 7 and then used, from within the OpenType Layout Features Editor, Tools Extract from this font… to get the source code.

I then, from within the OpenType Layout Features Editor, used Edit Find… to search for the [ character.

I found that Source Sans Pro does have the aalt feature, though I do not at this time understand why it seems to have both AccessAllAlternates1 and AccessAllAlternates2.

}

feature AccessAllAlternates1 aalt {
  # Access All Alternates
  lookup Lookup1;
  lookup Lookup2;
}

feature AccessAllAlternates2 aalt {
  # Access All Alternates
  lookup Lookup1;
  lookup Lookup2;
}

I have tried Source Sans Pro in PagePlus X5 and have managed to access the alternate form of lowercase a, though I am not quite sure how it all works yet as it is different from the palette format used in the Adobe illustration.

William

Thank you to Bhikkhu Pesala for the post timestamped as Thu Jun 13, 2013 8:55 am. I had not seen that post when preparing the post that immediately follows it in this thread.

I had not noticed that one can access some of the OpenType features from the context toolbar. I had been using Format Character every time! The context toolbar is very useful. Thank you.

Well yes if the alternate glyphs are mapped. For example, the single story a in Source Sans Pro is not mapped.

Yes.

It is quite a learning curve.

William

Thank you to León Fridsma for the code examples.

Here is a transcript of my notes as I applied the first example in making a font.

The font is attached after the transcript.


Thursday 13 June 2013

11:31 am

Try to produce two example fonts to learn from the examples in the post by León Fridsma.

That post is referenced as follows.

http://forum.high-logic.com:9080/t/opentype-features-and-fontcreator-7-and-pageplus-x5/3856/2

The first example.


script latn {
feature AccessAllAlternates;
feature SmallCapitals;
}

feature AccessAllAlternates aalt {
lookup SmallCapitals;
}

feature SmallCapitals smcp {
lookup SmallCapitals;
}

lookup SmallCapitals {
sub A → a.smcp;
sub B → b.smcp;
sub C → c.smcp;
#… etc .. etc …
}


Using FontCreator 7.0.0 (build 396).

Open the Ligatures_006.otf font.

The font can be obtained from the following post if anyone wishes to try repeating what I am doing here.

http://forum.high-logic.com:9080/t/adding-opentype-features-long-gsub-strings/3753/31

Save as a project named Learning_aalt_001

Remove the last seven glyphs in the font to avoid the possibility of causing needless confusion in this learning example.

Using a copy of the Ligatures_006.otf font to start is just for convenience so as not to have to build a font from a new empty font.

Delete the code that is in the panel in the OpenType Layout Feature Editor.

Add in the code from the first code panel of León’s post.

I am not trying to compile the code at present as the three new glyphs have not been prepared at this time. Save the code for use later.

Set Grid Options to 128 16 Light Orange Solid.

Set Metrics Options to Blue Solid

Font Properties… Identification Font Family to become Learning_aalt_001

File Export Font Export Settings, left column to become as follows.

Learning_aalt_001.otf
Yes
Custom Script
KERN and GPOS
Auto Hinting

In order to use the code I need to add glyphs for a.smcp, b.smcp and c.smcp to the font.

Add three emply cells at the end of the font and construct glyphs for a.smcp, b.smcp and c.smcp from copies of A, B, C.

Bearing in mind that lowercase o has a height of 896 font units in this font and that petite capitals as well as small capitals are needed for a later experiment, make the height of the small capitals to be 1152 font units. This means reducing overall height by 256 font units and the centre bar of A and B by 128 font units. Keep the widths the same. This may not be the best way to design small capitals but here I am just producing some glyphs to illustrate the learning experience.

Compile the OpenType code.

Redate the font for today using Font Properties Identification

Save Project.

Export the font as an OpenType font.

Temporarily install the font from Windows Explorer by double clicking on the name of the font.

Try the font in PagePlus X5.

It looks good.


Here is the font.
Learning_aalt_001.otf (19.3 KB)
William

Thank you to León Fridsma for the code examples.

Here is a transcript of my notes as I applied the second example in making a font.

The font is attached after the transcript.


1:56 pm

Open FontCreator 7.0.0 (build 396)

Open the project Learning_aalt_001.fcp

Save as Learning_aalt_002.fcp

Try to produce the second example font to learn from the code examples in the post by León Fridsma.

That post is referenced as follows.

http://forum.high-logic.com:9080/t/opentype-features-and-fontcreator-7-and-pageplus-x5/3856/2

The code of the second example is as follows.


script latn {
feature AccessAllAlternates;
feature SmallCapitals;
feature PetiteCapitals;
}

feature AccessAllAlternates aalt {
lookup AccessAllAlternates;
}

feature SmallCapitals smcp {
lookup SmallCapitals;
}

feature PetiteCapitals pcap {
lookup PetiteCapitals;
}

lookup SmallCapitals {
sub A → a.smcp;
sub B → b.smcp;
sub C → c.smcp;

… etc .. etc …

}

lookup PetiteCapitals {
sub A → a.pcap;
sub B → b.pcap;
sub C → c.pcap;
#… etc .. etc …
}

lookup AccessAllAlternates {
sub A → [a.smcp a.pcap];
sub B → [b.smcp b.pcap];
sub C → [c.smcp c.pcap];

… etc .. etc …

}


Delete the code in the OpenType Layout Feature Editor panel for the font and paste in the new code.

Do not try to compile at present as the necessary glyphs are not available.

Save the code.

Font Properties… Identification Font Family to become Learning_aalt_002

File Export Font Export Settings, left column to become as follows.

Learning_aalt_002.otf
Yes
Custom Script
KERN and GPOS
Auto Hinting

In order to use the code I need to add glyphs for a.pcap, b.pcap and c.pcap to the font.

Add three emply cells at the end of the font and construct glyphs for a.pcap, b.pcap and c.pcap from copies of A, B, C.

Bearing in mind that lowercase o has a height of 896 font units in this font and that petite capitals need to be smaller than the small capitals, make the height of the petite capitals to be 896 font units. This means reducing overall height by 512 font units and the centre bar of A and B by 256 font units, yet lower the centre bar first to avoid problems over points overlapping. Keep the widths the same. This may not be the best way to design petite capitals but here I am just producing some glyphs to illustrate the learning experience.

Widen the gap in the c.pcap by raising one end by 128 font units and lowering the other end by 128 font units.

Compile the OpenType code.

Export the font as an OpenType font.

Temporarily install the font from Windows Explorer by double clicking on the name of the font.

Try the font in PagePlus X5.

This is good. It is interesting how PagePlus X5 displays the items.

Make a print screen image for the forum.


Learning_aalt_002.png
Please click on the image to increase the size of the area displayed.

Here is the font.
Learning_aalt_002.otf (19.6 KB)
William

I have earlier this morning tried a further learning example.

Here is the transcript.

The font is attached after the transcript.


Friday 14 June 2013

7:00 am

Open FontCreator 7.0.0 (build 396)

Open the project Learning_aalt_002.fcp

Save as Learning_aalt_003.fcp

Font Properties… Identification Font Family to become Learning_aalt_003

File Export Font Export Settings, left column to become as follows.

Learning_aalt_003.otf
Yes
Custom Script
KERN and GPOS
Auto Hinting

The OpenType code for lookup AccessAllAlternates is at present using three rows each of two columns.

Suppose that this is regarded as a 3 row by 2 column matrix.

If so, then PagePlus X5 seems to transpose that 3 row by 2 column matrix to produce a 2 row by 3 column matrix.

That is very effective.

Yet it may not be the case that the data is regarded as being in a matrix of the conventional mathematical kind.

What i am meaning here is that in a mathematical matrix there needs to be an item in each cell.

Thus, for example, if a matrix were 26 rows by 3 columns then there would need to be a total of 78 items in the matrix, because 26 times 3 is 78.

Suppose, however, that the glyphs available in the font are such that there are more alternatives for some letters than for some other letters.

What happens then? Does one need to fill the empty cells of the matrix each with a glyph, even if it is just a repeat of another glyph, or does the system resolve itself automatically?

To learn about this, for this learning example, a glyph named B.swash is added to the font.

Add a glyph named B.swash to the font.
Construct the glyph from a copy of B and a scaled up copy of the swash B glyph from the Private Use Area of the Sonnet Calligraphic 047 font, yet not mapping the glyph in this font.

Modify the OpenType code for lookup AccessAllAlternates on just one line.

before:

lookup AccessAllAlternates {
sub A → [a.smcp a.pcap];
sub B → [b.smcp b.pcap];
sub C → [c.smcp c.pcap];

… etc .. etc …

}

after:

lookup AccessAllAlternates {
sub A → [a.smcp a.pcap];
sub B → [b.smcp b.pcap B.swash];
sub C → [c.smcp c.pcap];

… etc .. etc …

}

Compile the code.

Success.

Save Project.

Export the font,

Temporarily install the font from Windows Explorer by double clicking on the name of the font.

Try the font in PagePlus X5

This is interesting.

PagePlus X5 seems to be using a matrix and has copied the petite glyphs for A and C to fill the gaps in the matrix.

Or is the matrix already in the font?

I suspect not as an application could display the alternates as a palette as in the picture from Adobe InDesign mentioned in the first post of this thread. However, if someone from High-Logic could comment that would be interesting.

Make a print screen image for the forum.


Learning_aalt_003.png
Please click on the image to increase the size of the area displayed.

Here is the font.
Learning_aalt_003.otf (19.8 KB)
William Overington

14 June 2013

This is controlled by PagePlus, but most likely derived it from the aalt feature as available in the font.

sub A → [a.smcp a.pcap];
sub B → [b.smcp b.pcap];
sub C → [c.smcp c.pcap];

Unless I am mistaken, these lookup tables should be:

sub A -> [A a.smcp a.pcap];
 sub B -> [B b.smcp b.pcap];
 sub C -> [C c.smcp c.pcap];

Thank you.

William

This morning I tried yet a further learning example.

Here is the transcript.

The transcript is as it was placed in my notes. However, I am posting the transcript using the code feature of the forum system this time as the leading spaces were not being displayed.

The font is attached after the transcript.


9:06 am

Open FontCreator 7.0.0 (build 396)

Open the project Learning_aalt_003.fcp

Save as Learning_aalt_004.fcp

Font Properties… Identification Font Family to become Learning_aalt_004

File Export Font Export Settings, left column to become as follows.

Learning_aalt_004.otf
Yes
Custom Script
KERN and GPOS
Auto Hinting

Add the five alternate glyphs for lowercase g from the Sonnet to a Renaissance Lady font.

Add glyph names of g.1 g.2 g.3 g.4 g.5

Add the five alternate glyphs for lowercase d from the Sonnet to a Renaissance Lady font.

Add glyph names of d.1 d.2 d.3 d.4 d.5

Modify the OpenType code for lookup AccessAllAlternates by adding two lines of code.

In view of the fact that PagePlus X5 numbers from 0, make the first item in the list the same as the original item.
This will mean that the index number of the alternate glyph will match the number of the row that contains it in PagePlus X5.

before:

lookup AccessAllAlternates {
        sub A -> [a.smcp a.pcap];
        sub B -> [b.smcp b.pcap B.swash];
        sub C -> [c.smcp c.pcap];
        # ... etc .. etc ...
      }

after:

lookup AccessAllAlternates {
        sub A -> [a.smcp a.pcap];
        sub B -> [b.smcp b.pcap B.swash];
        sub C -> [c.smcp c.pcap];
        # ... etc .. etc ...
        sub g -> [g g.1 g.2 g.3 g.4 g.5];
        sub d -> [d d.1 d.2 d.3 d.4 d.5];
      }

Compile the code.

Success.

Save Project.

Export the font.

Temporarily install the font from Windows Explorer by double clicking on the name of the font.

Try the font in PagePlus X5


The results were excellent.

Here is a print screen image.
Learning_aalt_004.png
Please click on the image to increase the size of the area displayed.

I note that although I put the g glyphs before the d glyphs in the code, the result in PagePlus X5 has the d glyphs before the g glyphs.

Here is the font.
Learning_aalt_004.otf (21.3 KB)
William

Here is a graphic made from a print screen image made while using the Adobe font Source Sans Pro in PagePlus X5.
Learning_aalt_Source_Sans_Pro.png
There are six rows for aalt in the graphic and they all look the same.

What is happening?

I think that I have managed to figure it out by opening Source Sans Pro (regular) in FontCreator 7 and then extracting the OpenTyoe Code and studying the code.

It is quite interesting.

In case any reader might like to try to analyse what is happening, I will try to place what I found in a later post with a spacing post between so as not to put the explanation before readers before they have a chance to try to find the solution themselves.

William Overington

17 June 2013

(spacing post to avoid giving an answer away too early)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
21
23
24

It appears from the code that the font is forming up aalt as follows, here using o to represent an item and not showing as many rows as are used in the font.

o
o
o
o
o
oooooo
oooooo
oooooo
oooooo
oooooo

PagePlus X5 appears, in effect, to use that data to form a matrix, by copying the last item in each row to fill each empty space in that row, shown here using e for each copied item. I have used e rather than c as using e allows the diagrams to display better in this forum post.

oeeeee
oeeeee
oeeeee
oeeeee
oeeeee
oooooo
oooooo
oooooo
oooooo
oooooo

The matrix is then transposed about the leading diagonal of the matrix as follows.

oooooooooo
eeeeeooooo
eeeeeooooo
eeeeeooooo
eeeeeooooo
eeeeeooooo

However, PagePlus X5 only shows the first so many columns of the result, so only some of the columns with the extra copies are shown and none of the columns where six choices are available are shown.

I wrote “PagePlus X5 appears, in effect, …” because I do not know the order in which PagePlus X5 processes the data internally.

William