Two newbie questions about Texfont
Now that I finally have Context running I'm trying to install a number of type1 fonts. I've read the Texfont manual, but I couldn't find answers to these questions: 1. Can Texfont recursively process a font tree? I have a directory font tree like this: c:\fonts\type1\font-family1 c:\fonts\type1\font-family2 c:\fonts\type1\font-family3 each font-family subdirectory has a number of .afm files. If I set --sourcepath to c:\fonts\type1 can Texfont recurse all the subdirectories of the font families and locate and process the .afm files? 2. Can Texfont handle .afm files with extensions in uppercase? Most of my type1 font files are in uppercase like: XYZ_____.AFM I can only get Texfont to process these files if I first rename them to lowercase, like XYZ_____.AFM Thanks, Harrie.
Harrie Frericks wrote:
Now that I finally have Context running I'm trying to install a number of type1 fonts. I've read the Texfont manual, but I couldn't find answers to these questions: 1. Can Texfont recursively process a font tree?
I have a directory font tree like this:
c:\fonts\type1\font-family1 c:\fonts\type1\font-family2 c:\fonts\type1\font-family3
each font-family subdirectory has a number of .afm files. If I set --sourcepath to c:\fonts\type1 can Texfont recurse all the subdirectories of the font families and locate and process the .afm files?
2. Can Texfont handle .afm files with extensions in uppercase?
Most of my type1 font files are in uppercase like: XYZ_____.AFM I can only get Texfont to process these files if I first rename them to lowercase, like XYZ_____.AFM
since you're new to context you can consider skipping pdftex and moving on to either xetex or luatex (which uses context mkiv) for luatex/mkiv you don't need to mess around with fonts as this combo directly handles afm/pfb files so there is no need for creating tfm metrics Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks, Hans, I will look into that.
Harrie
On Tue, Jul 14, 2009 at 8:13 PM, Hans Hagen
Harrie Frericks wrote:
Now that I finally have Context running I'm trying to install a number of type1 fonts. I've read the Texfont manual, but I couldn't find answers to these questions: 1. Can Texfont recursively process a font tree?
I have a directory font tree like this:
c:\fonts\type1\font-family1 c:\fonts\type1\font-family2 c:\fonts\type1\font-family3
each font-family subdirectory has a number of .afm files. If I set --sourcepath to c:\fonts\type1 can Texfont recurse all the subdirectories of the font families and locate and process the .afm files?
2. Can Texfont handle .afm files with extensions in uppercase?
Most of my type1 font files are in uppercase like: XYZ_____.AFM I can only get Texfont to process these files if I first rename them to lowercase, like XYZ_____.AFM
since you're new to context you can consider skipping pdftex and moving on to either xetex or luatex (which uses context mkiv)
for luatex/mkiv you don't need to mess around with fonts as this combo directly handles afm/pfb files so there is no need for creating tfm metrics
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
___________________________________________________________________________________ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
I've been looking into luatex and got it running now. However, i'm not sure
how to link a font that I want to use in my ConText documents to an actual
font file on my disk. For example, I have tried:
\definebodyfont[12pt][rm][
tf="c:\fonts\ITC Stone Serif\SR______.AFM"
]
It doesn't work, so I guess this approach is both naive and optimistic.
I also read the manual "Texfont explained" for clues, but that didn't help
either.
Could someone show me how to use type1 font files with Luatex without having
to go the TexFont route.
Thanks, Harrie.
On Tue, Jul 14, 2009 at 8:13 PM, Hans Hagen
Harrie Frericks wrote:
Now that I finally have Context running I'm trying to install a number of type1 fonts. I've read the Texfont manual, but I couldn't find answers to these questions: 1. Can Texfont recursively process a font tree?
I have a directory font tree like this:
c:\fonts\type1\font-family1 c:\fonts\type1\font-family2 c:\fonts\type1\font-family3
each font-family subdirectory has a number of .afm files. If I set --sourcepath to c:\fonts\type1 can Texfont recurse all the subdirectories of the font families and locate and process the .afm files?
2. Can Texfont handle .afm files with extensions in uppercase?
Most of my type1 font files are in uppercase like: XYZ_____.AFM I can only get Texfont to process these files if I first rename them to lowercase, like XYZ_____.AFM
since you're new to context you can consider skipping pdftex and moving on to either xetex or luatex (which uses context mkiv)
for luatex/mkiv you don't need to mess around with fonts as this combo directly handles afm/pfb files so there is no need for creating tfm metrics
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
___________________________________________________________________________________ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
Harrie Frericks wrote:
I've been looking into luatex and got it running now. However, i'm not sure how to link a font that I want to use in my ConText documents to an actual font file on my disk. For example, I have tried:
\definebodyfont[12pt][rm][ tf="c:\fonts\ITC Stone Serif\SR______.AFM" ]
1. get rid of the funny names, so copy it to sr.afm (and also the pfb file) 2. put the files in your tex tree (texmf-fonts/fonts/afm/... and /type1/...) and run luatools --generate 3. then try: \definedfont[sr at 12pt] test and see if you get the font if that works, then take a look at the type-otf files to see how to define typescripts most of the font manuals can be skipped when using luatex/mkiv Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 17.07.2009 um 11:11 schrieb Harrie Frericks:
Could someone show me how to use type1 font files with Luatex without having to go the TexFont route.
When you placed your fonts in the TeX directory (afm plus pfb files) regenerate the file database with 'context --generate' to let ConTeXt know about the new files. To see what the real names of the fonts is you can show the complete list on the terminal with 'mtxrun --script fonts --list', you can narrow down the list with names when you use a search pattern what could e in your case something like 'mtxrun --script fonts --list --pattern=*stone*' When you're font is not listed in the output from mtxrun update also the font database with the command 'mtxrun --script font --regenrate'. To use the fonts in your document you can write a typescript for them by hand [1] or use the simplefonts module which offers a simpler method and does the hard work itself hidden for the user. [1] http://wiki.contextgarden.net/Fonts_in_LuaTex Wolfgang
On Fri, Jul 17, 2009 at 11:53 AM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 17.07.2009 um 11:11 schrieb Harrie Frericks:
Could someone show me how to use type1 font files with Luatex without
having to go the TexFont route.
When you placed your fonts in the TeX directory (afm plus pfb files) regenerate the file database with 'context --generate' to let ConTeXt know about the new files.
A question : isn't afm inside pfb ? -- luigi
On Fri, Jul 17, 2009 at 12:17 PM, Taco Hoekwater
luigi scarso wrote:
A question : isn't afm inside pfb ?
No (which is a bit annoying, and explains the existence of .pfm files)
ah ok, sorry, I was confused by this (on font-forge mailling list):
1) import widths from .afm file not working
Widths are not imported from afm files. Why should they be? Glyph widths are in the pfa/pfb files and those are correct. Importing them from afm files can just introduce errors.
-- luigi
ah ok, sorry, I was confused by this (on font-forge mailling list):
1) import widths from .afm file not working
Widths are not imported from afm files. Why should they be? Glyph widths are in the pfa/pfb files and those are correct. Importing them from afm files can just introduce errors.
Some metric information is indeed already present in pfa / pfb files, but not all of it (ligatures, kerning...) Arthur
Thanks, Wolfgang, that was another step in the right direction. Could you help me with the next step? This is what I did so far. (N.B. I'm not interested in TeX's standard fonts. I want to use my own type1 and otf fonts which are in c:\fonts). 1. I set OSFONTDIR to c:\fonts 2. I ran mtxrun --script font --reload That was succesfull. Mtxrun recursed the entire font directory tree. 3. I ran mtxrun --script fonts --list --pattern=*stone*. I got about twenty lines of output in three columns. Here is an example: stonesans StoneSans c:/fonts/ITC Stone Sans/SS______.AFM So far, so good. Now, I want to use this font and you included a link to a Wiki article. This article says I have to use a typescript. The example typescript from the Wiki uses the \definetypeface command. I searched everywhere for a good description of this command, but wasn't able to find one, unfortunately. Using the example from the Wiki: \definetypeface [Bonum] [rm] [serif] [bonum] [default] how would I use this command to be able to use my Stone Sans font from the mtxrun output? In the [Bonum] example I can't find a reference to a font file of the type c:\fonts\etc..... Any help would be greatly appreciated. Thanks, Harrie. On Fri, Jul 17, 2009 at 11:53 AM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 17.07.2009 um 11:11 schrieb Harrie Frericks:
Could someone show me how to use type1 font files with Luatex without
having to go the TexFont route.
When you placed your fonts in the TeX directory (afm plus pfb files) regenerate the file database with 'context --generate' to let ConTeXt know about the new files.
To see what the real names of the fonts is you can show the complete list on the terminal with 'mtxrun --script fonts --list', you can narrow down the list with names when you use a search pattern what could e in your case something like 'mtxrun --script fonts --list --pattern=*stone*'
When you're font is not listed in the output from mtxrun update also the font database with the command 'mtxrun --script font --regenrate'.
To use the fonts in your document you can write a typescript for them by hand [1] or use the simplefonts module which offers a simpler method and does the hard work itself hidden for the user.
[1] http://wiki.contextgarden.net/Fonts_in_LuaTex
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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
Am 17.07.2009 um 14:34 schrieb Harrie Frericks:
3. I ran mtxrun --script fonts --list --pattern=*stone*. I got about twenty lines of output in three columns. Here is an example:
stonesans StoneSans c:/fonts/ITC Stone Sans/SS______.AFM
So far, so good. Now, I want to use this font and you included a link to a Wiki article. This article says I have to use a typescript. The example typescript from the Wiki uses the \definetypeface command. I searched everywhere for a good description of this command, but wasn't able to find one, unfortunately. Using the example from the Wiki:
\definetypeface [Bonum] [rm] [serif] [bonum] [default]
how would I use this command to be able to use my Stone Sans font from the mtxrun output? In the [Bonum] example I can't find a reference to a font file of the type c:\fonts\etc.....
The \definetypeface command alone is not enough, you have to tell ConTeXt which of the fonts should be used for the upright, italic, bold etc. style. You can find such a example at the end of the page -> http://wiki.contextgarden.net/Fonts_in_LuaTex#Example It's a good exercise to write a complete typescripts once by hand but when you want a simpler way to use font with LuaTeX you can use the simplefonts module, it hides the complete typescript mechanism from the user and you have to know only a few commands, the following code should be enough to use your font in a document. \usemodule[simplefonts] % make sure the module is available on your system \setmainfont[StoneSans] % create a typescript for 'StoneSans' and enable the font \starttext This is a dummy text which is hopefully typeset with the StoneSans font, you could also switch the style to {\it italic}, {\bf bold} or {\bi bolditalic}. \stoptext Wolfgang
participants (6)
-
Arthur Reutenauer
-
Hans Hagen
-
Harrie Frericks
-
luigi scarso
-
Taco Hoekwater
-
Wolfgang Schuster