ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Noto Emoji COLRv1
@ 2023-05-23 21:31 Max Chernoff via ntg-context
  2023-05-24  7:05 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Max Chernoff via ntg-context @ 2023-05-23 21:31 UTC (permalink / raw)
  To: ntg-context; +Cc: Max Chernoff

Hi Hans,

I tried using the code from [1] for Noto Emoji in COLRv1 format [2]:

   \startTEXpage
       \definefontfeature[colored][default][colr=9]
       \definedfont[Noto-COLRv1.ttf*colored] 🦆 % U+1F986
   \stopTEXpage

but ConTeXt gives the following error:

   fonts           > otf loading > loading 'Noto-COLRv1.ttf', hash 'noto-colrv1'
   otf reader      > table version 1 of 'colr' is partially supported for font Noto-COLRv1.ttf
   otf reader      > unsupported colr type 2 paint format 0
   otf reader      > unsupported colr type 2 paint format %i
   otf reader      > fatal error in file 'Noto-COLRv1.ttf': ...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: table index is nil
   stack traceback:
   	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in metamethod 'newindex'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: in metamethod 'index'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in metamethod 'index'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3150: in upvalue 'getpaintoffset'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3564: in field '?'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in metamethod 'index'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3685: in local 'reader'
   	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in upvalue 'readtable'
   	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2204: in upvalue 'readdata'
   	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2257: in function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2240>
   	[C]: in function 'xpcall'
   	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2346: in upvalue 'loadfont'
   	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2401: in field 'loadfont'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:160: in field 'load'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:624: in upvalue 'otftotfm'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:652: in function <...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:651>
   	(...tail calls...)
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:362: in function <...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:350>
   	(...tail calls...)
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:465: in field 'read'
   	...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1371: in function <...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1228>
   	(...tail calls...)
   fonts           > otf loading > loading failed due to read error
   fonts           > defining > forced type 'ttf' of 'Noto-COLRv1' not found
   fonts           > defining > unable to define 'Noto-COLRv1.ttf' as 'thedefinedfont--0'
   system          > print height forced to paper height
   system          > print width forced to paper width
   fonts           > checking > char 🦆 (U+1F986) in font 'LMRoman10-Regular' with id 1: missing

From what I can tell, the Lua code is trying to read past the end of
font file. I tried debugging the error further, but this is well beyond
my understanding.

(Also, paintreaders[6--11] in font-dsp.lmt are missing "offset" in the
function signature, and paintreaders itself is glboal. Maybe related?)

I'm using the current latest (2023.05.08 17:39).

Thanks,
-- Max

[1]: https://mailman.ntg.nl/pipermail/ntg-context/2022/107279.html
[2]: https://github.com/googlefonts/noto-emoji/raw/main/fonts/Noto-COLRv1.ttf
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [NTG-context] Noto Emoji COLRv1
  2023-05-23 21:31 [NTG-context] Noto Emoji COLRv1 Max Chernoff via ntg-context
@ 2023-05-24  7:05 ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen via ntg-context @ 2023-05-24  7:05 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 5/23/2023 11:31 PM, Max Chernoff via ntg-context wrote:
> Hi Hans,
> 
> I tried using the code from [1] for Noto Emoji in COLRv1 format [2]:
> 
>     \startTEXpage
>         \definefontfeature[colored][default][colr=9]
>         \definedfont[Noto-COLRv1.ttf*colored] 🦆 % U+1F986
>     \stopTEXpage
> 
> but ConTeXt gives the following error:
> 
>     fonts           > otf loading > loading 'Noto-COLRv1.ttf', hash 'noto-colrv1'
>     otf reader      > table version 1 of 'colr' is partially supported for font Noto-COLRv1.ttf
>     otf reader      > unsupported colr type 2 paint format 0
>     otf reader      > unsupported colr type 2 paint format %i
>     otf reader      > fatal error in file 'Noto-COLRv1.ttf': ...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: table index is nil
>     stack traceback:
>     	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in metamethod 'newindex'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3575: in metamethod 'index'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in metamethod 'index'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3150: in upvalue 'getpaintoffset'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3564: in field '?'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3677: in metamethod 'index'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-dsp.lmt:3685: in local 'reader'
>     	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in upvalue 'readtable'
>     	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2204: in upvalue 'readdata'
>     	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2257: in function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2240>
>     	[C]: in function 'xpcall'
>     	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2346: in upvalue 'loadfont'
>     	...ext/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2401: in field 'loadfont'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:160: in field 'load'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:624: in upvalue 'otftotfm'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:652: in function <...ext/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:651>
>     	(...tail calls...)
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:362: in function <...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:350>
>     	(...tail calls...)
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:465: in field 'read'
>     	...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1371: in function <...ext/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1228>
>     	(...tail calls...)
>     fonts           > otf loading > loading failed due to read error
>     fonts           > defining > forced type 'ttf' of 'Noto-COLRv1' not found
>     fonts           > defining > unable to define 'Noto-COLRv1.ttf' as 'thedefinedfont--0'
>     system          > print height forced to paper height
>     system          > print width forced to paper width
>     fonts           > checking > char 🦆 (U+1F986) in font 'LMRoman10-Regular' with id 1: missing
> 
>  From what I can tell, the Lua code is trying to read past the end of
> font file. I tried debugging the error further, but this is well beyond
> my understanding.
> 
> (Also, paintreaders[6--11] in font-dsp.lmt are missing "offset" in the
> function signature, and paintreaders itself is glboal. Maybe related?)
> 
> I'm using the current latest (2023.05.08 17:39).
i'll check it but as usuel with these new things in fonts, one depends 
on fonts for testing so all that goes stepwise (as - hopefully correct - 
fonts come available)

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 : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-24  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23 21:31 [NTG-context] Noto Emoji COLRv1 Max Chernoff via ntg-context
2023-05-24  7:05 ` Hans Hagen via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).