Number of possible characters in a substitution statement

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

Number of possible characters in a substitution statement

Post by William » Fri Apr 05, 2019 2:57 pm

You may have noticed the following thread.

viewtopic.php?f=10&t=7941

This question arises from that experiment but there is no need to read that thread in relation to this question, it is just the reason why I am asking.

In that font I used a liga glyph substitution statement as follows. (I use the term substitution statement - I do not know whether that is the correct term)

sub uniEFF8 uE0051 uE0032 uE0031 uE0038 uE0035 uE0034 uE0033 -> glyph218543;

That is a sequence of eight characters needed to result in the desired glyph being displayed.

It worked well both in FontCreator 8 in making a font and also in Affinity Publisher when using the font.

My question is as follows please.

Is there a limit within FontCreator as to how many characters can be in such a sequence? If so, what is it please? If so, is the limit imposed by High-Logic or by the OpenType specification.

The reason I ask is because there may be a need for at least three more tag characters, one of them the cancel tag, to be used straight away and maybe more in the longer term if the suggestion in the following document becomes implemented.

https://www.unicode.org/L2/L2019/19082-qid-emoji.pdf (It is over 6 Megabytes so I found it best to download to local storage rather than trying to read it online)

William Overington

Friday 5 April 2019

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

Re: Number of possible characters in a substitution statement

Post by Erwin Denissen » Fri Apr 05, 2019 3:48 pm

I'll take a look at the limit if you try to exceed 32000 glyphs :lol:
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Number of possible characters in a substitution statement

Post by William » Fri Apr 05, 2019 4:20 pm

Erwin Denissen wrote:
Fri Apr 05, 2019 3:48 pm
I'll take a look at the limit if you try to exceed 32000 glyphs :lol:
It is not a matter of how many glyphs are in the font, it is a matter of how many characters can be listed in the left-side of a sub statement. For example, if it is fifteen then all is well for this usage, if it is ten then there could be a problem.

There may not be many glyphs in the font itself. Just enough to allow the substitution statement to work for the one QID emoji glyph that one wishes to display. In the maquette font that I produced yesterday there are eight characters in the left-side of the sub statement.

Yet for a glyph for a QID emoji for https://www.wikidata.org/wiki/Q41156207 ten characters would be needed in the left-side of the sub statement.

It may be that use of a cancel tag will be specified.

If wikidata continues to develop, one or more extra digits may be needed.

William

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

Re: Number of possible characters in a substitution statement

Post by Erwin Denissen » Fri Apr 05, 2019 4:32 pm

William wrote:
Fri Apr 05, 2019 4:20 pm
Erwin Denissen wrote:
Fri Apr 05, 2019 3:48 pm
I'll take a look at the limit if you try to exceed 32000 glyphs :lol:
It is not a matter of how many glyphs are in the font, it is a matter of how many characters can be listed in the left-side of a sub statement.
I know!

I'll take a look at the limit if you try to exceed 32000 glyphs :lol:
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Number of possible characters in a substitution statement

Post by William » Fri Apr 05, 2019 5:46 pm

I have just made a test font with the following substitution using sixteen characters at the left-side of the substitution statement and it works well in Affinity Publisher.

Here is the substitution statement.

sub uniEFF8 uE0031 uE0032 uE0033 uE0034 uE0035 uE0036 uE0037 uE0038 uE0039 uE0030 uE0031 uE0032 uE0033 uE0034 uE007F -> glyphQ;

So that seems to be more than is needed in relation to QID emoji. So all is well.

William

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

Re: Number of possible characters in a substitution statement

Post by Erwin Denissen » Fri Apr 05, 2019 6:30 pm

That is good to know. If I'm correct the limit is 64K, but if 10 is enough I'm not going to spend more time on this.
Erwin Denissen
High-Logic
Proven Font Technology

Post Reply