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. Jairo :)
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
On 2/5/2021 6:29 PM, Jairo A. del Rio wrote: 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 -----------------------------------------------------------------
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@xs4all.nl) escribió:
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
On 2/5/2021 6:29 PM, Jairo A. del Rio wrote: 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 -----------------------------------------------------------------
On 2/6/2021 3:08 AM, Jairo A. del Rio wrote:
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')
did you remake the format? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Ah, sorry. I'll try again.
Jairo
El sáb., 6 de feb. de 2021 3:45 p. m., Hans Hagen
On 2/6/2021 3:08 AM, Jairo A. del Rio wrote:
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')
did you remake the format?
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Jairo A. del Rio