Re: [NTG-context] Noto Emoji COLRv1

2023-05-24 Thread Hans Hagen via ntg-context

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
___


[NTG-context] Noto Emoji COLRv1

2023-05-23 Thread Max Chernoff via ntg-context
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
___