Text Formattingtext figures for Adobe Caslon Pro

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
RAPhomme
Posts: 7
Joined: Thu Mar 25, 2010 11:30 pm

text figures for Adobe Caslon Pro

Post by RAPhomme »

Hello, I wonder if someone could help me with a problem I'm having with Adobe Caslon Pro (and actually some others too, but I'll stick with Caslon here). My goal is to use the roman text figures (lowercase numbers in roman) in ordinary Latex/Xetex documents. I started with Xetex/XeLatex/Fontspec, working from inside Emacs/Auctex, with a document like this:

Code: Select all

\documentclass[10pt]{article}
\usepackage{fontspec}

\defaultfontfeatures{Mapping=tex-text,Numbers=OldStyle}
\setmainfont{Adobe Caslon Pro}

\begin{document}

here's some Caslon in roman. 1 2 3 4 5  \itshape here's some in
italic. 1 2 3 4 5 

\end{document}
But this produces the titling figures (uppercase numbers) in roman. The italic figures are properly OldStyle.

Adobe's Specimen Book plainly shows an "Oldstyle proportional" for text figures. And Xetex's opentype-info.tex verifies that Adobe Caslon Pro has the feature "onum" or what Fontspec usually calls Numbers=OldStyle.

Code: Select all

OpenType Layout features found in `Adobe Caslon Pro'
script = 'DFLT'
     language = default
          features = 'aalt' 'c2sc' 'case' 'dlig' 'dnom' 'frac' 'hist' 'liga' 'lnum' 'numr' 'onum'
               'ordn' 'ornm' 'pnum' 'sinf' 'smcp' 'subs' 'sups' 'tnum' 'zero' 'cpsp' 'kern'
               'size'
The only way I've found to produce the text figures is to bypass Fontspec and deal more or less directly with Xetex (I think). But what one would expect to work still doesn't. The following:

Code: Select all

\font\OldNumbers''[/home/richard/.fonts/Caslon/ACaslonPro-Regular.otf]:+onum''
gives the same as before with Fontspec (roman uppercase, italic lowercase) but now with a new curly italic face. It's only by doing this:

Code: Select all

\font\OldNumbers''[/home/richard/.fonts/Caslon/ACaslonPro-Regular.otf]:+aalt''
that I'm finally able to get the roman text figures. ("aalt" is the opentype tag for "access all alternates.") But now all the roman text (but again not the italic) has turned into dingbats and border ornaments.

So that's all to say that I'm still looking for how to produce, on a useful and reliable basis, roman text figures in all the ordinary situations one would want them. I know that I don't grasp the intricacies of Xetex, Latex, or Fontspec, so I'm hopeful that some of you will be able to steer me right. Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

text figures for Adobe Caslon Pro

Post by frabjous »

Hmm. That's strange. I used your sample code unmodified with XeLaTeX, and got Old Style figures in both Roman and Italics without any fuss.
caslon.png
caslon.png (4.46 KiB) Viewed 5449 times
Could you add \listfiles to your code and post the log here?
RAPhomme
Posts: 7
Joined: Thu Mar 25, 2010 11:30 pm

Re: text figures for Adobe Caslon Pro

Post by RAPhomme »

frabjous--thanks for the quick reply. A little more hunting around revealed my problem: an older version of Xetex in which the opentype layout tables were not yet compatible with the newer Adobe fonts. So all's well now.

But I do have another question, which guess I'll raise in another topic, about how to change the heading numbers of a given heading-level without changing the heading text (i.e. how and if the numbers and text can be of different styles). Any quick ideas?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

text figures for Adobe Caslon Pro

Post by frabjous »

It would be easier if you said exactly what you wanted to do.

If you wanted, e.g., lining figures for section numbers, you could do:

\renewcommand{\thesection}{\fontspec[Numbers=Lining]{Adobe Caslon Pro}\arabic{section}}
RAPhomme
Posts: 7
Joined: Thu Mar 25, 2010 11:30 pm

Re: text figures for Adobe Caslon Pro

Post by RAPhomme »

What I was thinking about was having, e.g., the subsection level set in normal size italics. How then would I get the numbers of the subsections to print in roman figures?

One way I got it to work was through the Memoir class, fooling around with \setsecnumformat.

But is there a way to do the same thing from within Fontspec, along the lines of your example?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

text figures for Adobe Caslon Pro

Post by frabjous »

RAPhomme wrote:What I was thinking about was having, e.g., the subsection level set in normal size italics.
Just the number, or the entire heading?

Assuming the latter...
But is there a way to do the same thing from within Fontspec, along the lines of your example?
This has nothing to do with fontspec, it's just renewing the normal LaTeX commands, but you can do, e.g.:

Code: Select all

\renewcommand{\thesubsection}{\normalsize\textmd{\textit{\roman{subsection}}}}}
Hopefully you see the patterns.

\roman{counter} gives i, ii, iii, iv, etc.
\Roman{counter} gives I, II, III, IV, etc.

If you have further questions it's probably better to start a new topic.
Post Reply