\fontfamily

186 views
Skip to first unread message

Paul A Norman

unread,
Jul 14, 2011, 3:16:48 AM7/14/11
to latexus...@googlegroups.com
Hi,

I am on the elusive trail of font family names for use with \fontfamily{}

I have discovered after much googling that possibly the only real way
to get the required name sometimes is to look in the
specific-font's.sty file as any documentation often doesn't mention
it, or perhaps the .fd files

I am on MiKTeX 2.8 so describe my tree from that point.

\MiTeX 2.8.3541 Portabe\dvips\config\psfonts_t1.map

I find references to abbreviations like for example

artemisiarg9r GFSArtemisia-Regular " artemisiaec ReEncodeFont "
<artemisiaec.enc <GFSArtemisia-Regular.pfb
artemisiab8r GFSArtemisia-Bold " artemisia ReEncodeFont "
<artemisia.enc <GFSArtemisia-Bold.pfb

Are artemisiaec and artemisia then both valid fontfamily fontname abbreviations?

Can artemisiab8r be directly used for anything connected with
selecting fonts in a LaTeX document? Or is that only to bridge LaTeX
to TeX?

This is also found in the gfsartemisia.map file in \MiTeX 2.8.3541
Portabe\fonts\map\dvips\gfsartemisia

So I guess that when MiKTeX's databases are updated, that all thses
Map files are united into the appropriate file like psfonts_t1.map ?

From the .sty I look insode and can see \fontfamily{artemisia} so I
know I can use that.

So I look deepeer in to the .fd files and see that each encoding has a
file like ot or t1artemisia.fd

And of course uses \DecalreFontFamily

Have I now come to the grail quest destination of discovering the
source of definitive font names?

With the encoding OT1/T1 etc, and the TeX name like artemisiarg8a I
can then look in the .map and get some sort of human readiblk fonat
name?

Well I can not find artemisiarg8a in any file.

Any help or hints much appreciated please,

Paul

tge...@gmail.com

unread,
Jul 14, 2011, 4:47:28 AM7/14/11
to LaTeX Users Group
Hi Paul,

You can use \fontfamily{llcmss} for the Lxfonts (\usepackage{lxfonts})
which are nice for figures and presentation. The font is clear and a
capital "I" is easily distinguished from a lowercase "l".

For kpfonts (\usepackage{kpfonts}) you can use jkptt.

I got these from the sty file as you suggest. Some experimentation was
needed to find the correct designation. In your example, artemisiab8r,
would probably only give you the font in size 8.

It would be nice if other people could contribute so we could built a
database of these.

The Font Sampler PDF by Florent Chervet does have many of the Berry
names for the font families. The file was forwarded to me by Gouailles
(from this list). I haven't found it online...

I hope this helps. Switching fonts is something I also find quite
troublesome.

Paul A Norman

unread,
Jul 14, 2011, 8:19:06 AM7/14/11
to latexus...@googlegroups.com
Thanks yes it is a major propblem, I'll keep looking into it.

Hopefully there is some sort of way forward on this.

Paul

> --
> You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
> To post to this group, send email to latexus...@googlegroups.com.
> To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
>
>

Peter Flynn

unread,
Jul 14, 2011, 11:31:53 AM7/14/11
to latexus...@googlegroups.com
On Thu, Jul 14, 2011 at 8:16 AM, Paul A Norman <paul.a...@gmail.com> wrote:
Hi,

I am on the elusive trail of font family names for use with \fontfamily{}

You shouldn't normally need to use this if you have your fonts installed as LaTeX packages.
But you might want it if you specifically want an unusual font or one for which you only need it for a single example rather than as an ongoing typeface, eg {\fontfamily{phv}\selectfont\bfseries M} for a bold Helvetica M.
 
I have discovered after much googling that possibly the only real way
to get the required name sometimes is to look in the
specific-font's.sty file as any documentation often doesn't mention
it, or perhaps the .fd files

As I said, the point of the packages is that you shouldn't normally need to use the underlying font mechanism by hand like this.
But yes, the .sty and .fd files are where this information is kept: for example in tex/latex/psnfss/charter.sty it says \renewcommand{\rmdefault}{bch} so the font family for Charter is bch.
 
I am on MiKTeX 2.8 so describe my tree from that point.

