lmtx & lohit-devanagari fonts
Hello! I'm working on a small presentation for an upcoming video meeting and started writing some points in Markdown. After using Pandoc to convert I noticed that *.pptx file does contain everything, but if I try with ConTexT, then Devanagi and some diacritics are missing. By inspecting *.pdf file produced by: Pandoc --> PPTX --> LibreOffice --> PDF I can see that Lohit-Devanagari font is used for Sanskrit and I have it installed on my Fedora (fc32) desktop machine. Here is the test file: \starttext ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥ dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate Translation: ``While contemplating the objects of the senses, a person develops attachment for them, and from such attachment lust develops, and from lust anger arises.'' \stoptext which I would like to quote - I am somewhat familiar with latin transliteration via diacritics, but completely ignorant in regard to Devanagari - but wonder what is required to make ConText (lmtx) typeset it? Here is the log file: $ context t.tex resolvers | formats | executing runner 'run luametatex format': /home/gour/opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="t" --fmt=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./t.tex" --c:input="./t.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/gour/opt/lmtx/tex/texmf-linux-64/bin" This is LuaMetaTeX, Version 2.05.02 open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2020.04.19 19:43 MKIV beta fmt: 2020.4.21 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source > level 2, order 2, name '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 't', input './t', result 't' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name './t.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded fonts > checking > char ध (U+00927) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ् (U+0094D) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char य (U+0092F) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ा (U+0093E) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char त (U+00924) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ो (U+0094B) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char व (U+00935) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ि (U+0093F) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ष (U+00937) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char न (U+00928) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char प (U+0092A) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ु (U+00941) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ं (U+00902) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char स (U+00938) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ः (U+00903) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ङ (U+00919) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ग (U+00917) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char े (U+00947) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ू (U+00942) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ज (U+0091C) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char । (U+00964) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ञ (U+0091E) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char क (U+00915) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char म (U+0092E) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char र (U+00930) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ऽ (U+0093D) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char भ (U+0092D) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ॥ (U+00965) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ६ (U+0096C) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char २ (U+00968) in font 'LMRoman12-Regular' with id 1: missing fonts > checking > char ṁ (U+01E41) in font 'LMRoman12-Regular' with id 1: missing backend > xmp > using file '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 close source > level 2, order 3, name './t.tex' close source > level 1, order 3, name 'cont-yes.mkiv' mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.004 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 11 found files, scanned paths: <none> mkiv lua stats > stored bytecode data: 468 modules (0.244 sec), 93 tables (0.015 sec), 561 chunks (0.259 sec) mkiv lua stats > traced context: maxstack: 1416, freed: 0, unreachable: 1416 mkiv lua stats > cleaned up reserved nodes: 57 nodes, 9 lists of 442 mkiv lua stats > node memory usage: 6 attribute, 3 attribute_list, 1 glue, 51 glue_spec, 3 kern, 2 penalty, 2 temp, 2 whatsit mkiv lua stats > node list callback tasks: 8 unique task lists, 7 instances (re)created, 51 calls mkiv lua stats > used backend: lmtx version 0.10, pdf (backend for directly generating pdf output) mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: internal: 122, file: 150, direct: 2, late: 0, function 1062, total: 1336 mkiv lua stats > randomizer: resumed with value 0.82539481794329 mkiv lua stats > result saved in file: t.pdf, compresslevel 3, objectcompresslevel 1 mkiv lua stats > loaded patterns: en::1, load time: 0.000 mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf mkiv lua stats > font engine: otf 3.111, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.208 seconds mkiv lua stats > font embedding time: 0.014 seconds, 1 fonts mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luametatex version: 2.0502, functionality level: 20200413, format id: 493, compiler: gcc mkiv lua stats > control sequences: 46009 of 65536 + 100000 mkiv lua stats > lua properties: engine: lua 5.4, used memory: 49 MB, ctx: 47 MB, max: 48 MB, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 0.604 seconds, 1 processed pages, 1 shipped pages, 1.656 pages/second system | total runtime: 0.613 seconds of 0.667 seconds Strangely enough, in both Vim (used for writing this email) as well as in Emacs I can properly see both Devanagari and diacritics. :-) Sincerely, Gour -- From wherever the mind wanders due to its flickering and unsteady nature, one must certainly withdraw it and bring it back under the control of the self.
Saša Janiška schrieb am 21.04.2020 um 15:06:
Hello!
I'm working on a small presentation for an upcoming video meeting and started writing some points in Markdown. After using Pandoc to convert I noticed that *.pptx file does contain everything, but if I try with ConTexT, then Devanagi and some diacritics are missing.
By inspecting *.pdf file produced by: Pandoc --> PPTX --> LibreOffice --> PDF
I can see that Lohit-Devanagari font is used for Sanskrit and I have it installed on my Fedora (fc32) desktop machine.
Here is the test file:
\starttext ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥
dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate
Translation: ``While contemplating the objects of the senses, a person develops attachment for them, and from such attachment lust develops, and from lust anger arises.''
\stoptext
which I would like to quote - I am somewhat familiar with latin transliteration via diacritics, but completely ignorant in regard to Devanagari - but wonder what is required to make ConText (lmtx) typeset it?
You have to set a font which has the required glyphs but you can also use different fonts for both scripts and combine them. \definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two] \definefontfamily [mainface] [ss] [Noto Sans] \setupbodyfont[mainface] \starttext ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥ dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate \stoptext Wolfgang
On Tue, 21 Apr 2020 15:32:24 +0200
Wolfgang Schuster
You have to set a font which has the required glyphs but you can also use different fonts for both scripts and combine them.
I understand that the font was not set... tried with your example...
\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two]
\definefontfamily [mainface] [ss] [Noto Sans]
\setupbodyfont[mainface]
\starttext
ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥
dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate
\stoptext
...but although I've installed all the google-noto-serif-devanagari-fonts available for Fedora, it still does not work: $ context t.tex resolvers | formats | executing runner 'run luametatex format': /home/gour/opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="t" --fmt=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./t.tex" --c:input="./t.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/gour/opt/lmtx/tex/texmf-linux-64/bin" This is LuaMetaTeX, Version 2.05.02 open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2020.04.19 19:43 MKIV beta fmt: 2020.4.21 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source > level 2, order 2, name '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 't', input './t', result 't' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name './t.tex' selectfont > the requested fallback font 'Noto Sans Devanagari' for typeface 'mainface' style 'ss' was ignored because no files where found. selectfont > the requested font 'Noto Sans' has no files for the 'tf' alternative, Latin Modern is used instead. fonts > preloading modern-designsize (math) fonts > typescripts > unknown library 'modern-designsize' fonts > 'fallback modern-designsize mm 12pt' is loaded fonts > preloading modern-designsize (mono) fonts > 'fallback modern-designsize tt 12pt' is loaded fonts > checking > char ध (U+00927) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ् (U+0094D) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char य (U+0092F) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ा (U+0093E) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char त (U+00924) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ो (U+0094B) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char व (U+00935) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ि (U+0093F) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ष (U+00937) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char न (U+00928) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char प (U+0092A) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ु (U+00941) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ं (U+00902) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char स (U+00938) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ः (U+00903) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ङ (U+00919) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ग (U+00917) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char े (U+00947) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ू (U+00942) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ज (U+0091C) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char । (U+00964) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ञ (U+0091E) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char क (U+00915) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char म (U+0092E) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char र (U+00930) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ऽ (U+0093D) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char भ (U+0092D) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ॥ (U+00965) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ६ (U+0096C) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char २ (U+00968) in font 'LMSans10-Regular' with id 1: missing fonts > checking > char ṁ (U+01E41) in font 'LMSans10-Regular' with id 1: missing backend > xmp > using file '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 close source > level 2, order 3, name './t.tex' close source > level 1, order 3, name 'cont-yes.mkiv' mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.004 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 10 found files, scanned paths: <none> mkiv lua stats > stored bytecode data: 468 modules (0.268 sec), 93 tables (0.016 sec), 561 chunks (0.284 sec) mkiv lua stats > traced context: maxstack: 1416, freed: 0, unreachable: 1416 mkiv lua stats > cleaned up reserved nodes: 57 nodes, 9 lists of 442 mkiv lua stats > node memory usage: 6 attribute, 3 attribute_list, 1 glue, 51 glue_spec, 3 kern, 2 penalty, 2 temp, 2 whatsit mkiv lua stats > node list callback tasks: 8 unique task lists, 7 instances (re)created, 43 calls mkiv lua stats > used backend: lmtx version 0.10, pdf (backend for directly generating pdf output) mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: internal: 114, file: 155, direct: 2, late: 0, function 1045, total: 1316 mkiv lua stats > randomizer: resumed with value 0.82539481794329 mkiv lua stats > result saved in file: t.pdf, compresslevel 3, objectcompresslevel 1 mkiv lua stats > loaded patterns: en::1, load time: 0.000 mkiv lua stats > loaded fonts: 1 files: lmsans10-regular.otf mkiv lua stats > font engine: otf 3.111, afm 1.513, tfm 1.000, 4 instances, 3 shared in backend, 1 common vectors, 2 common hashes, load time 0.040 seconds mkiv lua stats > font embedding time: 0.003 seconds, 1 fonts mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luametatex version: 2.0502, functionality level: 20200413, format id: 493, compiler: gcc mkiv lua stats > control sequences: 45484 of 65536 + 100000 mkiv lua stats > lua properties: engine: lua 5.4, used memory: 33 MB, ctx: 31 MB, max: 46 MB, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 0.473 seconds, 1 processed pages, 1 shipped pages, 2.114 pages/second system | total runtime: 0.483 seconds of 0.540 seconds Btw, is this http://www.h2o-boeken.nl/product/fonts-in-context/ still relevant in regard to fonts-stuff or I should contact some other docs to learn?
Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- Bewildered by the modes of material nature, the ignorant fully engage themselves in material activities and become attached. But the wise should not unsettle them, although these duties are inferior due to the performers' lack of knowledge.
On 4/21/20 5:35 PM, Saša Janiška wrote:
[...] ...but although I've installed all the google-noto-serif-devanagari-fonts available for Fedora, it still does not work:
You have to update the font cache, since the font isn’t found, according to the following message:
selectfont > the requested fallback font 'Noto Sans Devanagari' for typeface 'mainface' style 'ss' was ignored because no files where found. selectfont > the requested font 'Noto Sans' has no files for the 'tf' alternative, Latin Modern is used instead.
The easiest way to achieve that is: 1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/". 2. Run "mtxrun --generate". 3. Run "context t.tex" Now the glyphs should be there. I hope it helps, Pablo -- http://www.ousia.tk
On Tue, 21 Apr 2020 17:58:05 +0200
Pablo Rodriguez
The easiest way to achieve that is:
1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/". 2. Run "mtxrun --generate". 3. Run "context t.tex"
Now the glyphs should be there.
That didn't work either - same symptom as before. :-( Sincerely, Gour -- Even if you are considered to be the most sinful of all sinners, when you are situated in the boat of transcendental knowledge you will be able to cross over the ocean of miseries.
Saša Janiška schrieb am 21.04.2020 um 17:35:
On Tue, 21 Apr 2020 15:32:24 +0200 Wolfgang Schuster
wrote: Hello Wolfgang,
thank you very much for prompt reply!
You have to set a font which has the required glyphs but you can also use different fonts for both scripts and combine them.
I understand that the font was not set... tried with your example...
\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two]
\definefontfamily [mainface] [ss] [Noto Sans]
\setupbodyfont[mainface]
\starttext
ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥
dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate
\stoptext
...but although I've installed all the google-noto-serif-devanagari-fonts available for Fedora, it still does not work:
ConTeXt doesn't use system fonts on Linux by default but you have to set them yourself, the following should also work on Fedora https://wiki.contextgarden.net/Ubuntu#With_ConTeXt_Standalone_.E2.80.93_shou... Wolfgang
On Tue, 21 Apr 2020 18:27:22 +0200
Wolfgang Schuster
ConTeXt doesn't use system fonts on Linux by default but you have to set them yourself, the following should also work on Fedora
Thank you. Is there some documented procedure which does work with LMTX? Sincerely, Gour -- He who is satisfied with gain which comes of its own accord, who is free from duality and does not envy, who is steady in both success and failure, is never entangled, although performing actions.
On 4/21/20 9:32 PM, Saša Janiška wrote:
On Tue, 21 Apr 2020 18:27:22 +0200 Wolfgang Schuster wrote:
ConTeXt doesn't use system fonts on Linux by default but you have to set them yourself, the following should also work on Fedora
Thank you. Is there some documented procedure which does work with LMTX?
Didn’t it work for you in Fedora? This works for me with LMTX in Fedora. Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log out and log in) and repeat the three other steps from my previous message. This should work for you (provided that you installed the fonts in any of the directories added to OSFONTDIR. I hope it helps, Pablo PS: you can also avoid adding anything to ~/.bashrc by adding soft symlinks for each font to tex/texmf-fonts/. But you have to add the links to each font file, not to any directory (for some strange reason, this doesn’t work in Fedora [at least, for me]). -- http://www.ousia.tk
On Tue, 21 Apr 2020 23:07:48 +0200
Pablo Rodriguez
This works for me with LMTX in Fedora.
Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log out and log in)
I'm using fish shell, but here is my env: $ env | grep OSFONTDIR OSFONTDIR=/home/gour/.fonts/ /usr/share/fonts/ Now I changed local one to ~/.local/share/fonts, but it is empty and my fonts are in: $ fc-cache -v | grep google-noto /usr/share/fonts/google-noto /usr/share/fonts/google-noto-cjk /usr/share/fonts/google-noto-emoji /usr/share/fonts/google-noto-vf /usr/share/fonts/google-noto: skipping, existing cache is valid: 76 fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji: skipping, existing cache is valid: 1 fonts, 0 dirs /usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146 fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory detected /usr/share/fonts/google-noto-cjk: skipping, looped directory detected /usr/share/fonts/google-noto-emoji: skipping, looped directory detected /usr/share/fonts/google-noto-vf: skipping, looped directory detected /usr/share/fonts/google-noto /usr/share/fonts/google-noto-cjk /usr/share/fonts/google-noto-emoji /usr/share/fonts/google-noto-vf /usr/share/fonts/google-noto: skipping, existing cache is valid: 76 fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji: skipping, existing cache is valid: 1 fonts, 0 dirs /usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146 fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory detected /usr/share/fonts/google-noto-cjk: skipping, looped directory detected /usr/share/fonts/google-noto-emoji: skipping, looped directory detected /usr/share/fonts/google-noto-vf: skipping, looped directory detected
and repeat the three other steps from my previous message.
Here they are:
1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/".
$ rm -rf /home/gour/opt/lmtx/tex/texmf-cache/luatex-cache
2. Run "mtxrun --generate".
$ mtxrun --generate resolvers | resolving | variable 'SELFAUTOLOC' set to '/home/gour/opt/lmtx/bin' resolvers | resolving | variable 'SELFAUTODIR' set to '/home/gour/opt/lmtx' resolvers | resolving | variable 'SELFAUTOPARENT' set to '/home/gour/opt' resolvers | resolving | variable 'TEXMFCNF' set to '' resolvers | resolving | variable 'TEXMF' set to '' resolvers | resolving | variable 'TEXOS' set to 'lmtx' resolvers | resolving | resolvers | resolving | using configuration specification 'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c' resolvers | resolving | resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | resolvers | resolving | warning: no lua configuration files found resolvers | resolving | no texmf paths are defined (using TEXMF) resolvers | resolving | mtxrun | mtxrun | elapsed lua time: 0.019 seconds and I notice that after that /home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/ is empty? My $PATH is: $ env | grep PATH PATH=/home/gour/opt/lmtx/bin:/home/gour/opt/lmtx/tex/texmf-linux-64/bin:/home/gour/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
3. Run "context t.tex"
I use the following t.tex \definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two] \definefontfamily [mainface] [ss] [Noto Sans] \setupbodyfont[mainface] \starttext ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥ dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate \stoptext as sugested by Wofgang, but it fails: $ context t.tex mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' Do I need to setup some other envvar as it is suggested in the link posted by Wolfgang? Sincerely, Gour -- As a blazing fire turns firewood to ashes, O Arjuna, so does the fire of knowledge burn to ashes all reactions to material activities.
Am 22.04.2020 um 07:43 schrieb Saša Janiška
: This works for me with LMTX in Fedora.
Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log out and log in)
I'm using fish shell, but here is my env:
$ env | grep OSFONTDIR OSFONTDIR=/home/gour/.fonts/ /usr/share/fonts/
Can you spot the difference? I don’t know about fish, but I guess even there a space is not a valid path separator. BTW: For me on MacOS Mojave, installing in texmf-fonts is unreliable, while installing in one of the OSFONTDIRs works. Best, Hraban
On Wed, 22 Apr 2020 08:10:10 +0200
Henning Hraban Ramm
OSFONTDIR=/home/gour/.fonts/ /usr/share/fonts/
Can you spot the difference?
Ahh, you are right!
I don’t know about fish, but I guess even there a space is not a valid path separator.
Well, fish shell works a bit differently, but in this case problem is that OSFONTDIR is a variable like PATH... Otherwise: $ set TEST a b c # define TEST envvar as array $ echo $TEST a b c $ echo $TEST[2] # access 2nd member from the array b $ set -e TEST[2] # remove 2nd member from the array $ echo $TEST a c
BTW: For me on MacOS Mojave, installing in texmf-fonts is unreliable, while installing in one of the OSFONTDIRs works.
My problem was that I had luatex engine installed from before and didn't install required (regular) fonts, so after installing google-noto-sans-fonts package everything is fine now. :-) Thanks everyone for all your help! Sincerely, Gour -- Bewildered by the modes of material nature, the ignorant fully engage themselves in material activities and become attached. But the wise should not unsettle them, although these duties are inferior due to the performers' lack of knowledge.
Hello,
** Saša Janiška
On Tue, 21 Apr 2020 23:07:48 +0200 Pablo Rodriguez
wrote:
Hello Pablo,
thank you for your assistance!
This works for me with LMTX in Fedora.
Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log out and log in)
I'm using fish shell, but here is my env:
Do you understand well how your shell work? If you do, it is Ok, but otherwise why do you use such unusual shell? Why not bash or zsh?
$ env | grep OSFONTDIR OSFONTDIR=/home/gour/.fonts/ /usr/share/fonts/
Is it correct output? I'm not a fish user but as bash user I would test 'OSFONTDIR' as following $ echo "'${OSFONTDIR}'" In my shell I get $ echo "'${OSFONTDIR}'" '/usr/share/fonts;/usr/local/share/fonts;/usr/local/opt/texlive/2020/texmf-dist/fonts/truetype;/usr/local/opt/texlive/2020/texmf-dist/fonts/opentype' As you see, its value is semicolon separated paths. Not a SPACE separated list of paths but a SEMICOLON separated. I'm not sure if fish (shell) changes semicolon in a VALUE to a space or you set it without quoting the value. I set OSFONTDIR as (this is for BASH!) OSFONTDIR="/usr/share/fonts;/usr/local/share/fonts" export OSFONTDIR
Now I changed local one to ~/.local/share/fonts, but it is empty and my fonts are in:
$ fc-cache -v | grep google-noto /usr/share/fonts/google-noto /usr/share/fonts/google-noto-cjk /usr/share/fonts/google-noto-emoji /usr/share/fonts/google-noto-vf /usr/share/fonts/google-noto: skipping, existing cache is valid: 76 fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji: skipping, existing cache is valid: 1 fonts, 0 dirs /usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146 fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory detected /usr/share/fonts/google-noto-cjk: skipping, looped directory detected /usr/share/fonts/google-noto-emoji: skipping, looped directory detected /usr/share/fonts/google-noto-vf: skipping, looped directory detected /usr/share/fonts/google-noto /usr/share/fonts/google-noto-cjk /usr/share/fonts/google-noto-emoji /usr/share/fonts/google-noto-vf /usr/share/fonts/google-noto: skipping, existing cache is valid: 76 fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji: skipping, existing cache is valid: 1 fonts, 0 dirs /usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146 fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory detected /usr/share/fonts/google-noto-cjk: skipping, looped directory detected /usr/share/fonts/google-noto-emoji: skipping, looped directory detected /usr/share/fonts/google-noto-vf: skipping, looped directory detected
and repeat the three other steps from my previous message.
Here they are:
1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/".
$ rm -rf /home/gour/opt/lmtx/tex/texmf-cache/luatex-cache
2. Run "mtxrun --generate".
$ mtxrun --generate resolvers | resolving | variable 'SELFAUTOLOC' set to '/home/gour/opt/lmtx/bin' resolvers | resolving | variable 'SELFAUTODIR' set to '/home/gour/opt/lmtx' resolvers | resolving | variable 'SELFAUTOPARENT' set to '/home/gour/opt' resolvers | resolving | variable 'TEXMFCNF' set to '' resolvers | resolving | variable 'TEXMF' set to '' resolvers | resolving | variable 'TEXOS' set to 'lmtx' resolvers | resolving | resolvers | resolving | using configuration specification 'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c' resolvers | resolving | resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | resolvers | resolving | warning: no lua configuration files found resolvers | resolving | no texmf paths are defined (using TEXMF) resolvers | resolving | mtxrun | mtxrun | elapsed lua time: 0.019 seconds
You have a problem here (aside from broken formatting). The 'mtxrun' didn't find necessary files, take a look on last part of output. I have installed LMTX (Luametatex) into /usr/local/opt/lmtx as root and /usr/local/opt/lmtx/tex/texmf-cache is owned by root. If I delete the "root" cache and "user" cache and run 'mtxrun --generate' as root at first I see at bottom of 'mtxrun' output: system | lua | compiling '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' system | lua | dumping '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' stripped resolvers | caching | 'files' compiled to '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' mtxrun | mtxrun | elapsed lua time: 0.050 seconds and then 'mtxrun --generate' as an user: system | lua | compiling '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' system | lua | dumping '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' stripped resolvers | caching | 'files' compiled to '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' mtxrun | mtxrun | elapsed lua time: 0.052 seconds (don't bother by cache path I configured it being like that). So at first you have to be sure that 'mtxrun --generate' has done its work right.
and I notice that after that
/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/ is empty?
That's wrong. The following will of course fail.
My $PATH is:
$ env | grep PATH PATH=/home/gour/opt/lmtx/bin:/home/gour/opt/lmtx/tex/texmf-linux-64/bin:/home/gour/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
3. Run "context t.tex"
I use the following t.tex
\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two]
\definefontfamily [mainface] [ss] [Noto Sans]
\setupbodyfont[mainface]
\starttext
ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥
dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate
\stoptext
as sugested by Wofgang, but it fails:
$ context t.tex mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'
Do I need to setup some other envvar as it is suggested in the link posted by Wolfgang?
Sincerely, Gour
I would suggest you to reinstall lmtx, update PATH, correctly set OSFONTDIR variable and in fresh shell session run 'mtxrun --generate' again. --- WBR, Vladimir Lomov -- The problem that we thought was a problem was, indeed, a problem, but not the problem we thought was the problem. -- Mike Smith
On Wed, 22 Apr 2020 16:01:16 +0800
Vladimir Lomov
Do you understand well how your shell work? If you do, it is Ok
Actually, the problem was that OSFONTDIR is like a $PATH variable, so I reset it as: set -g -x OSFONTDIR "/home/gour/.local/share/fonts:/usr/share/fonts"
but otherwise why do you use such unusual shell? Why not bash or zsh?
Because it's Friendly Interactive SHell requring minimum setup and providing almost the same features as e.g. zsh, even more. Take a look: https://fishshell.com/
As you see, its value is semicolon separated paths.
Yes, that was my mistake. :-(
You have a problem here (aside from broken formatting). The 'mtxrun' didn't find necessary files, take a look on last part of output.
Clash with texlive's luatex engine installed before... Thank you for taking time. ;) Sincerely, Gour -- A person who has given up all desires for sense gratification, who lives free from desires, who has given up all sense of proprietorship and is devoid of false ego — he alone can attain real peace.
Am 21.04.2020 um 15:32 schrieb Wolfgang Schuster
: You have to set a font which has the required glyphs but you can also use different fonts for both scripts and combine them.
\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two]
Does that mean that indic scripts/languages are now fully supported? (Or maybe just scripts, not languages? Do Hindi or Urdu need hyphenation patterns?) I remember this was an open issue. Best, Hraban
On Wed, Apr 22, 2020 at 08:16:32AM +0200, Henning Hraban Ramm wrote:
Does that mean that indic scripts/languages are now fully supported? (Or maybe just scripts, not languages?
Devanagari support was added a while ago. The layout engine was according to reports working for at least one other Indic script (Bengali, I think), but not for others (Oriya? Can’t remember). I wouldn’t expect a renderer for Devanagari to do a very good job on Tamil or Malayalam, for example.
Do Hindi or Urdu need hyphenation patterns?)
Hindi uses hyphenation, Urdu doesn’t. We have patterns for Hindi in TeX-Hyphen: https://github.com/hyphenation/tex-hyphen/tree/master/hyph-utf8/tex/generic/... Best, Arthur
Am 22.04.2020 um 11:49 schrieb Arthur Reutenauer
: On Wed, Apr 22, 2020 at 08:16:32AM +0200, Henning Hraban Ramm wrote:
Does that mean that indic scripts/languages are now fully supported? (Or maybe just scripts, not languages?
Devanagari support was added a while ago. The layout engine was according to reports working for at least one other Indic script (Bengali, I think), but not for others (Oriya? Can’t remember). I wouldn’t expect a renderer for Devanagari to do a very good job on Tamil or Malayalam, for example.
Do Hindi or Urdu need hyphenation patterns?)
Hindi uses hyphenation, Urdu doesn’t. We have patterns for Hindi in TeX-Hyphen: https://github.com/hyphenation/tex-hyphen/tree/master/hyph-utf8/tex/generic/...
Thank you! In scripts/context/lua/mtx-patterns.lua Hindi and several other languages are commented, what does that mean? Best, Hraban
On 4/22/2020 8:16 AM, Henning Hraban Ramm wrote:
Am 21.04.2020 um 15:32 schrieb Wolfgang Schuster
: You have to set a font which has the required glyphs but you can also use different fonts for both scripts and combine them.
\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two]
Does that mean that indic scripts/languages are now fully supported? (Or maybe just scripts, not languages? Do Hindi or Urdu need hyphenation patterns?) I remember this was an open issue.
I'm not sure what you mean. Devanagari is the main category that determines the kind of processing. Different languages have different details. So, already for many years there is support for a bunch of these languages and some time ago a few more were added. This is something that Kai Eigner and I work ok occasionally and Kai did most of the logic, looking at what uniscribe does. He does high quality typesetting jobs so you can bet that it works (or worked) for the scripts/language combinations that he's familiar with. 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 -----------------------------------------------------------------
Am 22.04.2020 um 15:19 schrieb Hans Hagen
: On 4/22/2020 8:16 AM, Henning Hraban Ramm wrote:
Am 21.04.2020 um 15:32 schrieb Wolfgang Schuster
: You have to set a font which has the required glyphs but you can also use different fonts for both scripts and combine them.
\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two] Does that mean that indic scripts/languages are now fully supported? (Or maybe just scripts, not languages? Do Hindi or Urdu need hyphenation patterns?) I remember this was an open issue. I'm not sure what you mean. Devanagari is the main category that determines the kind of processing. Different languages have different details. So, already for many years there is support for a bunch of these languages and some time ago a few more were added.
This is something that Kai Eigner and I work ok occasionally and Kai did most of the logic, looking at what uniscribe does. He does high quality typesetting jobs so you can bet that it works (or worked) for the scripts/language combinations that he's familiar with.
Thank you, also Arthur! Sometimes I have leftovers of MkII (or the MkII to IV transition) on my mind, like there are in the wiki. So I can gladly remove all hints to ConTeXt limitations WRT indic scripts/languages. Is there a list of supported languages in the sources? I checked only hyphenation patters some time ago. Best, Hraban
participants (7)
-
Arthur Reutenauer
-
Hans Hagen
-
Henning Hraban Ramm
-
Pablo Rodriguez
-
Saša Janiška
-
Vladimir Lomov
-
Wolfgang Schuster