Apostrophe kerning by contextual lookup table

2»

Comments

  • André G. IsaakAndré G. Isaak Posts: 459
    edited December 2018
    learning .fea syntax from decompiled FontForge structures is tricky

    OTMaster is another program I wouldn't recommend for learning how to encode features. — Its decompiled source maintains maximal faithfulness to the underlying structure of the font at the expense of readability. There are situations where this is highly desirable, but learning coding isn't one of them.
  • mauro sacchettomauro sacchetto Posts: 215
    edited December 2018
     FF, which I find buggy (and sometimes it even crashes).
    True. However, it'a free software with only a few developers and  economic resources. So, it likes me in any case a meritorious undertaking.

    I myself identified and reported in github a bug related to the automatic creation of aalt, which causes FF freezes.

    On December 26th I received the following statement from a developer in FF users.list (so Linux users can hope in a better release):
    There was a long-blocking list of issues that finally has fixes in review. We expect a release before the end of the year. Please note any other low-hanging fruit (open crashes with backtraces) here so that I can pack them in.
  • FF is a precious gem of the open source type scene, it is like an unpolished diamond, its structure so brittle that polishing might break it :) I'll have a look on the changelist when the new release rolls in, that might be interesting.
  • Analizing FF .fea ... and hoping to undestand!
  • mauro sacchettomauro sacchetto Posts: 215
    edited December 2018
    Thanks to your generous help I finally almost succeeded.
    I created the glyph <quoterighr.fr> with less bearing, a Single Substitution Lookup and a Lookup calt Chaining Substitution with latn{FRA ,ITA }.
    It likes so (in the form FontForge exports .fes files):

    lookup caltContextualAlternateslookup15 {
    
      lookupflag 0;
        @cc0_match_1 = [\A \B \C \D \E \F \G \H \I \J \K \L \M \N \O \P \Q \R \S \T \U \V \W \X \Y \Z \a \b \c \d \e \f \g \h \i \j 	\k \l \m \n \o \p \q \r \s \t \u \v \w \x \y ];
        @cc0_match_2 = [\quoteright ];
        @cc0_back_1 = [\A \B \C \D \E \F \G \H \I \J \K \L \M \N \O \P \Q \R \S \T \U \V \W \X \Y \Z \a \b \c \d \e \f \g \h \i \j 	\k \l \m \n \o \p \q \r \s \t \u \v \w \x \y ];
        @cc0_back_2 = [\quoteright ];
        @cc0_ahead_1 = [\A \B \C \D \E \F \G \H \I \J \K \L \M \N \O \P \Q \R \S \T \U \V \W \X \Y \Z \a \b \c \d \e \f \g \h \i \j 	\k \l \m \n \o \p \q \r \s \t \u \v \w \x \y ];
        @cc0_ahead_2 = [\quoteright ];
        sub @cc0_back_1 @cc0_match_2'  by [\quoteright.fr ] ;
    } caltContextualAlternateslookup15;

    In the specific case, I created it by Classes and not by Coverage. I acted well, or is this last solution more appropriate?

    However: Problems

    1.
    With Libreoffice I obtain the desired results; if I change the languages, quoteright.fr is not used in English and it's in Italian language. With Xetex settings are ignored, even if I put in my .tex file <RawFeature=+calt>; infact there is no calt if I ask so:

    [email protected]:~/work$ otfinfo -f SamielPro.otf 
    
    aalt	Access All Alternates
    c2sc	Small Capitals From Capitals
    cpsp	Capital Spacing
    dnom	Denominators
    frac	Fractions
    kern	Kerning
    liga	Standard Ligatures
    lnum	Lining Figures
    numr	Numerators
    onum	Oldstyle Figures
    pnum	Proportional Figures
    smcp	Small Capitals
    sups	Superscript
    tnum	Tabular Figures
    zero	Slashed Zero

    All works with Xetex if and only if I set calt languages to general default, i.e. <DFLT{dflt} grek{dflt} latn{dflt}>

    2.
    When quoteright is not an apostrophe and I don't need narrower spacing? Have I to set calt in a different way, inserting a third condition, I mean letter + quoteright + letter?
  • mauro sacchettomauro sacchetto Posts: 215
    edited December 2018
    I tried with GaramondPremerePro and other otf fonts: calt and locl don't work in xelatex, while in LibreOffice they do. So it's not a font problem, but a trouble with Xetex:
    https://tex.stackexchange.com/questions/467943/xetex-support-for-otf-features .

    So remain two questions:
    better calt by classes o by coverage?
    and the above question no. 2
    thanx


Sign In or Register to comment.