I am trying to make a font with some stylistic alternates

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
William
Top Typographer
Top Typographer
Posts: 1997
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

I am trying to make a font with some stylistic alternates

Post by William » Thu Dec 27, 2018 9:27 am

I am trying to make a font with some stylistic alternates.

It is a test for trying out the Serif Affinity Publisher program.

I have thus far made one post in the following thread.

https://forum.affinity.serif.com/index. ... apability/

What I am trying to do now is to modify a copy of the attached font (to become ligatst3.otf) so as to add two alternates for the letter e. Each has a swash ending, the second with a larger swash than the first. This is just a test so as to find out how Affinity Publisher handles it and what happens if one tries to copy and paste from out of a PDF document produced from Affinity Publisher.

I cannot remember whether I ever got alternates working before. I have a vague recollection of there being aalt, calt and salt.

Anyway to get started I searched this forum and found a thread which has in one post a code sample kindly supplied by Bhikkhu Pesala.

I adapted that to my needs and thus ended up with the following OpenType code, using FontCreator 8.

Code: Select all

script latn {
  # Latin
  feature StandardLigatures1;
}

feature StandardLigatures1 liga {
  # Standard Ligatures
  lookup Ligature1;
}

lookup Ligature1 {
  # Referenced by feature "StandardLigatures1"
  sub c t -> c_t;
  sub e t -> e_t;
  sub s t -> s_t;
}

feature StylisticAlternates salt {
    lookup StylisticAlternates;
}

lookup StylisticAlternates {
    sub e -> [e e.alt1 e.alt2];
}

This compiled but has the following.

[Hint] (18,9) : Feature StylisticAlternates declared but never used.

[Hint] (22,8) : Lookup StylisticAlternates declared but never used.

Can anyone advise what is wrong please?

William Overington

Thursday 27 December 2018
Attachments
ligatst2.otf
(11.14 KiB) Downloaded 40 times

Erwin Denissen
Moderator
Moderator
Posts: 8271
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: I am trying to make a font with some stylistic alternates

Post by Erwin Denissen » Thu Dec 27, 2018 11:51 am

You need to include the feature to the script as follows:

Code: Select all

script latn {
  # Latin
  feature StandardLigatures1;
  feature StylisticAlternates;
}
Erwin Denissen
High-Logic
Proven Font Technology

William
Top Typographer
Top Typographer
Posts: 1997
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: I am trying to make a font with some stylistic alternates

Post by William » Thu Dec 27, 2018 12:46 pm

Thank you Erwin.

I have changed the script and it compiles without hints.

Excellent.

William

William
Top Typographer
Top Typographer
Posts: 1997
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: I am trying to make a font with some stylistic alternates

Post by William » Thu Dec 27, 2018 3:38 pm

Here is the font.

ligatst3.otf
Ligature test 3 font
(11.38 KiB) Downloaded 55 times

This font not only has some ligatures but also two stylistic alternates for lowercase e, intended for the ends of (some) lines in poetry, which stylistic alternates are not ligatures.

William

William
Top Typographer
Top Typographer
Posts: 1997
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: I am trying to make a font with some stylistic alternates

Post by William » Thu Dec 27, 2018 4:18 pm

Here is a PDF document which contains a poem that I have written which shows the font in action.

white.pdf
A poem that has three ligatures and two stylistic alternates in its display
(9.32 KiB) Downloaded 48 times

What is really good about the Serif Affinity Publisher Beta program is that the PDF document produced is such that although three ligatures and two stylistic alternates are used, copying the text from the PDF document and pasting into WordPad gives the underlying plain text, not text with blanks where ligatures and stylistic alternates occur.

William

Post Reply