ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context <ntg-context@ntg.nl>
Cc: Max Chernoff <mseven@telus.net>
Subject: [NTG-context] Noto Emoji COLRv1
Date: Tue, 23 May 2023 15:31:48 -0600	[thread overview]
Message-ID: <62392038191a07c1e4a58ab90d3d104d91517bb8.camel@telus.net> (raw)

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
___________________________________________________________________________________

             reply	other threads:[~2023-05-23 21:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23 21:31 Max Chernoff via ntg-context [this message]
2023-05-24  7:05 ` Hans Hagen via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62392038191a07c1e4a58ab90d3d104d91517bb8.camel@telus.net \
    --to=ntg-context@ntg.nl \
    --cc=mseven@telus.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).