Re: [XeTeX] Loading a Font Family from a Local File

2011-03-10 Thread Ulrike Fischer
Am Tue, 8 Mar 2011 09:27:33 -0700 schrieb Rob Oakes:

> I am currently working on a document class for a non-profit. They
> will be using LyX to typeset and publish a number of books
> related to Mexican culture. I've been asked to create both a
> LaTeX document class for them and a LyX layout that allows them
> to use the document class in a WYSIWYG environment.  For the
> design, I would like to use the memoir class and two open  type
> fronts: Linux Libertine and ADF Universalis.

> On my own computer, I am able to use use the fonts through
> fontspec commands, as they were installed using Font Book on Mac
> OS X. However, to simplify the installation of the template, I
> would like to place the font files in the same folder as the
> class and then load them from the directory, rather than from the
> system fonts folder.
 
> Does anyone know how that might be done using fontspec? I know it
> is possible to load individual font-files, but I was hoping to be
> able to use the entire families.  Any thoughts would be extremely
> appreciated.

In miktex/windows xetex finds fonts also in the texmf-trees. E.g. an
open type font can be in /fonts/opentype/...

But I would not install fonts together with your template and
certainly not in a non-standard font location. It can confuse xetex
and your users if two (perhaps slightly different) versions of the
same font exists in a system. 

-- 
Ulrike Fischer 



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Loading a Font Family from a Local File

2011-03-08 Thread Alan Munn
On Mar 8, 2011, at 11:27 AM, Rob Oakes wrote:

> Dear XeTeX Users,
> 
> I am writing with a somewhat simple question, but it was not one that I was 
> able to find a straightforward answer to.
> 
> I am currently working on a document class for a non-profit. They will be 
> using LyX to typeset and publish a number of books related to Mexican 
> culture. I've been asked to create both a LaTeX document class for them and a 
> LyX layout that allows them to use the document class in a WYSIWYG 
> environment.  For the design, I would like to use the memoir class and two 
> open  type fronts: Linux Libertine and ADF Universalis.
> 
> On my own computer, I am able to use use the fonts through fontspec commands, 
> as they were installed using Font Book on Mac OS X. However, to simplify the 
> installation of the template, I would like to place the font files in the 
> same folder as the class and then load them from the directory, rather than 
> from the system fonts folder.
> 
> Does anyone know how that might be done using fontspec? I know it is possible 
> to load individual font-files, but I was hoping to be able to use the entire 
> families.  Any thoughts would be extremely appreciated.


P. 7 of the `fontspec` manual says:

> To load a font that is not in one of
> the default search paths, its location
> in the filesystem must be specified
> with the Path feature:
> 
> \fontspec [ Path = /Users/will/Fonts/, 
> UprightFont = *-regular,
>  BoldFont = *-bold, ...]
> {texgyrepagella}

The path doesn't have to be specified absolutely, so if you have your font(s) 
in e.g. texsource/fonts and your source is in texsource, you can use:

\fontspec [ Path = fonts/, ... ] % note that the trailing '/' is required

Note that the part that follows the specification for the UprightFont, etc. 
must match the names of the actual font you are using.  So for example, if your 
font files are named

`MyFont-Roman.ttf` and `MyFont-Italic.ttf`

the command to load them would use:

\fontspec [Path = fonts/,
UprightFont = *-Roman,
ItalicFont = *-Italic
 ]
{MyFont}

etc.

You don't need to use the `\fontspec` command specifically. Any other font 
selection command from `fontspec` such as `\setmainfont` or `newfontfamily` can 
also be used with a Path specification.

-- 
Alan Munn
am...@gmx.com







--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


[XeTeX] Loading a Font Family from a Local File

2011-03-08 Thread Rob Oakes
Dear XeTeX Users,

I am writing with a somewhat simple question, but it was not one that I was 
able to find a straightforward answer to.

I am currently working on a document class for a non-profit. They will be using 
LyX to typeset and publish a number of books related to Mexican culture. I've 
been asked to create both a LaTeX document class for them and a LyX layout that 
allows them to use the document class in a WYSIWYG environment.  For the 
design, I would like to use the memoir class and two open  type fronts: Linux 
Libertine and ADF Universalis.

On my own computer, I am able to use use the fonts through fontspec commands, 
as they were installed using Font Book on Mac OS X. However, to simplify the 
installation of the template, I would like to place the font files in the same 
folder as the class and then load them from the directory, rather than from the 
system fonts folder.

Does anyone know how that might be done using fontspec? I know it is possible 
to load individual font-files, but I was hoping to be able to use the entire 
families.  Any thoughts would be extremely appreciated.

Cheers,

Rob Oakes


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex