Including font with document source
Hey list, Is there a way to include a set of font files with a ConTeXt document's source files such that a path to the directory containing the font can be directly specified in the environment? I was thinking that if it were possible to do this already, the simplefonts module might have a setup for this. The reason why I'd like to consider this is to make it easier on my users who wish to build my document from source without them having to manually download a font and figure out how to install it on their given platform. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On 18-4-2012 03:41, Kip Warner wrote:
Hey list,
Is there a way to include a set of font files with a ConTeXt document's source files such that a path to the directory containing the font can be directly specified in the environment? I was thinking that if it were possible to do this already, the simplefonts module might have a setup for this.
The reason why I'd like to consider this is to make it easier on my users who wish to build my document from source without them having to manually download a font and figure out how to install it on their given platform.
It can give problems with the same fonts being on the system several times in several versions a simple way to install fonts is to drop everything in texmf-fonts/fonts/data/opentype (or just data, or mayb ewith on elevel more for the vendor) and do a "mtxrun --generate". This keep things in one spot. 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 Wed, Apr 18, 2012 at 09:41, Hans Hagen
On 18-4-2012 03:41, Kip Warner wrote:
Hey list,
Is there a way to include a set of font files with a ConTeXt document's source files such that a path to the directory containing the font can be directly specified in the environment? I was thinking that if it were possible to do this already, the simplefonts module might have a setup for this.
The reason why I'd like to consider this is to make it easier on my users who wish to build my document from source without them having to manually download a font and figure out how to install it on their given platform.
It can give problems with the same fonts being on the system several times in several versions
That is partially user's problem. The same can happen if user has multiple tex files with the same name or multiple images with the same name. There are already commands: - to look for tex files in some folder - to look for images in some folder \setupexternalfigures[directory={...,...}] which both work on document level (they only enable one extra folder for that specific document, not for the global TeX/ConTeXt installation) Imagine a project which ships both tex sources and fonts together in some SVN repository. It works perfectly fine if fonts are in the same folder as TeX documents, but if one wants some structure and put fonts in another folder, one has to install the font. There should be no need for users to install exotic fonts if document author can specify something like \setupfonts[directory=../fonts] on top of project file. Mojca
On 18-4-2012 10:44, Mojca Miklavec wrote:
Imagine a project which ships both tex sources and fonts together in some SVN repository. It works perfectly fine if fonts are in the same folder as TeX documents, but if one wants some structure and put fonts in another folder, one has to install the font. There should be no need for users to install exotic fonts if document author can specify something like \setupfonts[directory=../fonts] on top of project file.
maybe some day ... as caching is somewhat special then (lookups by names as well) it's non trivial ... technically one can mount an additional pseudo tree already but even then it might conflict when working on shares that are used by multiple users (fonts defined with file: are less problematic, but name: lookups get messy) 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 Wed, Apr 18, 2012 at 12:26, Hans Hagen wrote:
On 18-4-2012 10:44, Mojca Miklavec wrote:
Imagine a project which ships both tex sources and fonts together in some SVN repository. It works perfectly fine if fonts are in the same folder as TeX documents, but if one wants some structure and put fonts in another folder, one has to install the font. There should be no need for users to install exotic fonts if document author can specify something like \setupfonts[directory=../fonts] on top of project file.
maybe some day ... as caching is somewhat special then (lookups by names as well) it's non trivial ... technically one can mount an additional pseudo tree already but even then it might conflict when working on shares that are used by multiple users (fonts defined with file: are less problematic, but name: lookups get messy)
For me it doesn't sound like a problem or a serious limitation if some project simply declares in which directory ConTeXt has to look for fonts and specifies the font with filename. Mojca
Mojca Miklavec
On Wed, Apr 18, 2012 at 12:26, Hans Hagen wrote:
On 18-4-2012 10:44, Mojca Miklavec wrote:
Imagine a project which ships both tex sources and fonts together in some SVN repository. It works perfectly fine if fonts are in the same folder as TeX documents, but if one wants some structure and put fonts in another folder, one has to install the font. There should be no need for users to install exotic fonts if document author can specify something like \setupfonts[directory=../fonts] on top of project file.
maybe some day ... as caching is somewhat special then (lookups by names as well) it's non trivial ... technically one can mount an additional pseudo tree already but even then it might conflict when working on shares that are used by multiple users (fonts defined with file: are less problematic, but name: lookups get messy)
For me it doesn't sound like a problem or a serious limitation if some project simply declares in which directory ConTeXt has to look for fonts and specifies the font with filename.
Yes I think this would be very useful too. -- John Devereux
On Wed, 2012-04-18 at 12:26 +0200, Hans Hagen wrote:
maybe some day ... as caching is somewhat special then (lookups by names as well) it's non trivial ... technically one can mount an additional pseudo tree already but even then it might conflict when working on shares that are used by multiple users (fonts defined with file: are less problematic, but name: lookups get messy)
Understandable, given that font installation is extremely platform specific. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Wed, 2012-04-18 at 09:41 +0200, Hans Hagen wrote:
It can give problems with the same fonts being on the system several times in several versions
a simple way to install fonts is to drop everything in
texmf-fonts/fonts/data/opentype (or just data, or mayb ewith on elevel more for the vendor)
and do a "mtxrun --generate". This keep things in one spot.
Thanks Hans. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
participants (4)
-
Hans Hagen
-
John Devereux
-
Kip Warner
-
Mojca Miklavec