[dev-context] OpenType Optical Bounds 'opbd' feature

Khaled Hosny khaledhosny at eglug.org
Wed Feb 24 19:16:43 CET 2010


On Wed, Feb 24, 2010 at 06:28:53PM +0100, Hans Hagen wrote:
> On 24-2-2010 17:31, Khaled Hosny wrote:
> >On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
> >>If a real test suite is needed, I can prepare a special copy of one of
> >>TeX Gyre fonts for this purpose.
> >
> >I went ahead and patched texgyre pagella to implement lfbd/rtbd features
> >(based on palatino protrusion values from microtype package), attached
> >the font file and the "dirty" python script used to build it.
> 
> just wondering ... wouldn't it make more sense to do that kind of
> things in fea files? that way there can be variants (not hardcoded)

Possible, at the engine it doesn't matter if it is a fea file or
hardcoded; after loading a fea file it is all the same.

Attached a feature file (generated by FF from the previous font, so it
is essentially the same).

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
-------------- next part --------------

lookup RightBounds {
  lookupflag 0;
    pos \exclam <100 0 0 0>;
    pos \percent <100 0 0 0>;
    pos \ampersand <100 0 0 0>;
    pos \parenright <300 0 0 0>;
    pos \asterisk <200 0 0 0>;
    pos \plus <250 0 0 0>;
    pos \comma <500 0 0 0>;
    pos \hyphen <500 0 0 0>;
    pos \period <700 0 0 0>;
    pos \slash <300 0 0 0>;
    pos \one <100 0 0 0>;
    pos \seven <50 0 0 0>;
    pos \colon <500 0 0 0>;
    pos \semicolon <500 0 0 0>;
    pos \question <200 0 0 0>;
    pos \at <50 0 0 0>;
    pos \A <50 0 0 0>;
    pos \K <50 0 0 0>;
    pos \L <50 0 0 0>;
    pos \T <50 0 0 0>;
    pos \V <50 0 0 0>;
    pos \W <50 0 0 0>;
    pos \X <50 0 0 0>;
    pos \Y <50 0 0 0>;
    pos \k <50 0 0 0>;
    pos \p <50 0 0 0>;
    pos \r <50 0 0 0>;
    pos \v <50 0 0 0>;
    pos \w <50 0 0 0>;
    pos \x <50 0 0 0>;
    pos \y <70 0 0 0>;
    pos \asciitilde <250 0 0 0>;
    pos \Agrave <50 0 0 0>;
    pos \Aacute <50 0 0 0>;
    pos \Acircumflex <50 0 0 0>;
    pos \Atilde <50 0 0 0>;
    pos \Adieresis <50 0 0 0>;
    pos \Aring <50 0 0 0>;
    pos \Amacron <50 0 0 0>;
    pos \Abreve <50 0 0 0>;
    pos \Aogonek <50 0 0 0>;
    pos \Kcommaaccent <50 0 0 0>;
    pos \kcommaaccent <50 0 0 0>;
    pos \Lacute <50 0 0 0>;
    pos \Lcommaaccent <50 0 0 0>;
    pos \Lcaron <50 0 0 0>;
    pos \Ldot <50 0 0 0>;
    pos \Lslash <50 0 0 0>;
    pos \racute <50 0 0 0>;
    pos \rcommaaccent <50 0 0 0>;
    pos \rcaron <50 0 0 0>;
    pos \wcircumflex <50 0 0 0>;
    pos \ycircumflex <70 0 0 0>;
    pos \Acaron <50 0 0 0>;
    pos \Aringacute <50 0 0 0>;
    pos \Adblgrave <50 0 0 0>;
    pos \rdblgrave <50 0 0 0>;
    pos \uni021A <50 0 0 0>;
    pos \Alpha <50 0 0 0>;
    pos \Kappa <50 0 0 0>;
    pos \Lambda <50 0 0 0>;
    pos \Tau <50 0 0 0>;
    pos \Ldotbelow <50 0 0 0>;
    pos \Ldotbelowmacron <50 0 0 0>;
    pos \rdotaccent <50 0 0 0>;
    pos \rdotbelow <50 0 0 0>;
    pos \rdotbelowmacron <50 0 0 0>;
    pos \Tdotbelow <50 0 0 0>;
    pos \Tlinebelow <50 0 0 0>;
    pos \wgrave <50 0 0 0>;
    pos \wacute <50 0 0 0>;
    pos \wdieresis <50 0 0 0>;
    pos \Ahookabove <50 0 0 0>;
    pos \Acircumflexacute <50 0 0 0>;
    pos \Acircumflexgrave <50 0 0 0>;
    pos \Acircumflexhookabove <50 0 0 0>;
    pos \Acircumflextilde <50 0 0 0>;
    pos \Acircumflexdotbelow <50 0 0 0>;
    pos \Abreveacute <50 0 0 0>;
    pos \Abrevegrave <50 0 0 0>;
    pos \Abrevehookabove <50 0 0 0>;
    pos \Abrevetilde <50 0 0 0>;
    pos \Abrevedotbelow <50 0 0 0>;
    pos \ygrave <70 0 0 0>;
    pos \ydotbelow <70 0 0 0>;
    pos \yhookabove <70 0 0 0>;
    pos \ytilde <70 0 0 0>;
    pos \endash <300 0 0 0>;
    pos \emdash <200 0 0 0>;
    pos \quoteleft <700 0 0 0>;
    pos \quoteright <700 0 0 0>;
    pos \quotedblleft <400 0 0 0>;
    pos \quotedblright <400 0 0 0>;
    pos \Aogonekacute <50 0 0 0>;
    pos \L_uni0303 <50 0 0 0>;
    pos \T_uni0303 <50 0 0 0>;
    pos \T_uni0308 <50 0 0 0>;
} RightBounds;

lookup LeftBounds {
  lookupflag 0;
    pos \percent <-100 0 -100 0>;
    pos \ampersand <-50 0 -50 0>;
    pos \parenleft <-100 0 -100 0>;
    pos \asterisk <-200 0 -200 0>;
    pos \plus <-250 0 -250 0>;
    pos \hyphen <-400 0 -400 0>;
    pos \slash <-200 0 -200 0>;
    pos \one <-100 0 -100 0>;
    pos \at <-50 0 -50 0>;
    pos \A <-50 0 -50 0>;
    pos \J <-50 0 -50 0>;
    pos \T <-50 0 -50 0>;
    pos \V <-50 0 -50 0>;
    pos \W <-50 0 -50 0>;
    pos \X <-50 0 -50 0>;
    pos \Y <-50 0 -50 0>;
    pos \p <-50 0 -50 0>;
    pos \q <-50 0 -50 0>;
    pos \v <-50 0 -50 0>;
    pos \w <-50 0 -50 0>;
    pos \x <-50 0 -50 0>;
    pos \y <-50 0 -50 0>;
    pos \asciitilde <-200 0 -200 0>;
    pos \Agrave <-50 0 -50 0>;
    pos \Aacute <-50 0 -50 0>;
    pos \Acircumflex <-50 0 -50 0>;
    pos \Atilde <-50 0 -50 0>;
    pos \Adieresis <-50 0 -50 0>;
    pos \Aring <-50 0 -50 0>;
    pos \Amacron <-50 0 -50 0>;
    pos \Abreve <-50 0 -50 0>;
    pos \Aogonek <-50 0 -50 0>;
    pos \Jcircumflex <-50 0 -50 0>;
    pos \wcircumflex <-50 0 -50 0>;
    pos \ycircumflex <-50 0 -50 0>;
    pos \Acaron <-50 0 -50 0>;
    pos \Aringacute <-50 0 -50 0>;
    pos \Adblgrave <-50 0 -50 0>;
    pos \uni021A <-50 0 -50 0>;
    pos \Alpha <-50 0 -50 0>;
    pos \Lambda <-50 0 -50 0>;
    pos \Tau <-50 0 -50 0>;
    pos \Tdotbelow <-50 0 -50 0>;
    pos \Tlinebelow <-50 0 -50 0>;
    pos \wgrave <-50 0 -50 0>;
    pos \wacute <-50 0 -50 0>;
    pos \wdieresis <-50 0 -50 0>;
    pos \Ahookabove <-50 0 -50 0>;
    pos \Acircumflexacute <-50 0 -50 0>;
    pos \Acircumflexgrave <-50 0 -50 0>;
    pos \Acircumflexhookabove <-50 0 -50 0>;
    pos \Acircumflextilde <-50 0 -50 0>;
    pos \Acircumflexdotbelow <-50 0 -50 0>;
    pos \Abreveacute <-50 0 -50 0>;
    pos \Abrevegrave <-50 0 -50 0>;
    pos \Abrevehookabove <-50 0 -50 0>;
    pos \Abrevetilde <-50 0 -50 0>;
    pos \Abrevedotbelow <-50 0 -50 0>;
    pos \ygrave <-50 0 -50 0>;
    pos \ydotbelow <-50 0 -50 0>;
    pos \yhookabove <-50 0 -50 0>;
    pos \ytilde <-50 0 -50 0>;
    pos \endash <-300 0 -300 0>;
    pos \emdash <-200 0 -200 0>;
    pos \quoteleft <-500 0 -500 0>;
    pos \quoteright <-500 0 -500 0>;
    pos \quotedblleft <-300 0 -300 0>;
    pos \quotedblright <-300 0 -300 0>;
    pos \Aogonekacute <-50 0 -50 0>;
    pos \J_uni030C.cap <-50 0 -50 0>;
    pos \T_uni0303 <-50 0 -50 0>;
    pos \T_uni0308 <-50 0 -50 0>;
} LeftBounds;

feature rtbd {

  script DFLT;
     language dflt ;
      lookup RightBounds;

  script grek;
     language dflt ;
      lookup RightBounds;

  script latn;
     language dflt ;
      lookup RightBounds;
     language AZE  exclude_dflt;
      lookup RightBounds;
     language CRT  exclude_dflt;
      lookup RightBounds;
     language MOL  exclude_dflt;
      lookup RightBounds;
     language NLD  exclude_dflt;
      lookup RightBounds;
     language PLK  exclude_dflt;
      lookup RightBounds;
     language ROM  exclude_dflt;
      lookup RightBounds;
     language TRK  exclude_dflt;
      lookup RightBounds;

  script thai;
     language dflt ;
      lookup RightBounds;
} rtbd;

feature lfbd {

  script DFLT;
     language dflt ;
      lookup LeftBounds;

  script grek;
     language dflt ;
      lookup LeftBounds;

  script latn;
     language dflt ;
      lookup LeftBounds;
     language AZE  exclude_dflt;
      lookup LeftBounds;
     language CRT  exclude_dflt;
      lookup LeftBounds;
     language MOL  exclude_dflt;
      lookup LeftBounds;
     language NLD  exclude_dflt;
      lookup LeftBounds;
     language PLK  exclude_dflt;
      lookup LeftBounds;
     language ROM  exclude_dflt;
      lookup LeftBounds;
     language TRK  exclude_dflt;
      lookup LeftBounds;

  script thai;
     language dflt ;
      lookup LeftBounds;
} lfbd;



More information about the dev-context mailing list