silnrsi / grcompiler

The SIL Graphite compiler builds a Graphite enabled font from a smart font description
http://graphite.sil.org
Other
7 stars 3 forks source link

Grcompiler 5.2 compilation problem (error 3168) #29

Open Saeed854 opened 4 years ago

Saeed854 commented 4 years ago

Hello I have a problem with compiling a font with grcompiler v5.2 here's the error (from gdlerr.txt):


GDL file: ex5a.gdl
Input font file: GalatiaGrTut.ttf
Output font file: GraphiteTestFont.ttf
Output font family: Test Font
Silf table version: 2.0
Create separate control file: no

*******************************************************

ex5a.gdl(11) : Gdlpp.exe Warning: Illegal digit in octal number
ex5a.gdl(17) : Gdlpp.exe Warning: Illegal digit in octal number
ex5a.gdl(59) : error(3168): Rules with deletions must include at least two slots
ex5a.gdl(60) : error(3168): Rules with deletions must include at least two slots

*******************************************************

Compilation failed - 2 errors, 2 warnings

this is the gdl file (from graphite tutorial, unit 5, Exercise 5a):

#include "stddef.gdh"

table(glyph)

  // Roman

  clsRoman = ((U+0061..U+0069),  // a..i
    (U+006B..U+0075),   // k..u
    (U+0077..U+007a));  // w..z

  gJ = U+006a;
  gV = U+0076;
  gH = U+0068;
  gT = U+0074;
  gP = U+0070;
  gS = U+0073;

  // Greek

  clsGreek = (U+03b1, // alpha
    U+03b2,   // beta
    U+03c7,   // chi
    U+03b4,   // delta
    U+03b5,   // epsilon
    U+03c6,   // phi
    U+03b3,   // gamma
    U+03b7,   // eta
    U+03b9,   // iota
    U+03ba,   // kappa
    U+03BB,   // lambda - use BB to avoid compiler bug
    U+03bc,   // mu
    U+03bd,   // nu
    U+03bf,   // omicron
    U+03d0,   // pi
    U+03b8,   // theta
    U+03c1,   // rho
    U+03c2,   // sigma
    U+03c4,   // tau
    U+03c5,   // upsilon
    U+03c9,   // omega
    U+03be,   // xi
    U+03c8,   // psi
    U+03b6);  // zeta

  gTheta = U+03b8;
  gPhi = U+03c6;
  gPsi = U+03c8;

endtable;

table(sub)
  // Delete j and v. Here we do not associate them
  // with any surface glyph, so it will be impossible
  // to select or manipulate them.
  gJ  >  _;
  gV  >  _;

  // Handle sequences.
  gT gH  >  gTheta:(1 2) _;
  gP gH  >  gPhi:(1 2) _;
  gP gS  >  gPsi:(1 2) _;

  // Everything else:
  clsRoman > clsGreek;
endtable;

the main problem is the following rule:

  // Delete j and v. Here we do not associate them
  // with any surface glyph, so it will be impossible
  // to select or manipulate them.
  gJ  >  _;
  gV  >  _;
nrsiward commented 3 years ago

This example comes from the Graphite Tutorial and this problem is noted there, but this should be fixed by changing the solution or debugging the compiler.