How does one set an emoji font as a fallback in ConTeXt?
MWE is basically, following the contextgarden/simplefonts instructions:
\definefontfamily [main] [serif] [Minion Pro]
\definefallbackfamily[main] [serif] [Noto Emoji] [range=emoticon,force=yes]
Noto Emoji is a free emoticon font from Google, available under SIL at: https://github.com/googlei18n/noto-emoji/tree/master/fonts
The job log reports:
selectfont > The requested fallback font 'Noto Emoji' for typeface 'main' style 'rm' was ignored because no files where found.
The command mtxrun --script font --list noto
shows:
notoemoji notoemoji /home/user/fonts/NotoEmoji-Regular.ttf
I've tracked the error down to http://source.contextgarden.net/tex/context/base/mkiv/font-sel.lua
in selectfont.definefallbackfamily
, but I'm not familiar enough to guess what might be the issue here.
[edit] Incidentally: context --version
returns: ConTeXt Process Management 0.63
and current version: 2017.01.27 14:39
; it also exhibits on MacTeX with version 2016.10.22 10:43
[edit] There seems to be some difference in the latest ConTeXt standalone, so I suspect there may be issues "on the edge". In any case, here's a full MWE:
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = ConTeXt (LuaTeX)
\enabletrackers[selectfont.register,selectfont.files,selectfont.alternatives]
\definefontfamily [main] [serif] [Minion Pro]
\definefallbackfamily[main] [serif] [Noto Emoji] [range=emoticon,force=yes]
\setupbodyfont[main]
\starttext
Hello. Some valid Noto Emoji: 🙂 ⌛ ⏳ ⌚
\stoptext
[edit] Here's a sample of the unicode range included:
\definefallbackfamily[main] [serif] [Noto Emoji] [force=yes,range={emoticons,dingbats,miscellaneoussymbols,ornamentaldingbats,miscellaneousmathematicalsymbolsa,miscellaneousmathematicalsymbolsb,miscellaneoussymbols,miscellaneoussymbolsandarrows,miscellaneoussymbolsandpictographs,miscellaneoustechnical}]
Further ranges can be seen in context/tex/texmf-context/tex/context/base/mkiv/char-ini.lua