Installing fonts in a ConTeXt Docker (texfont tool missing?)
Dear list, currently I work on a customized Docker container based on Ubuntu 16.04 where I run ConTeXt standalone. To install ConTeXt, I use the approach described in the wiki: RUN wget http://minimals.contextgarden.net/setup/first-setup.sh &&\ sh ./first-setup.sh --modules=all After setting ConTeXt root everything works fine and as expected. However, the texfont tool seems to be missing which means I cannot install new fonts in my container. This seems kind of odd to me since I thought texfont is available automatically after ConTeXt is installed. I also tried Henri's Debian-based Dockerfile, but texfont seems to be missing there, too. Any ideas on this? Have I missed something? Many thanks in advance and best wishes, Michelle
On Fri, Apr 13, 2018 at 10:16 AM, Rodzis, Michelle < rodzis@sub.uni-goettingen.de> wrote:
Dear list,
currently I work on a customized Docker container based on Ubuntu 16.04 where I run ConTeXt standalone. To install ConTeXt, I use the approach described in the wiki:
RUN wget http://minimals.contextgarden.net/setup/first-setup.sh &&\ sh ./first-setup.sh --modules=all
After setting ConTeXt root everything works fine and as expected. However, the texfont tool seems to be missing which means I cannot install new fonts in my container. This seems kind of odd to me since I thought texfont is available automatically after ConTeXt is installed.
I also tried Henri's Debian-based Dockerfile, but texfont seems to be missing there, too.
Any ideas on this? Have I missed something?
Many thanks in advance and best wishes, Michelle
hm Are you using (or do you want to use) context mkii ? -- luigi
On Fri, Apr 13, 2018 at 10:48 AM, luigi scarso
On Fri, Apr 13, 2018 at 10:16 AM, Rodzis, Michelle < rodzis@sub.uni-goettingen.de> wrote:
Dear list,
currently I work on a customized Docker container based on Ubuntu 16.04 where I run ConTeXt standalone. To install ConTeXt, I use the approach described in the wiki:
RUN wget http://minimals.contextgarden.net/setup/first-setup.sh &&\ sh ./first-setup.sh --modules=all
After setting ConTeXt root everything works fine and as expected. However, the texfont tool seems to be missing which means I cannot install new fonts in my container. This seems kind of odd to me since I thought texfont is available automatically after ConTeXt is installed.
I also tried Henri's Debian-based Dockerfile, but texfont seems to be missing there, too.
Any ideas on this? Have I missed something?
Many thanks in advance and best wishes, Michelle
hm Are you using (or do you want to use) context mkii ?
texfont is still shipped
as you can see in tex/texmf-context/scripts/context/perl and you can run it with $ mtxrun --script texfont --help Do, for r mkii you need to provide in some way pdftex, perl and ruby (for the scripts under tex/texmf-context/scripts/context/ruby) -- luigi
No, I want to use MKIV.
Best, Michelle
________________________________
Von: ntg-context
No, I want to use MKIV.
On 4/13/2018 11:03 AM, Rodzis, Michelle wrote: then install with first_setup.sh --engine=luatex and you save space too 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 -----------------------------------------------------------------
On 13 April 2018 at 10:16, Rodzis, Michelle wrote:
Dear list,
currently I work on a customized Docker container based on Ubuntu 16.04 where I run ConTeXt standalone. To install ConTeXt, I use the approach described in the wiki:
RUN wget http://minimals.contextgarden.net/setup/first-setup.sh &&\ sh ./first-setup.sh --modules=all
After setting ConTeXt root everything works fine and as expected. However, the texfont tool seems to be missing which means I cannot install new fonts in my container.
Nowadays texfont is the wrong tool to use. It doesn't actually install fonts, it merely converts them from, say, Type 1, to a zillion of 8-bit files (meaning that you won't even be able to use more than a couple accented characters in that font). This was useful before TeX supported OpenType fonts, but is a complete waste of time and resources to go through that painful route nowadays. You can just copy your own OpenType font files to, say, texmf-fonts/data (and probably update the font database after that with mtxrun). Mojca
Dear Mojca,
obviously I have forgotten to add an important detail - the fonts I want to install are TrueType fonts. My bad and apologies!
For installing ttf I've used http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf (also mentioned in wiki) so far, and it worked every time.
Best, Michelle
________________________________
Von: ntg-context
Dear list,
currently I work on a customized Docker container based on Ubuntu 16.04 where I run ConTeXt standalone. To install ConTeXt, I use the approach described in the wiki:
RUN wget http://minimals.contextgarden.net/setup/first-setup.sh &&\ sh ./first-setup.sh --modules=all
After setting ConTeXt root everything works fine and as expected. However, the texfont tool seems to be missing which means I cannot install new fonts in my container.
Nowadays texfont is the wrong tool to use. It doesn't actually install fonts, it merely converts them from, say, Type 1, to a zillion of 8-bit files (meaning that you won't even be able to use more than a couple accented characters in that font). This was useful before TeX supported OpenType fonts, but is a complete waste of time and resources to go through that painful route nowadays. You can just copy your own OpenType font files to, say, texmf-fonts/data (and probably update the font database after that with mtxrun). Mojca ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Dear Michelle, On 13 April 2018 at 11:13, Rodzis, Michelle wrote:
Dear Mojca,
obviously I have forgotten to add an important detail - the fonts I want to install are TrueType fonts. My bad and apologies!
For installing ttf I've used http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf (also mentioned in wiki) so far, and it worked every time.
You can forget that procedure. Just copy the fonts, you'll only need a few lines of code for defining the typescripts (just ask for additional help if you need to get your fonts working). TrueType fonts are supported out of the box and should no longer need that clumsy process. Mojca
After setting ConTeXt root everything works fine and as expected. However, the texfont tool seems to be missing which means I cannot install new fonts in my container. This seems kind of odd to me since I thought texfont is available automatically after ConTeXt is installed.
I also tried Henri's Debian-based Dockerfile, but texfont seems to be missing there, too.
Any ideas on this? Have I missed something?
I don't know texfont, but i'm using ConTeXt inside a (Debian-based) Docker container; i put the fonts directly into the image, like this (this is an excerpt of my Dockerfile): ----------------------------------- ENV OSFONTDIR /usr/share/fonts:/usr/local/share/fonts:/opt/context/tex/texmf/fonts # copy fonts into the system fonts directories COPY fonts/GaramondPremrPro*.otf /usr/share/fonts/opentype/ COPY fonts/MyriadPro*.otf /usr/share/fonts/opentype/ COPY fonts/Quivira.otf /usr/share/fonts/opentype/ COPY fonts/GFSNeohellenic*.otf /usr/share/fonts/opentype/ COPY fonts/FiraSans*.otf /usr/share/fonts/opentype/ COPY fonts/SILEOT*.ttf /usr/share/fonts/truetype/ # a writable cache for ConTeXt, # see http://wiki.contextgarden.net/Custom_Configuration # (i don't know if this part is still needed) RUN mkdir -p /var/cache/context/texmf-cache RUN chmod ugo+rwx /var/cache/context/texmf-cache COPY texmf.cnf /opt/context/texmf.cnf COPY texmf.cnf /opt/context/texmfcnf.lua ENV TEXMFCACHE /var/cache/context/texmf-cache ENV TEXMF /opt/context/tex/texmf-context ENV TEXROOT /opt/context/tex ----------------------------------- The fonts you want to put in the image are in the "fonts" subdir of the Dockerfile directory. For "texmf.cnf" (if it's still needed), see the link in the ConTeXt wiki. Once you build the image and run the container, you find the fonts already installed. At the first run, ConTeXt will store them in its cache. You may write a Dockerfile of a ConTeXt image without fonts, then another Dockerfile of an image based on the first one, where you add the fonts you need for a particular job. In case i had to add some fonts to a running container, i would "docker cp" them inside it, in the system fonts dirs, and then "docker exec" this command in the container: mtxrun --script fonts --reload Hope it helps, best wishes, Massimiliano
On 4/13/2018 11:10 AM, MF wrote:
After setting ConTeXt root everything works fine and as expected. However, the texfont tool seems to be missing which means I cannot install new fonts in my container. This seems kind of odd to me since I thought texfont is available automatically after ConTeXt is installed.
I also tried Henri's Debian-based Dockerfile, but texfont seems to be missing there, too.
Any ideas on this? Have I missed something?
I don't know texfont, but i'm using ConTeXt inside a (Debian-based) Docker container; i put the fonts directly into the image, like this (this is an excerpt of my Dockerfile):
----------------------------------- ENV OSFONTDIR /usr/share/fonts:/usr/local/share/fonts:/opt/context/tex/texmf/fonts # copy fonts into the system fonts directories COPY fonts/GaramondPremrPro*.otf /usr/share/fonts/opentype/ COPY fonts/MyriadPro*.otf /usr/share/fonts/opentype/ COPY fonts/Quivira.otf /usr/share/fonts/opentype/ COPY fonts/GFSNeohellenic*.otf /usr/share/fonts/opentype/ COPY fonts/FiraSans*.otf /usr/share/fonts/opentype/ COPY fonts/SILEOT*.ttf /usr/share/fonts/truetype/
or: <texroot>/texmf-fonts/fonts/data
# a writable cache for ConTeXt, # see http://wiki.contextgarden.net/Custom_Configuration # (i don't know if this part is still needed) RUN mkdir -p /var/cache/context/texmf-cache RUN chmod ugo+rwx /var/cache/context/texmf-cache COPY texmf.cnf /opt/context/texmf.cnf COPY texmf.cnf /opt/context/texmfcnf.lua ENV TEXMFCACHE /var/cache/context/texmf-cache ENV TEXMF /opt/context/tex/texmf-context ENV TEXROOT /opt/context/tex -----------------------------------
The fonts you want to put in the image are in the "fonts" subdir of the Dockerfile directory. For "texmf.cnf" (if it's still needed), see the link in the ConTeXt wiki.
not needed, we use texmfcnf.lua
Once you build the image and run the container, you find the fonts already installed. At the first run, ConTeXt will store them in its cache.
You may write a Dockerfile of a ConTeXt image without fonts, then another Dockerfile of an image based on the first one, where you add the fonts you need for a particular job.
In case i had to add some fonts to a running container, i would "docker cp" them inside it, in the system fonts dirs, and then "docker exec" this command in the container: mtxrun --script fonts --reload
Hope it helps, best wishes, Massimiliano ___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Hans Hagen
-
luigi scarso
-
MF
-
Mojca Miklavec
-
Rodzis, Michelle