On 5/11/2021 3:40 PM, Taco Hoekwater wrote:
On 11 May 2021, at 15:16, Hans Hagen
wrote: On 5/11/2021 2:08 PM, Jairo A. del Rio wrote:
Hi, list! Following this thread: https://tex.stackexchange.com/questions/596610/how-to-use-luatex-with-large-... https://tex.stackexchange.com/questions/596610/how-to-use-luatex-with-large-..., I tried to replicate it in ConTeXt. Both LMTX and LMTX fail to display the right symbol and, as it's discussed in the linked page, there's an offset by 14. Is this intentional (in ConTeXt)? A bug? Minimal (non-)working example: %Font available here: https://materialdesignicons.com/ https://materialdesignicons.com/ \starttext \definedfont[file:materialdesignicons-webfont.ttf]\char"F1372\relax \stoptext You need to employ a sense of humour for that font:
\starttext \definefontfeature[materialicons][default][rlig=yes] \definedfont[file:materialiconsregular.ttf*materialicons] baby_changing_station \stoptext
That only works with the regular font, not with the webfont version from the ‘easy download’ link (it is cool, though :)).
But that is not the issue. The issue is that you have this super-useful page online:
https://pictogrammers.github.io/@mdi/font/5.4.55/
where you can just copy the code point and/or the encoding hex value. But those values do not match the ones in ConTeXt because the duplicates are removed while creating the tma, which condenses the encoding, resulting in an encoding offset, and that in turns make cut&paste useless. :(
Also, it is a bit of a shame that the XXX-webfont.ttf has postscript glyph names that map to the online cheat sheet, but these names are not preserved in the tma file (at least not in my lmtx version). Keeping those would make the whole typset-a-specific-glyph procedure be a lot less error-prone, at least.
i suppose you noted the message -) can you confirm / check that we can safely assume zero length names to be okay? local length = readbyte(f) if length > 0 then glyphs[mapping].name = readstring(f,length) else -- report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow") -- break end i bet this check is there because of some other font needed it in order to get loaded ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------