[XeTeX] fontspec and Nikosh font

maxwell maxwell at umiacs.umd.edu
Mon Jun 20 23:34:38 CEST 2016


With the version of fontspec that comes with TeXLive 2016, I'm getting 
some warnings that I wasn't getting from the previous version, with the 
'gargi' font (and another font).  If you want to try it, I'm not sure 
where the best (safest) place is to get the gargi font from, but one 
place is here:
    https://www.azfonts.net/load_font/gargi-1-3.html
(If you think that's unsafe, I could email you a copy of the file.)

The command I've been using to load the font is this:
    \newfontfamily\sanskritfont[Script=Devanagari]{gargi}
but now fontspec gives me the warning
    * fontspec warning: "script-not-exist"
    *
    * Font 'gargi' does not contain script 'Devanagari'.

If I run otfinfo --scripts on the font, I get this:
    deva            Devanagari
IIUC, the first field is the script code that appears in the font file, 
while the second field is a human-readable version of that.  On the 
assumption that the code is what the font knows about, I tried this 
command to load it:
    \newfontfamily\sanskritfont[Script=deva]{gargi}
But then I get this error from fontspec:
    ! LaTeX error: "kernel/key-choice-unknown"
    !
    ! Key 'fontspec/Script' accepts only a fixed set of choices.
    l.528 ...ntfamily\sanskritfont[Script=deva]{gargi}

Fontspec does load this font without complaint if I do this:
    \newfontfamily\sanskritfont[Language=Devanagari]{gargi}
but I'm lying to it, because Devanagari is a script, not a language.  
(And elsewhere I'm successfully using Script= with the name of a script, 
e.g 'Script=Thaana', where Thaana is the name of a script, Dhivehi is 
the name of the language that uses the Thaana script.)

Is this font using a non-standard way of tagging scripts?  Or am I 
misunderstanding the way these codes are supposed to work?

    Mike Maxwell



More information about the XeTeX mailing list