installing a true-type font: can't find ttf2afm
Hi all, I'm following the instructions at http://wiki.contextgarden.net/Installing_a_TrueType_font,_step_by_step because I want to install a TTF (Gentium in fact) for ConTeXt to use. There is a warning that these instructions may be out of date, but I haven't found anything newer. This is under TeX Live 2013, the context scheme, and I've been using ConTeXt mkiv. I found texfont.pl, though it wasn't in the path, and managed to run it in the directory where I have my .ttf files: $ sudo PATH=$PATH /usr/local/texlive/2013/texmf-dist/scripts/context/perl/texfont.pl --ve=sil --co=gentium --makepath --install But then I get errors about ttf2afm: TeXFont 2.2.1 - ConTeXt / PRAGMA ADE 2000-2004 mktexlsr: Updating /usr/local/texlive/2013/../texmf-local/ls-R... mktexlsr: Done. encoding vector : texnansi vendor name : sil source path : . font collection : gentium texmf font root : /usr/local/texlive/2013/../texmf-local map file name : texnansi-sil-gentium.map source path : . processing files : all on afm path locating afm files : using pattern ./*.afm locating afm files : using ttf files generating afm file : ./GentiumPlus-I.afm sh: ttf2afm: command not found generating afm file : ./GentiumPlus-R.afm sh: ttf2afm: command not found copying files : afm copying files : pfb copying files : ttf copying : GentiumPlus-I.ttf copying : GentiumPlus-R.ttf processing aborted : no afm files found --help : show some more info I can't find ttf2afm anywhere. Is it part of pdfTex? Do I have to have the pdftex scheme installed in order to install True-type fonts? Thanks, Lars
On Mon, Nov 4, 2013 at 8:55 PM, Lars Huttar wrote:
Hi all, I'm following the instructions at http://wiki.contextgarden.net/Installing_a_TrueType_font,_step_by_step because I want to install a TTF (Gentium in fact) for ConTeXt to use.
Please note that: - the top of the page says "NOTE: The contents of this page are OLD /.../" - nobody in the ConTeXt community bothers about MKII (pdfTeX) any longer - texfont.pl has always been a bit problematic and is definitely not really maintained any longer - you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in TeX Live and in the ConTeXt distribution) - Gentium works out-of-the-box in ConTeXt (see the documentation of gentium-tug)
This is under TeX Live 2013, the context scheme, and I've been using ConTeXt mkiv.
So why bother about pdfTeX? The "conversion" is/was only ever needed for MKII. In MKIV all fonts work out of the box. Other than what the package provides, Wolfgang Schuster's new additions (is there any link to point the users to?) make that even easier for users. It's probably easiest to use the package now, but even if the package wasn't provided, setting up the font in MKIV is relatively straightforward without the need for any conversions of any kind.
I can't find ttf2afm anywhere. Is it part of pdfTex? Do I have to have the pdftex scheme installed in order to install True-type fonts?
It's part of ttfutils, collection-fontutils. You cannot install an additional scheme in TeX Live (or at least I think so, I'm not 100% sure), but you can install an additional package or collection. But really ... you don't need that program just for the sake of using Gentium. Mojca
On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
- you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in TeX Live and in the ConTeXt distribution)
Thank you ... that was key information I didn't have. I was instead downloading the TTF files from sil.org.
- Gentium works out-of-the-box in ConTeXt (see the documentation of gentium-tug)
When you say "out of the box", I think you're referring to the gentium-tug package box, not the ConTeXt box... in other words, I should not expect Gentium to work just because I installed ConTeXt; I have to also install gentium-tug, right? If not, I must be doing something wrong because I can't find Gentium in the luatex-cache font database.
This is under TeX Live 2013, the context scheme, and I've been using ConTeXt mkiv. So why bother about pdfTeX?
Only because the latest instructions I could find said to use texfont, which uses ttf2afm, which was missing and I thought it might come from pdfTeX. I'm glad to know I don't have to, and I'll update that wiki page accordingly. Thanks again, Lars
On 11/4/2013 10:46 PM, Lars Huttar wrote:
On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
- you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in TeX Live and in the ConTeXt distribution)
Thank you ... that was key information I didn't have. I was instead downloading the TTF files from sil.org.
- Gentium works out-of-the-box in ConTeXt (see the documentation of gentium-tug)
When you say "out of the box", I think you're referring to the gentium-tug package box, not the ConTeXt box... in other words, I should not expect Gentium to work just because I installed ConTeXt; I have to also install gentium-tug, right? If not, I must be doing something wrong because I can't find Gentium in the luatex-cache font database.
Did you run (file database) mtxrun --generate normally the font database is regenerated automatically when needed.
This is under TeX Live 2013, the context scheme, and I've been using ConTeXt mkiv. So why bother about pdfTeX?
Only because the latest instructions I could find said to use texfont, which uses ttf2afm, which was missing and I thought it might come from pdfTeX. I'm glad to know I don't have to, and I'll update that wiki page accordingly.
It was (is?) part of the pdftex suite because pdftex can embed a ttf font even if type-1 variant afm/tfm files are used. The main purpose of texfont was to make type 1 fonts ready for tex (by generating tfm files). In the meantime the lm/gust project provide the files needed for the most relevant fonts, but for other (like commercial) fonts you still need to generate tfm's of course. Anyhow, as Mojca pointed out: there is no need for this in mkiv (luatex). One can still use type one fonts or course but nothing special is needed for that as context will treat them as wide fonts. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, Nov 4, 2013 at 10:46 PM, Lars Huttar wrote:
On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
- you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in TeX Live and in the ConTeXt distribution)
Thank you ... that was key information I didn't have. I was instead downloading the TTF files from sil.org.
That TTF should work as well. The only difference is that you might need slightly different commands to set it up (there were recent changes/improvements in that, other users should tell you how exactly that can be done).
When you say "out of the box", I think you're referring to the gentium-tug package box, not the ConTeXt box... in other words, I should not expect Gentium to work just because I installed ConTeXt; I have to also install gentium-tug, right?
The font is installed by default when installing the ConTeXt distribution. I thought it was also installed by default with the ConTeXt scheme in TeX Live, but apparently I was wrong. I can fix this. The scheme already contains a bunch of nice fonts and Gentium could/probably should be among them. Mojca
Am 04.11.2013 um 22:56 schrieb Mojca Miklavec
On Mon, Nov 4, 2013 at 10:46 PM, Lars Huttar wrote:
On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
- you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in TeX Live and in the ConTeXt distribution)
Thank you ... that was key information I didn't have. I was instead downloading the TTF files from sil.org.
That TTF should work as well. The only difference is that you might need slightly different commands to set it up (there were recent changes/improvements in that, other users should tell you how exactly that can be done).
Make your choice: \definefontfamily [gentium-basic] [serif] [Gentium Basic] \definefontfamily [gentium-book] [serif] [Gentium Book Basic] \definefontfamily [gentium-plus] [serif] [Gentium Plus] \starttext {\switchtobodyfont[gentium-basic]Upright \it Italic \bf Bold \bi BoldItalic} {\switchtobodyfont[gentium-book]Upright \it Italic \bf Bold \bi BoldItalic} {\switchtobodyfont[gentium-plus]Upright \it Italic \bf Bold \bi BoldItalic} \stoptext Wolfgang
On 11/4/2013 5:32 PM, Wolfgang Schuster wrote:
Am 04.11.2013 um 22:56 schrieb Mojca Miklavec
: That TTF should work as well. The only difference is that you might need slightly different commands to set it up (there were recent changes/improvements in that, other users should tell you how exactly that can be done).
Make your choice:
\definefontfamily [gentium-basic] [serif] [Gentium Basic] \definefontfamily [gentium-book] [serif] [Gentium Book Basic] \definefontfamily [gentium-plus] [serif] [Gentium Plus]
\starttext
{\switchtobodyfont[gentium-basic]Upright \it Italic \bf Bold \bi BoldItalic}
{\switchtobodyfont[gentium-book]Upright \it Italic \bf Bold \bi BoldItalic}
{\switchtobodyfont[gentium-plus]Upright \it Italic \bf Bold \bi BoldItalic}
\stoptext
Thanks for the suggestion. I don't know if I'm doing something wrong, but when I try to compile the above with mkiv, I get "Undefined control sequence" on line 1: l.1 \definefontfamily [gentium-basic] [serif] [Gentium Basic] ConTeXt ver: 2013.05.28 00:36 MKIV current fmt: 2013.10.11 int: english/english Nor can I find \definefontfamily in the ref man or on the wiki. Regards, Lars
On Tue, Nov 5, 2013 at 5:08 PM, Lars Huttar wrote:
On 11/4/2013 5:32 PM, Wolfgang Schuster wrote:
Am 04.11.2013 um 22:56 schrieb Mojca Miklavec:
That TTF should work as well. The only difference is that you might need slightly different commands to set it up (there were recent changes/improvements in that, other users should tell you how exactly that can be done).
Make your choice:
\definefontfamily [gentium-basic] [serif] [Gentium Basic] \definefontfamily [gentium-book] [serif] [Gentium Book Basic] \definefontfamily [gentium-plus] [serif] [Gentium Plus]
\starttext
{\switchtobodyfont[gentium-basic]Upright \it Italic \bf Bold \bi BoldItalic}
{\switchtobodyfont[gentium-book]Upright \it Italic \bf Bold \bi BoldItalic}
{\switchtobodyfont[gentium-plus]Upright \it Italic \bf Bold \bi BoldItalic}
\stoptext
Thanks for the suggestion. I don't know if I'm doing something wrong, but when I try to compile the above with mkiv, I get "Undefined control sequence" on line 1:
l.1 \definefontfamily
As I told you: "there were recent changes/improvements in that". http://www.ntg.nl/pipermail/ntg-context/2013/075428.html You would need the ConTeXt distribution for that, TeX Live 2013 is too old. (You can probably still load the simplefonts module explicitly or write the typescripts yourself - again different syntax.) Mojca
On 11/5/2013 12:05 PM, Mojca Miklavec wrote:
On Tue, Nov 5, 2013 at 5:08 PM, Lars Huttar wrote:
On 11/4/2013 5:32 PM, Wolfgang Schuster wrote:
Make your choice:
\definefontfamily [gentium-basic] [serif] [Gentium Basic] \definefontfamily [gentium-book] [serif] [Gentium Book Basic] \definefontfamily [gentium-plus] [serif] [Gentium Plus]
\starttext
{\switchtobodyfont[gentium-basic]Upright \it Italic \bf Bold \bi BoldItalic}
{\switchtobodyfont[gentium-book]Upright \it Italic \bf Bold \bi BoldItalic}
{\switchtobodyfont[gentium-plus]Upright \it Italic \bf Bold \bi BoldItalic}
\stoptext
Thanks for the suggestion. I don't know if I'm doing something wrong, but when I try to compile the above with mkiv, I get "Undefined control sequence" on line 1:
l.1 \definefontfamily As I told you: "there were recent changes/improvements in that".
http://www.ntg.nl/pipermail/ntg-context/2013/075428.html
You would need the ConTeXt distribution for that, TeX Live 2013 is too old. (You can probably still load the simplefonts module explicitly or write the typescripts yourself - again different syntax.)
Mojca
Thanks again for your responses. I did try loading the simplefonts module explicitly, but definefontfamily is still undefined. I'm working on a large, production project, and the deadline is too close to risk using unstable releases. Is there a context release since Wolfgang's new version of simplefonts, that has been declared stable? Given that his new version came out less than a month ago, it seems unlikely. Maybe I can get TTFs working using mtxrun, as Hans suggested. It seems to be working on Windows; I need to try the same on Linux with our custom font. Lars
Am 05.11.2013 um 19:25 schrieb Lars Huttar
I did try loading the simplefonts module explicitly, but definefontfamily is still undefined.
The simplefonts module is now part of the context core, to use it you need a recent version (1 month old or less). The commands from the new version are different from the commands in the external module. Wolfgang
On 11/4/2013 4:56 PM, Mojca Miklavec wrote:
On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
- you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in TeX Live and in the ConTeXt distribution) Thank you ... that was key information I didn't have. I was instead downloading the TTF files from sil.org. That TTF should work as well. The only difference is that you might need slightly different commands to set it up (there were recent changes/improvements in that, other users should tell you how exactly
On Mon, Nov 4, 2013 at 10:46 PM, Lars Huttar wrote: that can be done).
I will look for that, because it turns out that I still need to use a TTF font. Gentium Plus does not include bold and bold-italic weights, and Gentium Basic doesn't include all the characters ranges I need. We have a customized version of Gentium Basic with bold weight, with an extra character added, and it's a TTF. We had it working with mkii but not yet with mkiv.
When you say "out of the box", I think you're referring to the gentium-tug package box, not the ConTeXt box... in other words, I should not expect Gentium to work just because I installed ConTeXt; I have to also install gentium-tug, right? The font is installed by default when installing the ConTeXt distribution. I thought it was also installed by default with the ConTeXt scheme in TeX Live, but apparently I was wrong. I can fix this. The scheme already contains a bunch of nice fonts and Gentium could/probably should be among them.
Just to confirm the above: After installing TeX Live context scheme on Linux, Gentium was not in my names.tma. And when I tried to use \setmainfont[Gentium], I got errors, 'simplefonts > font ''gentium'' not found'. After installing the gentium-tug package (sudo /usr/local/bin/tlmgr install gentium-tug), and compiling a .tex file using \setmainfont[Gentium], the errors went away, and my names.tma now includes several variants of Gentium. At no point did I run mtxrun (knowingly). On the other hand, on Windows, I had installed TeX Live context scheme as well, and have not installed gentium-tug. But I did install Gentium as an OS font (using TTF files). I then ran mtxrun --generate (as suggested by Hans), and after that, gentium* showed up in names.tma, and I was then able to successfully compile a .tex file using \setmainfont[Gentium] with mkiv context. (But that didn't work before I ran mtxrun --generate.) Just a couple of data points in case they're relevant. Lars
On 11/5/2013 7:55 PM, Lars Huttar wrote:
On 11/4/2013 4:56 PM, Mojca Miklavec wrote:
On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
- you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in TeX Live and in the ConTeXt distribution) Thank you ... that was key information I didn't have. I was instead downloading the TTF files from sil.org. That TTF should work as well. The only difference is that you might need slightly different commands to set it up (there were recent changes/improvements in that, other users should tell you how exactly
On Mon, Nov 4, 2013 at 10:46 PM, Lars Huttar wrote: that can be done).
I will look for that, because it turns out that I still need to use a TTF font. Gentium Plus does not include bold and bold-italic weights, and Gentium Basic doesn't include all the characters ranges I need. We have a customized version of Gentium Basic with bold weight, with an extra character added, and it's a TTF. We had it working with mkii but not yet with mkiv.
in that case yoiu can put the fonts somewhere and write a typescript .. see type-imp-mscore.mkiv for exmaples ... that way you have complete control over what gets loaded Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Lars Huttar
-
Mojca Miklavec
-
Wolfgang Schuster