[NTG-context] SVG fonts not working properly

Jairo A. del Rio jairoadelrio6 at gmail.com
Sat Feb 6 03:08:45 CET 2021


svg=fixdepth breaks, with or without the patch.

fatal lua error:


run callback [6]: [string
"/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:1587: attempt to
perform arithmetic on a nil value (field 'depth')

stack traceback:

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:1587: in local
'glyphtopdf'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:1879: in local
'writer'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:2080: in field
'integer index'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:782: in upvalue
'run'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:811: in field
'finalizedocument'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:2958: in field
'?'

...mtx/tex/texmf-context/tex/context/base/mkiv/luat-run.lua:56: in function
<...mtx/tex/texmf-context/tex/context/base/mkiv/luat-run.lua:54>

Jairo

El vie, 5 de feb. de 2021 a la(s) 17:02, Hans Hagen (j.hagen at xs4all.nl)
escribió:

> On 2/5/2021 6:29 PM, Jairo A. del Rio wrote:
> > The following examples doesn't work as expected:
> >
> >
> > \definefontfeature[emojis][default,color:svg][script=latn,language=dflt]
> >
> > \definefont[gilbert][file:Gilbert-ColorBoldPreview5*emojis @ 13bp]
> >
> > \starttext
> >
> > {\gilbert abcdefghijklmnpqrstuvwxyz}
> >
> > \stoptext
> >
> > Letters are displayed correctly, but ascenders and descenders don't. It
> > looks like characters are inserted like images rather than actual
> > characters. Am I missing something? Thank you in advance.
> svg fonts are a bit of a mess adn there are not many (scaling, offset
> etc. and specs kind of fuzzy .. one needs for instance treat the visible
> area in a special way .. there is no metadata wrt the glyph involved so
> we need to experiment a bit (i don't want to end up with heuristics
> based on guesswork)
>
> anyway, them being svg they are actually images (there was time that
> acrobat has svg on board but that was dropped) so what we end up is with
> is a pdf stream but in such a way that they are actual characters
>
> you can try this:
>
> \definefontfeature[color:svg]    [ccmp=yes,dist=yes,svg=fixdepth]
>
> and patch lpdf-emb with
>
>                               -- local y     = - b[4] - b[2] - (d.depth
> or 0)
>                                  local y     = - (d.depth or 0)
>
> and try some more (like emoji) ... no time now ... so you do the
> checking and later i will look at the result
>
> 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
> -----------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210205/5ed7a43b/attachment-0001.htm>


More information about the ntg-context mailing list