C:\Program Files\MiKTeX 2.8\tex\latex\psnfss is where Postscript font .sty/.fd files for NFSS (New Font Selection Scheme) live.
C:\Program Files\MiKTeX 2.8\tex\latex\mfnfss is where Metafont .sty/.fd files for NFSS (New Font Selection Scheme) live.
C:\Program Files\MiKTeX 2.8\tex\fonts is where the actual TFM, AFM, Type1, VF, and Source font files live.
Others are in directories named after the installed fonts, eg
 
\MiTeX 2.8.3541 Portabe\dvips\config\psfonts_t1.map

That's where the exported mapping definitions live. These are usually generated by programs like updmap, so you should never edit these files.
 
I find references to abbreviations like for example

artemisiarg9r GFSArtemisia-Regular " artemisiaec ReEncodeFont "
<artemisiaec.enc <GFSArtemisia-Regular.pfb
artemisiab8r GFSArtemisia-Bold " artemisia ReEncodeFont "
<artemisia.enc <GFSArtemisia-Bold.pfb

Are artemisiaec and artemisia then both valid fontfamily fontname abbreviations?

No, they are the internal Adobe longnames. The \fontfamily names are in usually a 3-char format (like bch above) described in the fontname specification (type texdoc fontname to read it, or open the fontname.pdf documentation in C:\Program Files\MiKTeX 2.8\doc\fontname

On my (Ubuntu) system, Artemisia is defined in /usr/share/texmf-texlive/tex/latex/gfsartemisia/gfsartemisia.sty which says \renewcommand{\rmdefault}{artemisia} (so in this case, by coincidence, artemisia is a fontname). But you would have some very weird results if you tried to use it in the raw, as gfsartemisia.sty contains a huge number of other settings which have to happen before it will work: read the documentation (gfsartemisia.pdf) to see how to use it.
 
Can artemisiab8r be directly used for anything connected with
selecting fonts in a LaTeX document? Or is that only to bridge LaTeX
to TeX?

No, it's an internal configuration to let DVI/Postscript and PDF display documents which use Artemisia. It's actually the name of the Postscript Type 1 Font Binary (.pfb) file.
 
This is also found in the gfsartemisia.map file in    \MiTeX 2.8.3541
Portabe\fonts\map\dvips\gfsartemisia

That's the mapping file which tells the output driver (DVI, PDF) where to find stuff.
 
So I guess that when MiKTeX's databases are updated, that all thses
Map files are united into the appropriate file like psfonts_t1.map ?

Correct.
 
From the .sty I look insode and can see \fontfamily{artemisia} so I
know I can use that.

But all you should need to so is \usepackage{artemisia}. I don't understand why you want to use \fontfamily at all.
 
So I look deepeer in to the .fd files and see that each encoding has a
file like ot or t1artemisia.fd

Correct.
 
And of course uses \DeclareFontFamily


Have I now come to the grail quest destination of discovering the
source of definitive font names?

Close. The fontfamily names are certainly used in \DeclareFontFamily commands, but they are defined by the fontname conventions (with the exception of more complex fonts like Artemisia).
 
With the encoding OT1/T1 etc, and the TeX  name like artemisiarg8a I
can then look in the .map and get some sort of human readiblk fonat
name?

Well I can not find  artemisiarg8a in any file.

I still don't know why you want to do this. \fontfamily names are not human-readable: they are designed to be machine-readable.
Package names are for humans.

///Peter

Paul A Norman

unread,
Jul 14, 2011, 5:22:39 PM7/14/11
to latexus...@googlegroups.com
Thanks for walking me through that Peter,

I am still a bit confused, is it the .fd that sets the font name
abbreviation? Do all such .fd assigned names work in \fontname?

Is it useful or necessary to load the packages of wanted font familes
in a sequence where the last one is the main document font package? Or
does the last one just over-write everything from the previous one(s)?

What stops conflict of font name abbreviations? Is there a central
registry or does the algorithm for making these assure their freedom
from conflict?

I notice that MikTeX (and no doubt TeXlive) can find and use a font
when its abbreviation is used in
\fontname, so I guess I am wanting to walk backwards through that path
to find the relationship between the font longnames and their
abbreviations.

Then hopefully write a script for TeXworks to handle it for different
people needing it (http://twscript.paulanorman.com/downloads/
http://tug.org/texworks/)

>I still don't know why you want to do this. \fontfamily names are not human-readable: they >are designed to be machine-readable.
>Package names are for humans.

Needing to ocassionally (some times often) jump out of the run of a
font package.

And using \fontname\selectfont is recommended in a number of web
sites, manuals, faqs, books etc, but it is frequently left uncertain
as to how you obtain the needed font name abbreviation :)

Sometimes you need, for display or logical emphasis purposes, to
include a very different font for a series of headings, or to tie in
with styles used in a graphic, there are occasional areas in a
publication where judicious use of a totally contrasting font is very
effective, and even times for more than one font.

I use/need fontnames for setting macros for specific kinds of blocks
of text, certain types of quotes in fact.
e.g. in compressed quote blocks this can work nicely against
\usepackage{charter} as the main package:
\fontfamily{anttl}\fontsize{10.5pt}{11.25pt}\selectfont

When I quote Scripture I use this as one available macro

%: \indentBible* with extra right edge background -
#1}\hspace{0.05\columnwidth}
% suffix package
\WithSuffix\newcommand\indentBible*[1]{% indents and leaves a bit at
end of block
\noindent\colorbox{bibleBack}{\hspace{0.05\columnwidth}\parbox{0.87\columnwidth}{\fontfamily{anttl}\fontsize{10.5pt}{11.25pt}\selectfont
#1\vspace*{0.007\columnwidth}}\hspace{0.025\columnwidth}}%
\vspace{-0.85mm}}
%

Or other types of quotes,

%: \indentPlain
\newcommand{\indentPlain}[1]{% indents and leaves a bit at end of block
\vspace*{1mm}%
\noindent\colorbox{plainBack}{\hspace{0.05\columnwidth}\parbox{0.87\columnwidth}%gfsartemisia-euler
ptm ppl
{\fontfamily{ptm}\fontsize{10.5pt}{11.75pt}\selectfont
#1\vspace*{0.007\columnwidth}}\hspace{0.025\columnwidth}}%
\vspace{-0.85mm}}
%

And in doing this kind of thing need the use of fonts from different
sources, sometimes from a similar font family background but not
always in the same released package.

In Corel Ventura Publisher 8/10 I would simply have written new tags
and assigned the necessary font(s) . We've moved across completely to
LaTeX in the last few years, but this has remained a major
mystery/problem so far - and this week is font week for me - hopefully
getting LaTeX font-ing and web page equivalents sorted out.

Over those years I've noticed a lot of questions on Latex fontname
abbreviations around the web, quite a demand for them.

Paul

Paul A Norman

unread,
Jul 15, 2011, 3:13:27 AM7/15/11
to latexus...@googlegroups.com
Here is a really good description for preparing everything for ttf fonts.

In there I see that the 'technician' can choose to use Karl Berry's
naming system, but is still effectively making their own font name
abbreviation up.

Looks like this issue will live on for as long as pdflatex still needs
to be used, it seems XeTeX may be still be not working with a number
of packages for a while into the future?

Paul

Peter Flynn

unread,
Jul 15, 2011, 12:41:39 PM7/15/11
to latexus...@googlegroups.com
On Thu, Jul 14, 2011 at 10:22 PM, Paul A Norman <paul.a...@gmail.com> wrote:
Thanks for walking me through that Peter,

I am still a bit confused, is it the .fd that sets the font name
abbreviation? Do all such .fd assigned names work in \fontname?

Hold on. We've been talking about \fontfamily, not \fontname.
But yes, if a string is defined as a font family in \DeclareFontFamily, then you can use it in \fontfamily.
 
Is it useful or necessary to load the packages of wanted font familes
in a sequence where the last one is the main document font package? Or
does the last one just over-write everything from the previous one(s)?

That's a different question.

In normal typesetting LaTeX assumes you have one serif family, one sans-serif family, and one typewriter family. By default these are cmr, cmss, and cmtt respectively. Fonts are the individual instances which make up a family, so cmr is composed of cmr itself, cmti (text italics), cmcsc (small caps), cmbx (bold), etc. Families are available for different encodings: OT1 (Old TeX), T1 (new), etc, so there are files called ot1cmr.fd, t1cmr.fd, etc. When you \usepackage{palatino}, for example, ppl replaces cmr as the serif font family. If you \usepackage{helvet}, then phv replaces cmss as the sans-serif font family.

If you are doing something more complex where you need multiple serif or sans-serif font families available simultaneously, you need more advanced commands, because still only one of each class (serif, sans, monospace) can be the default at any one time. For this purpose, most modern font packages add two new commands: one to switch globally to their font family, and one to do it with an argument. This is exactly analogous to the distinction between (for example) \bfseries (which has global effect) and \textbf (which takes an argument). So...in a package for a typeface called XXX, you would expect to find two new commands \XXX and \textXXX which you can use to switch to that font family on a permanent or temporary basis.

Unfortunately not all authors of typeface packages make it that easy :-( but to answer your question, those typefaces which are "book" fonts, where the expectation is that you will want to set your whole document in them (eg Times, Charter, Palatino, etc), do supersede any previously loaded package of the same class. So \usepackage{palatino}\usepackage{charter} will result in Charter being the default serif face.
 
What stops conflict of font name abbreviations?

The "Karl Berry" fontname algorithm mostly does this in the LaTeX world.
 
Is there a central registry or does the algorithm for making these assure their freedom from conflict?

There is no central registry, although the tendency to need to work with other fonts in PDF or PS files means that most foundries do try to ensure their (long) font names are globally unique. If you designed a new font tomorrow and tried to call it Times New Roman, I suspect it would meet with some resistance :-)
 
I notice that MikTeX (and no doubt TeXlive) can find and use a font when its abbreviation is used in
\fontname, so I guess I am wanting to walk backwards through that path to find the relationship between the font longnames and their
abbreviations.

The long names are only needed by the output driver, after typesetting it complete; not by LaTeX. LaTeX just uses the macros from the .sty and .fd files to look up character metrics and allow the right space for each character where it occurs. LaTeX does not "put any ink on the type" -- it just sets the characters. You will notice that at the end of pdflatex runs, it lists all the fonts in use: this is where it looks up the long names in the font map and provides the necessary stuff to allow the font outline data from the .pfb files to be added to the output .pdf.  In the case of .dvi output, dvips does this lookup and compilation when it creates the .ps file.
 
Then hopefully write a script for TeXworks to handle it for different
people needing it (http://twscript.paulanorman.com/downloads/
http://tug.org/texworks/)

I don't know what this means.
 
>I still don't know why you want to do this. \fontfamily names are not human-readable: they are designed to be machine-readable.
>Package names are for humans.

Needing to ocassionally (some times often) jump out of the run of a
font package.

Right. That is certainly one good reason, but check the package documentation: if the font package provides commands as described above, you should be able to use just them, and not have to bother with \fontfamily.
 
And using \fontname\selectfont is recommended in a number of web
sites, manuals, faqs, books etc, but it is frequently left uncertain
as to how you obtain the needed font name abbreviation :)

From the .fd file (via the .sty file). Or from a list such as that provided at http://latex.silmaril.ie/formattinginformation/typographics.html#fontuse
(top RH corner of each example); or from the LaTeX Font Catalog (http://www.tug.dk/FontCatalogue/)
 
Sometimes you need, for display or logical emphasis purposes, to
include a very different font for a series of headings, or to tie in
with styles used in a graphic, there are  occasional areas in a
publication where judicious use of a totally contrasting font is very
effective, and even times for more than one font.

Sure, but that is what the macros defined in the .sty files are for.
 
I use/need fontnames for setting macros for specific kinds of blocks
of text, certain types of quotes in fact.
e.g. in compressed quote blocks this can work nicely against
\usepackage{charter} as the main package:
\fontfamily{anttl}\fontsize{10.5pt}{11.25pt}\selectfont

Unfortunately yes. I would prefer if there was an \antt and a \textantt command to allow this switch but they don't seem to have provided them.
 
When I quote Scripture I use this as one available macro

Yes, this is the kind of place where macros like that are needed.
 
And in doing this kind of thing need the use of fonts from different
sources, sometimes from a similar font family background but not
always in the same released package.

If you work at that level of detail you need this. 99% of LaTeX users don't :-)
 
In Corel Ventura Publisher 8/10  I would simply have written  new tags
and assigned the necessary font(s) .

That's what the macros in the .sty files are for.
 
We've moved across completely to
LaTeX in the last few years, but this has remained a major
mystery/problem so far - and this week is font week for me - hopefully
getting LaTeX font-ing and web page equivalents sorted out.

No mystery, but some font package creators have not thought deeply enough about usability to ensure that the macros to make it easy are provided.
 
Over those years I've noticed a lot of questions on Latex fontname
abbreviations around the web, quite a demand for them.

The details are all in the fontname documentation. It just needs enforcing :-)

///Peter

Reply all
Reply to author
Forward
0 new messages