Re: issue with a font with no features

Hans Hagen via ntg-context <[email protected]> Sun, 21 Jun 2026 15:17:07 +0200
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
On 6/21/2026 2:34 PM, Pablo Rodriguez via ntg-context wrote:
> Dear list,
> 
> I have a couple of fonts (https://www.dafont.com/sv-basic-manual.font)
> which contain no GPOS/GSUB features.
> 
> I mean, the following command gives nothing as a result:
> 
>    otfinfo -f ~/many-fonts/SVBManual.ttf
> 
> But I get an error such as
> 
>    tex error       > tex error on line 6 in file :
> 
>    lua error:
>      …font-ctx.lmt:2483: attempt to index a nil value (field 'gpos')
> 
> Well, the minimal function reads on my end (font-ctx.lmt):
> 
>      function constructors.currentfonthasfeature(n)
>          local f = fontdata[currentfont()]
>          if not f then return end f = f.shared
>          if not f then return end f = f.rawdata
>          if not f then return end f = f.resources
>          if not f then return end f = f.features
>          return f and (f.gpos[n] or f.gsub[n])
>      end
> 
> I guess that lacking features is a problem with checking whether a font
> has a given feature.
> 
> I need to compile the original document ASAP. Is there an easy fix to
> make these fonts work?

here

{\definedfont[SVBasicManual.ttf] test}

just works, as does

 >mtxrun --script font --list --info --details --pattern=svbasicmanual*
mtx-fonts       |
mtx-fonts       | mapping   : svbasicmanualbold
mtx-fonts       | fontname  : svbasicmanualbold
mtx-fonts       | fullname  : svbasicmanualbold
mtx-fonts       | filename  : SVBasicManual-Bold.ttf
mtx-fonts       | family    : svbasicmanual
mtx-fonts       | weight    : bold
mtx-fonts       | style     : normal
mtx-fonts       | width     : normal
mtx-fonts       | variant   : normal
mtx-fonts       |

fwiw, otfinfo is not something you use in context

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________