[CLOSED] Not All Subtables Being Used by Applications

Post your bug reports here. Include information that helps us to understand and reproduce the bug.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9008
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

[CLOSED] Not All Subtables Being Used by Applications

Post by Bhikkhu Pesala » Sun Jun 07, 2020 7:18 pm

I temporarily reverted my download to Pali version 3.0 because that is the latest version I could find where the kerning works in PagePlus, Affinity Publisher (presumably), and LibreOffice.

The pairs are definitely being exported and are present when I reopen the *.otf.
Maybe just too many pairs or too many subtables (9). I will try to diagnose the bug and fix it.

It is related to Subtables. If move Subtable Caps to the top, those work, and so does Subtable Hyphen, but not Subtable lc.
Subtables.png
Subtables.png (20.24 KiB) Viewed 1295 times
My FontsReviews: MainTypeFont CreatorHelpFC13 Pro + MT10.0 @ Win10 2004 build 19041.746

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

Re: Not All Subtables Being Used by Applications

Post by Bhikkhu Pesala » Sun Jun 07, 2020 7:40 pm

Subtable pcap.png
Subtable pcap.png (16.47 KiB) Viewed 1293 times
If I move the lowercase and pcap tables up, the hyphen pairs still work OK, but neither lowercase pairs nor petite caps pairs are kerned in PagePlus.
PagePlus X9 Kerning.png
PagePlus X9 Kerning.png (18.82 KiB) Viewed 1293 times
My FontsReviews: MainTypeFont CreatorHelpFC13 Pro + MT10.0 @ Win10 2004 build 19041.746

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Sun Jun 07, 2020 9:58 pm

I've opened version 3.44 but kerning didn't even work in FontCreator, so maybe it is broken?

Can you send me the project file, so I can look into this?
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Not All Subtables Being Used by Applications

Post by Bhikkhu Pesala » Sun Jun 07, 2020 10:32 pm

Thanks. I have sent the project file for Pali Regular.

The original contained a table for lowercase/Uppercase pairs, which had a lot of class overlaps when I merged the subtables, so I deleted that subtable.

Merging the other subtables showed up some duplicate pairs, which were stripped on compiling the lookups.
My FontsReviews: MainTypeFont CreatorHelpFC13 Pro + MT10.0 @ Win10 2004 build 19041.746

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

Re: Not All Subtables Being Used by Applications

Post by Bhikkhu Pesala » Mon Jun 08, 2020 8:02 am

This is the best that I have managed thus far. All but smcp, pcap, and subs/sups pairs are working now.
Merged Subtables.png
Merged Subtables.png (42.16 KiB) Viewed 1264 times
Further merging of subtables or changing the order seems to make no difference.
Subtables Merged.png
Subtables Merged.png (5.14 KiB) Viewed 1264 times
My FontsReviews: MainTypeFont CreatorHelpFC13 Pro + MT10.0 @ Win10 2004 build 19041.746

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Mon Jun 08, 2020 3:09 pm

Do send me this project, and I will look into it.
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Not All Subtables Being Used by Applications

Post by Bhikkhu Pesala » Mon Jun 08, 2020 5:17 pm

Erwin Denissen wrote:
Mon Jun 08, 2020 3:09 pm
Do send me this project, and I will look into it.
I have sent you the project file, and an older version that mostly works in PagePlus X9.
My FontsReviews: MainTypeFont CreatorHelpFC13 Pro + MT10.0 @ Win10 2004 build 19041.746

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Mon Jun 08, 2020 7:19 pm

Maybe it is just something we have never fully understood, but I think I now understand the problem.

Class based kerning is stored as a two-dimensional array as sequences of two class values. This array also includes class0, which represents all glyphs that are not assigned to any of the used classes. This class0 is then matched, so subsequent sub tables will never be processed. We might need to change some things and update the manual if this is indeed what is happening...
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Not All Subtables Being Used by Applications

