Fonts & Character SetsNewbie: Unable to get Arial 10 on linux with xelatex

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
anandrajan
Posts: 2
Joined: Thu Dec 23, 2021 5:37 pm

Newbie: Unable to get Arial 10 on linux with xelatex

Post by anandrajan »

Apologies if this has already been asked and answered. I wasn't able to find a similar post.

The National Science Foundation in the US has a criterion that in the Arial family, only Arial 10 and higher are acceptable for proposal documents. After preparing a proposal using Windows fonts imported into a linux system, I had a document in Arial 10 and used XeLaTeX to compile it. Unfortunately, when I tried to submit the proposal, NSF's research.gov threw up a warning that the file was not compliant (with compliance defined as 1 inch margins, Arial 10 font or higher except for tables and figures and a minimum of 6 lines per inch). Upon opening the file in Adobe Acrobat DC, I can see that the reported font is Arial 9.96 and not Arial 10. How do I correct this? It's a serious problem since it would force us to switch to Computer Modern on linux or use Arial 11 etc. to be in compliance thereby reducing the text length.

(As a test, I edited the file in Acrobat DC and changed the font to Arial 10. The edited file was accepted by NSF despite violating the 1 inch margins by 4% which probably means they are only looking at the metadata.)

Here's the relevant bit. latex file, log file and pdf attached.

Code: Select all

\documentclass[10pt]{article}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Arial}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
% Based on the responses below, try with and without the following line. Get Arial 10 when adding the line.
%\usepackage[fontsize=10.0375pt]{scrextend}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%\usepackage{fontspec}
%\setmainfont{Arial}
%\fontspec{Arial}[Optical Size=10]
\makeatother

\begin{document}
% Alex Lifeson at the RRHOF
\noindent{Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blahblah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah}
\end{document}

%latex commands to compile and create a pdf
[luser@linux] xelatex junktext
junktext.tex
Latex source
(9.33 KiB) Downloaded 252 times
junktext.log
Log file created by xelatex
(21.62 KiB) Downloaded 244 times
junktext.pdf
pdf created by xelatex
(29.95 KiB) Downloaded 294 times
Last edited by anandrajan on Fri Dec 24, 2021 3:57 pm, edited 3 times 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

Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Newbie: Unable to get Arial 10 on linux with xelatex

Post by Ijon Tichy »

This is not a Linux problem but a problem with: What does 1 point mean?

1 pt in TeX is 1/72.27 inch. 1 DTP point,e. g., used in Word or Adobe Acrobat, is 1/72 inch which is 1 bp in TeX.

The LaTeX standard classes do not provide 10dp as font size option. But the KOMA-Script classes do allow to use fontsize=10bp. As an alternative you can use package scrextend together with the standard classes.

BTW: A difference of 0.04bp is 0.00056 inch. One pixel at usual printing resolution of 2440 dpi is 0.00041 inch. So the difference of 10bp to 10bp is about one pixel. You need a at least a magnifier, maybe a microscope to see the difference.

And please use the Code button to mark your code not the LaTeX button. The online editor/compiler does only work this code tags but not with latex tags.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
anandrajan
Posts: 2
Joined: Thu Dec 23, 2021 5:37 pm

Newbie: Unable to get Arial 10 on linux with xelatex

Post by anandrajan »

Thanks. This totally cleared things up for me.

I quickly tried adding

Code: Select all

\usepackage[fontsize=10.0375pt]{scrextend}
and generated a pdf. Adobe Acrobat DC recognized the changed pdf as Arial 10, so many thanks. Will now try and understand how the new package works because it wasn't clear how the new command rescaled the fonts (which ones etc.) and how the line spacing was affected.
Post Reply