Author Topic: OT features not showing in OT preview  (Read 3351 times)

geordienz

  • Hero Member
  • *****
  • Posts: 22
OT features not showing in OT preview
« on: 2012-11-12, 18:28:35 »
Trying to create my first OT font.  To try and glean some knowledge, I have been inspecting a third-party font that I know has OT ligatures (as I have it working fine in Photoshop).  This font does not, however, display in the Fontlab OT preview panel - the original glyphs in any string still remain.
Is there something I need to set in order to get the features to trigger?  One thing I have noticed is that the Script and Language dropdowns are empty.
TIA

Adam Twardoch (FontLab)

  • Product and marketing manager, Fontlab Ltd.
  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • FontLab Studio 5.1.2, Mac OS X 10.6.8
    • FontLab
Re: OT features not showing in OT preview
« Reply #1 on: 2012-11-12, 19:31:35 »
After you've written your feature definitions in the OpenType panel, you need to click on the Compile button there.
Regards,
Adam Twardoch
Fontlab Ltd.

geordienz

  • Hero Member
  • *****
  • Posts: 22
Re: OT features not showing in OT preview
« Reply #2 on: 2012-11-12, 23:13:03 »
Even for an existent functioning font? 

Anyways, I got this . . . .

[WARNING] <ArnoPro-Regular> Use of DFLT tag has been deprecated. It will work, but please use 'dflt' instead. [F://FontLab/Studio5/fontlab.fea 98]
[FATAL] <ArnoPro-Regular> aborting because of errors:
syntax error at "}"
[F://FontLab/Studio5/fontlab.fea 110]

Adam Twardoch (FontLab)

  • Product and marketing manager, Fontlab Ltd.
  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • FontLab Studio 5.1.2, Mac OS X 10.6.8
    • FontLab
Re: OT features not showing in OT preview
« Reply #3 on: 2012-11-13, 08:16:44 »
Which version of FLS?
Regards,
Adam Twardoch
Fontlab Ltd.

geordienz

  • Hero Member
  • *****
  • Posts: 22
Re: OT features not showing in OT preview
« Reply #4 on: 2012-11-13, 13:54:47 »
Windows -  5.0.4 Build 2741
Interestingly, my own font actually compiled (well, after a different "hiccup" whereby it informed me that "Missing glyph _65535"  "one of more glyphs not found in the font")

a) is "one of more" a typo, should it be "one OR more"?
b) what is _65535?

when I allow FL to add _65535, all is good

The original problem I posted was for an OT font (Arno Pro Regular) supplied either by MS or third party app.

Thanks, Adam, for taking the time to answer me.
« Last Edit: 2012-11-13, 14:13:08 by geordienz »

geordienz

  • Hero Member
  • *****
  • Posts: 22
