XeTeXSmall Caps not available with Arial

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
max_mad666
Posts: 12
Joined: Thu Sep 08, 2011 4:04 pm

Small Caps not available with Arial

Post by max_mad666 »

Hello,

I've got a XeTeX file with the line:

Code: Select all

\setmainfont[Mapping=tex-text]{Arial}
If I use quality fonts such as Adobe Minion Pro or Linux Libertine, I get the small caps when I put a word in \textsc{}. However, if I change it to Arial, I get no small caps.

Does anyone have an idea?

Thank you
Last edited by Stefan Kottwitz on Tue Feb 28, 2012 12:30 am, edited 1 time in total.

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

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Small Caps not available with Arial

Post by Stefan Kottwitz »

Perhaps Arial just does not provide a small caps font version. Not every font does it. Some people consider Arial to be a bad copy of Helvetica (see The scourge of Arial) - perhaps try Helvetica.

Stefan
LaTeX.org admin
max_mad666
Posts: 12
Joined: Thu Sep 08, 2011 4:04 pm

Small Caps not available with Arial

Post by max_mad666 »

Hello,
Yeah it's true Arial is not such a "good" font but sometimes you cannot change if someone impose you to use it haha.

I've done a smillar post on siteduzero (french website)
Someone suggested me to simulate small caps with the following code

Code: Select all

\documentclass[]{article}
%\usepackage{fontspec}
\begin{document}
\makeatletter

\def\mycommand{\bgroup\obeyspaces\mycommandaux}
\def\mycommandaux#1{\mycommandauxii #1\relax\relax\egroup}
\def\mycommandauxii#1{%
\ifx\relax#1\else \ifcat#1\@sptoken{} \expandafter\expandafter\expandafter\mycommandauxii\else
\ifnum`#1=\uccode`#1 {\normalsize #1}\else {\footnotesize \uppercase{#1}}\fi \expandafter\expandafter\expandafter\mycommandauxii\expandafter\fi\fi}

\mycommand{Any Surname or Nickname or other Text that need Small Caps...}

\end{document}
And it's really good working.
Thanks
Last edited by Stefan Kottwitz on Mon Mar 05, 2012 12:08 am, edited 1 time in total.
Post Reply