Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a font (Dolly) with f_i and f_l ligatures, which requires a feature file to make them work. Everything works fine using the following:

# dolly.fea

languagesystem DFLT dflt;
languagesystem latn dflt;

feature liga {
   sub f l  by f_l ;
   sub f i  by f_i ;
} liga ;

in the same directory as my .tex file

\documentclass[12pt]{article}

\usepackage{microtype}
\usepackage{fontspec}

\newfontfeature{Microtype}{protrusion=default;expansion=default;}

\setmainfont[
    FeatureFile = {dolly.fea},
    Microtype,
    Renderer=Basic,
    Ligatures={TeX},
    ItalicFont = {Dolly Italic},
]{Dolly Roman}

....

But the problem is that I don't want to put this in the same directory as my .tex file each time. The fontspec manual suggests that using a full path should work, but when I do this:

....
\setmainfont[
    FeatureFile = {/path/to/dolly.fea},
    Microtype,
    Renderer=Basic,
    Ligatures={TeX},
    ItalicFont = {Dolly Italic},
]{Dolly Roman}
....

I get an error

! LuaTeX error ...2/texmf-dist/tex/luatex/luaotfload/otfl-font-otf.lua:228: bad
 argument #1 to 'attributes' (string expected, got boolean).
<to be read again> 
                   relax 
l.16 ]{Dolly Roman}

It also can't seem to find it when I place it in $TEXMF/fonts/fea/ or in my $TEXINPUTS dir. It just proceeds to compile the file without the ligatures. (Note that kpsewhich sees it).

So, my question: is there any way to set up a features file that I can use system-wide, or at least without copying it to every directory I want to run lualatex in?

share|improve this question
1  
Welcome to TeX.sx! –  Kurt Dec 3 '12 at 18:55
1  
Are you not using Walter Schmidt’s metrics for Dolly (ctan.org/tex-archive/fonts/psfonts/w-a-schmidt)? I have this font too, and both the fi and fl ligatures work perfectly with no need for me to write a feature file. By the way, an OpenType version of Dolly is in the works (underware.nl/fonts/dolly/features/font_formats). –  Thérèse Dec 4 '12 at 15:26
    
I'm not, at the moment, but thank you for pointing that out. My question, I suppose, was more about how to use feature files (which have other advertised uses) in general. This was the specific case that I came up against, but I'm curious about them more generally. –  jkr Dec 4 '12 at 17:25
add comment

1 Answer

up vote 2 down vote accepted

I've figured out the answer to this, in case anyone else is curious. This works with TexLive 2013, I'm not sure if it would work elsewhere.

Put the feature file in some place that kpse can find it (I used /usr/local/texlive/texmf-local/luatex/luaotfload/) and run texhash. Make sure that the file has a lowercase name (this threw me for for a while).

Seems obvious enough, but either I was trying the wrong directories, or forgetting to run texhash before, or the title case was off. Whatever the case may be, it works now.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.