Re: OT features not showing in OT preview
« Reply #5 on: 2012-11-13, 20:05:52 »
When I said "all good" re my font, I was talking in terms of it actually compiling.
Glyph substitution, however, is another matter. 
I had a sample word ending in the letters "NATION".
When I view the OT representation of the word, the "AT"  [A_T] glyph substitution is picked up, instead of what I want, which is the T_I_O_N glyph.
Here are the contents of the substitution . . .
feature liga { # Standard Ligatures
 # Latin
    sub A T A by A_T_A;
    sub A T E by A_T_E;
    sub A T H by A_T_H;
    sub A T R by A_T_R;
    sub A A by A_A;
    sub A C by A_C;
    sub A D by A_D;
    sub A E by A_E;
    sub A F by A_F;
    sub A G by A_G;
    sub A H by A_H;
    sub A I by A_I;
    sub A K by A_K;
    sub A N by A_N;
    sub A O by A_O;
    sub A R by A_R;
    sub A S by A_S;
    sub A T by A_T;
    sub A U by A_U;
    sub A V by A_V;
    sub A W by A_W;
    sub A X by A_X;
    sub A Y by A_Y;
    sub A Z by A_Z;
    sub C A by C_A;
    sub C C by C_C;
    sub C D by C_D;
    sub C E by C_E;
    sub C F by C_F;
    sub C G by C_G;
    sub C H by C_H;
    sub C I by C_I;
    sub C K by C_K;
    sub C L by C_L;
    sub C M by C_M;
    sub C N by C_N;
    sub C O by C_O;
    sub C R by C_R;
    sub C S by C_S;
    sub C T by C_T;
    sub C U by C_U;
    sub C V by C_V;
    sub C W by C_W;
    sub C X by C_X;
    sub C Y by C_Y;
    sub C Z by C_Z;
    sub E T A by E_T_E;
    sub E T H by E_T_H;
    sub E T R by E_T_R;
    sub E A by E_A;
    sub E C by E_C;
    sub E D by E_D;
    sub E E by E_E;
    sub E F by E_F;
    sub E G by E_G;
    sub E H by E_H;
    sub E I by E_I;
    sub E K by E_K;
    sub E L by E_L;
    sub E N by E_N;
    sub E O by E_O;
    sub E R by E_R;
    sub E S by E_S;
    sub E T by E_T;
    sub E U by E_U;
    sub E V by E_V;
    sub E W by E_W;
    sub E X by E_X;
    sub E Y by E_Y;
    sub E Z by E_Z;
    sub F A by F_A;
    sub F C by F_C;
    sub F D by F_D;
    sub F E by F_E;
    sub F F by F_F;
    sub F G by F_G;
    sub F H by F_H;
    sub F I by F_I;
    sub F K by F_K;
    sub F L by F_L;
    sub F N by F_N;
    sub F O by F_O;
    sub F R by F_R;
    sub F S by F_S;
    sub F T by F_T;
    sub F U by F_U;
    sub F V by F_V;
    sub F W by F_W;
    sub F X by F_X;
    sub F Y by F_Y;
    sub F Z by F_Z;
    sub G H T by G_H_T;
    sub G T H by G_T_H;
    sub I T A by I_T_A;
    sub I T E by I_T_E;
    sub I T H by I_T_H;
    sub I T R by I_T_R;
    sub I T Y by I_T_Y;
    sub K A by K_A;
    sub K C by K_C;
    sub K D by K_D;
    sub K E by K_E;
    sub K F by K_F;
    sub K G by K_G;
    sub K H by K_H;
    sub K I by K_I;
    sub K K by K_K;
    sub K L by K_L;
    sub K N by K_N;
    sub K O by K_O;
    sub K R by K_R;
    sub K S by K_S;
    sub K T by K_T;
    sub K U by K_U;
    sub K V by K_V;
    sub K W by K_W;
    sub K X by K_X;
    sub K Y by K_Y;
    sub K Z by K_Z;
    sub L T H by L_T_H;
    sub L A by L_A;
    sub L C by L_C;
    sub L D by L_D;
    sub L E by L_E;
    sub L F by L_F;
    sub L G by L_G;
    sub L H by L_H;
    sub L I by L_I;
    sub L K by L_K;
    sub L L by L_L;
    sub L N by L_N;
    sub L O by L_O;
    sub L R by L_R;
    sub L S by L_S;
    sub L T by L_T;
    sub L U by L_U;
    sub L V by L_V;
    sub L W by L_W;
    sub L X by L_X;
    sub L Y by L_Y;
    sub L Z by L_Z;
    sub O T A by O_T_A;
    sub O T E by O_T_E;
    sub O T H by O_T_H;
    sub O T R by O_T_R;
    sub R T A by R_T_A;
    sub R T E by R_T_E;
    sub R T R by R_T_R;
    sub R A by R_A;
    sub R C by R_C;
    sub R D by R_D;
    sub R E by R_E;
    sub R F by R_F;
    sub R G by R_G;
    sub R H by R_H;
    sub R I by R_I;
    sub R K by R_K;
    sub R N by R_N;
    sub R O by R_O;
    sub R R by R_R;
    sub R S by R_S;
    sub R T by R_T;
    sub R U by R_U;
    sub R V by R_V;
    sub R W by R_W;
    sub R X by R_X;
    sub R Y by R_Y;
    sub R Z by R_Z;
    sub S T A by S_T_A;
    sub S T E by S_T_E;
    sub S T H by S_T_H;
    sub S T I by S_T_I;
    sub S T O by S_T_O;
    sub S T R by S_T_R;
    sub S T U by S_T_U;
    sub S T Y by S_T_Y;
    sub T A by T_A;
    sub T C by T_C;
    sub T D by T_D;
    sub T E by T_E;
    sub T F by T_F;
    sub T G by T_G;
    sub T H by T_H;
    sub T I by T_I;
    sub T K by T_K;
    sub T N by T_N;
    sub T O by T_O;
    sub T R by T_R;
    sub T S by T_S;
    sub T T by T_T;
    sub T U by T_U;
    sub T V by T_V;
    sub T W by T_W;
    sub T X by T_X;
    sub T Y by T_Y;
    sub T Z by T_Z;
    sub U T A by U_T_A;
    sub U T E by U_T_E;
    sub U T H by U_T_H;
    sub U T R by U_T_R;
    sub Y T H by Y_T_H;
    sub T I O N by T_I_O_N;
    sub S I O N by S_I_O_N;
    } liga;

I have tried placing "sub T I O N by T_I_O_N;" as the first statement instead of one of the last, but it makes no difference.

*NB* have also tried this with latest 5.2 build and get the same results
« Last Edit: 2012-11-13, 21:24:25 by geordienz »

agisaak

  • Beta: FontLab Studio Win
  • Hero Member
  • ***
  • Posts: 50
  • FontLab 5.1.1 Build 4353 - Mac OS 10.5.8