Post by Bhikkhu Pesala » Mon Jun 08, 2020 7:30 pm

Your efforts are much appreciated. When I started using FontCreator 4.0 I never imagined there was so much to the process of creating a robust font with comprehensive glyph coverage.
My FontsReviews: MainTypeFont CreatorHelpFC13 Pro + MT10.0 @ Win10 2004 build 19041.746

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Mon Jun 08, 2020 10:32 pm

Erwin Denissen wrote:
Mon Jun 08, 2020 7:19 pm
Maybe it is just something we have never fully understood, but I think I now understand the problem.

Class based kerning is stored as a two-dimensional array as sequences of two class values. This array also includes class0, which represents all glyphs that are not assigned to any of the used classes. This class0 is then matched, so subsequent sub tables will never be processed. We might need to change some things and update the manual if this is indeed what is happening...
It is slightly different. With a class based positioning subtable, a match is found it either the first or second glyph is found (or both of course). If they both do not exist in the subtable, then it will proceed in the next subtable(s).
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Tue Jun 09, 2020 7:07 am

Some more testing revealed that my last statement is incorrect.

These are my findings:
With a class based positioning subtable, a match is found if the first glyph is found. The second one seems to be irrelevant.

So this will work:

Code: Select all

lookup PairAdjustment1 {
  subtable Subtable1 {
    pos @KernClass_V @KernClass_A <100> <0>;
    pos @KernClass_W @KernClass_U <200> <0>;
    pos @KernClass_X @KernClass_o.subs <300> <0>;
  }
  subtable Subtable2 {
    pos @KernClass_Y @KernClass_o.subs <-250> <0>;
  }
}
And here the rule in Subtable2 is never applied, as class KernClass_Y is among the first class definitions of Subtable1:

Code: Select all

lookup PairAdjustment1 {
  subtable Subtable1 {
    pos @KernClass_Y @KernClass_parenright <75> <0>;
    pos @KernClass_Z @KernClass_S <400> <0>;
  }
  subtable Subtable2 {
    pos @KernClass_Y @KernClass_o.subs <-250> <0>;
  }
}
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Tue Jun 09, 2020 7:25 am

The user manual already mentions it, but somehow it is easily overlooked:
It is important to realize class based kerning is stored in a two dimensional array; which is made out of first glyph classes and second glyph classes. If a glyph exists in a first glyph class, it should never be included in another first glyph class, as such overlapping classes are not allowed for class based kerning. Same goes for second glyph classes. Due to the nature of a two dimensional array, if a specific pair is not included in the pair list, it will still be stored in the pair positioning lookup. All glyphs that are available in the first glyph classes will cause the text processing engine to stop looking for pairs in subsequent sub lookups.
How can we improve the user manual?
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Not All Subtables Being Used by Applications

Post by Bhikkhu Pesala » Tue Jun 09, 2020 9:16 am

I don't think there is any problem with the manual. I already understood that class overlaps should be avoided, but I still do not understand why the Petite Capitals and Super/subscript subtables are not being processed.
My FontsReviews: MainTypeFont CreatorHelpFC13 Pro + MT10.0 @ Win10 2004 build 19041.746

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Tue Jun 09, 2020 9:47 am

Does this make things more clear?
classbased.png
classbased.png (39.21 KiB) Viewed 1200 times
With text "BAYOZY" only pair OZ will be processed in subsequent subtables. Even though BA, YO, and ZY are not defined as pair positioning rules, they are still matched with the matrix.
Erwin Denissen
High-Logic
Proven Font Technology

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

Re: Not All Subtables Being Used by Applications

Post by Erwin Denissen » Tue Jun 09, 2020 11:13 am

This update provides better validation when compiling feature code. The proofing tool also shows when a class based pair positioning match is found. That can be hidden with the "Compact" option.

FontCreator 13.0.0.2651 (64-bit)

Let us know your results.
Erwin Denissen
High-Logic
Proven Font Technology

Post Reply