Difference between revisions of "Fonts - Old Content"
m (Text replacement - "pragma-ade.com" to "pragma-ade.nl") |
|||
(68 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
− | + | = How to use fonts in ConTeXt = | |
+ | '''The ConTeXt way of handling fonts are [[TypeScripts - Old Content]].''' It’s a system of abstraction and aliases, which may seem “strange” at first for new users of ConTeXt. | ||
+ | * If it fits your needs, consider first to use the former [[Simplefonts - Old Content]] module, now in the core as {{src|font-sel.mkvi}}. | ||
+ | * There is now a [http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf manual chapter on fonts]. | ||
+ | * If you happen to use [[XeTeX - Old Content]] then you can forget almost all the magic and start using your system fonts (see [[Fonts_in_XeTeX - Old Content]]). | ||
+ | * If you want to keep using [[PdfTeX - Old Content]], read on. | ||
+ | |||
+ | = Font support & configuration = | ||
+ | == Type 1 fonts == | ||
+ | |||
+ | Type 1 fonts come in multiple files. The various components are: | ||
+ | |||
+ | * '''.pfb''': "Printer Font, Binary". | ||
+ | * '''.pfa''': "Printer Font, ASCII". | ||
+ | * '''.pfm''': "Printer Font Metrics", binary. | ||
+ | * '''.afm''': "Adobe Font Metrics". | ||
− | + | Typically each font will have a set of outlines in a pfb or pfa file, and a set of metrics in a pfm or afm file. | |
− | + | Which file variations are preferred depends on platform. Linux prefers pfa and afm (the ASCII versions). Windows prefers pfb and pfm (the binary versions). Mac OS X prefers pfm and afm. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | On the Mac, you may encounter old-style PostScript Type 1 fonts which have an extensionless file containing the font outlines. These are a relic from the days when bitmaps were used to display fonts on screen, and the PostScript was downloaded to the printer. Your best bet is to throw them away and get an up-to-date OpenType version, or use a font editing utility such as fontforge to convert them. | |
− | |||
− | |||
− | |||
− | |||
+ | On Windows 7, the OS will identify only the .pfm file as the actual font. However, when you install the font, Windows invisibly locates the matching .pfb file from the same directory, and copies them both to the C:\Windows\Fonts directory. | ||
− | + | * Using [[Psnfss - Old Content]] metrics in ConTeXt | |
− | + | * Matt Gushee's introduction to [http://matt.gushee.net/doc/tex/bookfonts.html virtual fonts Psnfss '''- Old Content'''], especially for getting expert fonts to work. | |
− | * Using [[ | + | * [[URW Garamond - Old Content]] '''NEED UPDATE TO OTF''' |
− | * Matt Gushee's introduction to [http:// | + | * [[Lucida - Old Content]] '''NEED UPDATE TO OTF''': large font family designed by Bigelow & Holmes; suitable e.g. for presentations |
− | * [[URW Garamond]] | + | * [http://dl.contextgarden.net/myway/expertfonts.pdf Installing Expert Fonts: Minion Pro - Old Content] by Idris Samawi Hamid; contains step-by-step instructions, from preinstallation to writing typescripts |
− | * [[Lucida]] : large font family designed by Bigelow & Holmes; suitable e.g. for presentations | + | * [http://www.stormtype.com Storm Type Foundry] : [http://modules.contextgarden.net/stormfontsupport support (Old Content)] of selected fonts |
− | * [http://dl.contextgarden.net/myway/expertfonts.pdf Installing Expert Fonts: Minion Pro] by Idris Samawi Hamid; contains step-by-step instructions, from preinstallation to writing typescripts | ||
− | * [http://www.stormtype.com Storm Type Foundry] : [http://modules.contextgarden.net/stormfontsupport support] of selected fonts | ||
== True Type fonts == | == True Type fonts == | ||
− | * [http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf Integrating TrueType Fonts into ConTeXt] by Thomas A. Schmitz (PracTeX Journal) | + | * [http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf Integrating TrueType Fonts into ConTeXt - Old Content] by Thomas A. Schmitz (PracTeX Journal) |
− | * [[Installing a TrueType font, step by step]]. If you just need to install a TrueType font, this may be what you are looking for. | + | * [[Installing a TrueType font, step by step - Old Content]]. If you just need to install a TrueType font, this may be what you are looking for. |
== OpenType fonts == | == OpenType fonts == | ||
− | * [[ | + | * [[Otfinstall - Old Content|otfinst - a script for using OpenType fonts in ConTeXt]] |
== Basic Hints == | == Basic Hints == | ||
− | How to change to Palatino for text with Euler for math: [[Palatino with Euler for Math]] | + | How to change to Palatino for text with Euler for math: [[Palatino with Euler for Math - Old Content]] |
''Some hints by Taco from the mailing list on 2005-11-20:'' | ''Some hints by Taco from the mailing list on 2005-11-20:'' | ||
− | Q: How up to date or out of date is the information in [http://www.pragma-ade. | + | Q: How up to date or out of date is the information in [http://www.pragma-ade.nl/general/manuals/mfonts.pdf mfonts manual]? |
− | A: It looks like it is still quite up-to-date, but some of the examples it gives may no longer be the very best and latest way of doing things, and possibly there are some new developments that do not get as much attention as desired (like [http://www.pragma-ade. | + | A: It looks like it is still quite up-to-date, but some of the examples it gives may no longer be the very best and latest way of doing things, and possibly there are some new developments that do not get as much attention as desired (like [http://www.pragma-ade.nl/general/manuals/mtexfont.pdf texfont], and the issues arising from font map files). Overall, the document appears accurate, though. |
An important thing to remember is this: | An important thing to remember is this: | ||
Line 70: | Line 56: | ||
Another important thing is that it also does not share font map files with LaTeX and, specifically, | Another important thing is that it also does not share font map files with LaTeX and, specifically, | ||
− | '''ConTeXt does not make | + | '''ConTeXt does not make pdfeTeX read <tt>pdftex.map</tt>.''' |
(this is at the root of a great many problems reported by users only familiar with PSNFSS) | (this is at the root of a great many problems reported by users only familiar with PSNFSS) | ||
Line 85: | Line 71: | ||
* <fontname> is usually derived from the font source (afm or ttf), | * <fontname> is usually derived from the font source (afm or ttf), | ||
− | * <encoding> is a 'controlled' list, (see [[Encodings and Regimes]]) | + | * <encoding> is a 'controlled' list, (see [[Encodings and Regimes - Old Content]]) |
* <vendor> and <familyname> are user-supplied (at install time). | * <vendor> and <familyname> are user-supplied (at install time). | ||
There are ways to trick ConTeXt into using different conventions, but if you do that you are likely to run into trouble. | There are ways to trick ConTeXt into using different conventions, but if you do that you are likely to run into trouble. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Unsorted links = | = Unsorted links = | ||
− | * [http://www.pragma-ade. | + | * [http://www.pragma-ade.nl/general/manuals/mtexfont.pdf font installation with texfont] by Pragma |
− | * [http://www.pragma-ade. | + | * [http://www.pragma-ade.nl/general/manuals/mfonts.pdf ConTeXt's font mechanism in detail] by Pragma |
* [http://tug.org/TUGboat/Articles/tb28-2/tb89mahajan.pdf ConTeXt basics for users: Font styles] by Aditya Mahajan (2007) | * [http://tug.org/TUGboat/Articles/tb28-2/tb89mahajan.pdf ConTeXt basics for users: Font styles] by Aditya Mahajan (2007) | ||
− | * [http://www.pragma-ade. | + | * [http://www.pragma-ade.nl/general/manuals/mmakempy.pdf making outlines] by Pragma |
− | * [http://pragma-ade. | + | * [http://pragma-ade.nl/specials/fonts/fontspecial-p.pdf Here] you can try out several TeX fonts online (PDF interface!) |
− | * Troubleshooting: solving [[TeXfont]] problems | + | * Troubleshooting: solving [[TeXfont - Old Content]] problems. |
− | + | * [[Font Handling Internals - Old Content]] | |
− | * [[Font Handling Internals]] | + | * [http://watershade.net/wmcclain/context-help.html Bill McClain's ConTeXt beginners page (Old Content)] has also a lot about fonts |
− | * [http://watershade.net/wmcclain/context-help.html Bill McClain's ConTeXt beginners page] has also a lot about fonts | ||
* [[Pseudo Small Caps]] by Vit Zyka | * [[Pseudo Small Caps]] by Vit Zyka | ||
− | * [[Understanding how fonts work in ConTeXt]] | + | * [[Understanding how fonts work in ConTeXt - Old Content]] |
− | * Fonts rely on [[Encodings and Regimes]], and it helps to know what happens underneath the hood, from time to time. | + | * Fonts rely on [[Encodings and Regimes - Old Content]], and it helps to know what happens underneath the hood, from time to time. |
* In newer distributions, map files belong in <tt>…/fonts/map/pdftex/context</tt>! | * In newer distributions, map files belong in <tt>…/fonts/map/pdftex/context</tt>! | ||
− | * | + | * [[TeX_Gyre_-_Old_Content]] |
+ | * [[Pseudo Small Caps]] by Vit Zyka (2011) | ||
− | [[Category: | + | [[Category:Old Content]] |
Latest revision as of 08:26, 2 July 2022
Contents
How to use fonts in ConTeXt
The ConTeXt way of handling fonts are TypeScripts - Old Content. It’s a system of abstraction and aliases, which may seem “strange” at first for new users of ConTeXt.
- If it fits your needs, consider first to use the former Simplefonts - Old Content module, now in the core as font-sel.mkvi.
- There is now a manual chapter on fonts.
- If you happen to use XeTeX - Old Content then you can forget almost all the magic and start using your system fonts (see Fonts_in_XeTeX - Old Content).
- If you want to keep using PdfTeX - Old Content, read on.
Font support & configuration
Type 1 fonts
Type 1 fonts come in multiple files. The various components are:
- .pfb: "Printer Font, Binary".
- .pfa: "Printer Font, ASCII".
- .pfm: "Printer Font Metrics", binary.
- .afm: "Adobe Font Metrics".
Typically each font will have a set of outlines in a pfb or pfa file, and a set of metrics in a pfm or afm file.
Which file variations are preferred depends on platform. Linux prefers pfa and afm (the ASCII versions). Windows prefers pfb and pfm (the binary versions). Mac OS X prefers pfm and afm.
On the Mac, you may encounter old-style PostScript Type 1 fonts which have an extensionless file containing the font outlines. These are a relic from the days when bitmaps were used to display fonts on screen, and the PostScript was downloaded to the printer. Your best bet is to throw them away and get an up-to-date OpenType version, or use a font editing utility such as fontforge to convert them.
On Windows 7, the OS will identify only the .pfm file as the actual font. However, when you install the font, Windows invisibly locates the matching .pfb file from the same directory, and copies them both to the C:\Windows\Fonts directory.
- Using Psnfss - Old Content metrics in ConTeXt
- Matt Gushee's introduction to virtual fonts Psnfss - Old Content, especially for getting expert fonts to work.
- URW Garamond - Old Content NEED UPDATE TO OTF
- Lucida - Old Content NEED UPDATE TO OTF: large font family designed by Bigelow & Holmes; suitable e.g. for presentations
- Installing Expert Fonts: Minion Pro - Old Content by Idris Samawi Hamid; contains step-by-step instructions, from preinstallation to writing typescripts
- Storm Type Foundry : support (Old Content) of selected fonts
True Type fonts
- Integrating TrueType Fonts into ConTeXt - Old Content by Thomas A. Schmitz (PracTeX Journal)
- Installing a TrueType font, step by step - Old Content. If you just need to install a TrueType font, this may be what you are looking for.
OpenType fonts
Basic Hints
How to change to Palatino for text with Euler for math: Palatino with Euler for Math - Old Content
Some hints by Taco from the mailing list on 2005-11-20:
Q: How up to date or out of date is the information in mfonts manual?
A: It looks like it is still quite up-to-date, but some of the examples it gives may no longer be the very best and latest way of doing things, and possibly there are some new developments that do not get as much attention as desired (like texfont, and the issues arising from font map files). Overall, the document appears accurate, though.
An important thing to remember is this:
ConTeXt does not share font metric conventions with LaTeX.
(at one point it started doing so, like supporting the Karl Berry naming scheme and the PSNFSS style font family names, but that has since been abandoned).
Another important thing is that it also does not share font map files with LaTeX and, specifically,
ConTeXt does not make pdfeTeX read pdftex.map.
(this is at the root of a great many problems reported by users only familiar with PSNFSS)
The preferred format for metric files in ConTeXt is
<vendor>/<familyname>/<encoding>-<fontname>.tfm
for metrics and
<encoding>-<vendor>-<familyname>.map
for the mapping files.
- <fontname> is usually derived from the font source (afm or ttf),
- <encoding> is a 'controlled' list, (see Encodings and Regimes - Old Content)
- <vendor> and <familyname> are user-supplied (at install time).
There are ways to trick ConTeXt into using different conventions, but if you do that you are likely to run into trouble.
Unsorted links
- font installation with texfont by Pragma
- ConTeXt's font mechanism in detail by Pragma
- ConTeXt basics for users: Font styles by Aditya Mahajan (2007)
- making outlines by Pragma
- Here you can try out several TeX fonts online (PDF interface!)
- Troubleshooting: solving TeXfont - Old Content problems.
- Font Handling Internals - Old Content
- Bill McClain's ConTeXt beginners page (Old Content) has also a lot about fonts
- Pseudo Small Caps by Vit Zyka
- Understanding how fonts work in ConTeXt - Old Content
- Fonts rely on Encodings and Regimes - Old Content, and it helps to know what happens underneath the hood, from time to time.
- In newer distributions, map files belong in …/fonts/map/pdftex/context!
- TeX_Gyre_-_Old_Content
- Pseudo Small Caps by Vit Zyka (2011)