Re: OT features not showing in OT preview
« Reply #6 on: 2012-11-15, 12:18:18 »
Reordering your substitutions isn't going to have any effect unless you break your liga feature into separate lookups. Try the following:

feature liga {
   lookup liga1 {
        sub T I O N by T_I_O_N;
   } liga1;
   lookup liga2 {
        sub A T by A_T;
   } liga2;
} liga;

I leave it as an exercise for the reader to figure out where you want your other substitutions to go.

André

geordienz

  • Hero Member
  • *****
  • Posts: 22
Re: OT features not showing in OT preview
« Reply #7 on: 2012-11-15, 17:09:31 »
Reordering your substitutions isn't going to have any effect unless you break your liga feature into separate lookups. Try the following:

feature liga {
   lookup liga1 {
        sub T I O N by T_I_O_N;
   } liga1;
   lookup liga2 {
        sub A T by A_T;
   } liga2;
} liga;

I leave it as an exercise for the reader to figure out where you want your other substitutions to go.

André

Many thanks André.  I had actually worked this out for myself the other day.  What I am not understanding is, I only added T_I_O_N and S_I_O_N to a substitution list that I had gleaned from another font, and I cannot figure out why all the others work grouped together, but my additional ones need to be separate.

agisaak

  • Beta: FontLab Studio Win
  • Hero Member
  • ***
  • Posts: 50
  • FontLab 5.1.1 Build 4353 - Mac OS 10.5.8
Re: OT features not showing in OT preview
« Reply #8 on: 2012-11-15, 22:17:42 »

Many thanks André.  I had actually worked this out for myself the other day.  What I am not understanding is, I only added T_I_O_N and S_I_O_N to a substitution list that I had gleaned from another font, and I cannot figure out why all the others work grouped together, but my additional ones need to be separate.


All the other pairs/triplets listed in your example don't raise any ambiguities about which should be applied. For any potentially overlapping pairs (e.g. S_T and T_A in a word like 'STAB') there is a triplet which subsumes both pairs (e.g. S_T_A), so a single lookup suffices.

In a work like 'NATION' , the sequence ..AT.. will be encountered and processed before the opentype layout engine even sees the ..TION.. sequence since text strings are processed from left to right. Therefore you need to move this substitution to a separate lookup if you want it to take priority.

André

geordienz

  • Hero Member
  • *****
  • Posts: 22
Re: OT features not showing in OT preview
« Reply #9 on: 2012-11-16, 04:35:30 »
Thank you again, André.
That's the clear explanation I've been searching for.  Is there a book or tutorial somewhere that one can learn the nuances of OpenType programming?

agisaak

  • Beta: FontLab Studio Win
  • Hero Member
  • ***
  • Posts: 50
  • FontLab 5.1.1 Build 4353 - Mac OS 10.5.8
Re: OT features not showing in OT preview
« Reply #10 on: 2012-11-16, 10:01:44 »
Thank you again, André.
That's the clear explanation I've been searching for.  Is there a book or tutorial somewhere that one can learn the nuances of OpenType programming?

Unfortunately I'm not aware of any which are more detailed and/or clearer than the brief discussion given in the FL manual or on Adobe's site (http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html) -- I've found that experimentation is the best approach to clarifying those aspects of the OT spec which are unclear.

André

geordienz

  • Hero Member
  • *****
  • Posts: 22
Re: OT features not showing in OT preview
« Reply #11 on: 2012-11-18, 14:40:05 »
Thanks André. 
Just when I thought I was getting somewhere with this, I've discovered a glitch with Photoshop CS4, whereby only one (of two) set of ligature features is being actioned, although both show to be working in FL.
I can't see a solution for this anywhere on the web, and have attached a screenshot of OT info given in PS.

geordienz

  • Hero Member
  • *****
  • Posts: 22
Re: OT features not showing in OT preview
« Reply #12 on: 2012-11-19, 15:33:48 »
You'd think as a software engineer I'd already have done this  :-[ but I re-checked my code and discovered the fault lay with me.
Although, I do have to say that Fontlab's Preview function really should interpret code in the same manner as other software and not appear to work when it clearly will not do so elsewhere.

agisaak

  • Beta: FontLab Studio Win
  • Hero Member
  • ***
  • Posts: 50
  • FontLab 5.1.1 Build 4353 - Mac OS 10.5.8
Re: OT features not showing in OT preview
« Reply #13 on: 2012-11-19, 23:23:33 »
You'd think as a software engineer I'd already have done this  :-[ but I re-checked my code and discovered the fault lay with me.
Although, I do have to say that Fontlab's Preview function really should interpret code in the same manner as other software and not appear to work when it clearly will not do so elsewhere.

That would be nice, but it's not really possible since the other software doesn't handle opentype features uniformly.

André