5

When I try to use Arial, the thickness of character parts is non uniform. For example, see how the "a" character has fat and skinny parts:

Arial

Helvetica, does not have such an "issue", but I do not like how the baseline of the characters is different, see for example the baseline between "a" and "L" on the left below:

Helvetica

Is there a way to make heavier Arial weights (bold) appear more like they should:

Arial

To make the two images, uncomment/comment the header below:

\documentclass{article}
% \usepackage{fontspec}
% \setmainfont{Arial}
% \renewcommand{\familydefault}{\sfdefault}

\usepackage[T1]{fontenc}
\renewcommand*\familydefault{\sfdefault}
\usepackage{helvet}

\begin{document}
\Huge{tial}
\textbf{tial}
\end{document}
  • 1
    They appear as they should insofar as they reflect the font designer's design. The 'problem' you want to solve is, essentially, an aesthetic dislike of the font designs in question. There are two possible solutions: (1) pick a font which you do like; (2) design your own font, ensuring that you like it. There is certainly no way - no sane, reasonable way - of changing the shape of glyphs in TeX except, for example, by adapting the source for a font on-the-fly. (But it would be much easier to just write source you liked in that case e.g. modify a cloned .mf file.) – cfr May 24 '16 at 1:44
  • Technically, you could probably create a virtual font which moved the characters upwards or downwards and so adjust the baselines. However, you really, really shouldn't want to do that. Much better find another font which you like. You might (or might not) prefer TeX Gyre Heros, which is Helvetica-like. – cfr May 24 '16 at 1:49
  • Ummm, the upper line in your screenshot doesn't show Arial at all. Instead, it shows Computer Modern Sans-Serif (CMSS). – Mico May 24 '16 at 1:51
  • @cfr - What the OP claims to be Arial is actually gool ole' CMSS. – Mico May 24 '16 at 1:52
  • 1
    @Mico Indeed. I only really looked at the second originally. I just now scrolled back up and noticed the first one was completely different. The second does appear to be the URW clone of Helvetica, though. 1 out of 2 isn't bad? – cfr May 24 '16 at 1:54
6

Try TeX Gyre Heros, from its homepage:

TeX Gyre Heros is based on the URW Nimbus Sans L kindly released by URW++ Design and Development Inc. under GFL (independently of the GPL release accompanying Ghostscript). The Vietnamese glyphs were added by Han The Thanh.

TeX Gyre Heros can be used as a replacement for a popular font Helvetica, also known as Swiss (prepared by Max Miedinger with Eduard Hoffmann, 1957, at the Haas Type Foundry).

Test file for with showing the baseline:

\documentclass{article}
%\usepackage{helvet}
%\usepackage{tgheros}
\usepackage{xcolor}
\newlength\tialwidth
\begin{document}
\fontfamily{phv}\selectfont
\settowidth{\tialwidth}{tial \textbf{tial}}
\leavevmode\rlap{\color{blue!50!white}\vrule width\tialwidth height .1pt}%
tial \textbf{tial} {\tiny (helvet)}

\fontfamily{qhv}\selectfont
\leavevmode\rlap{\color{blue!50!white}\vrule width\tialwidth height .1pt}%
tial \textbf{tial} {\tiny (tgheros)}
\end{document}

Result

Or with the part below the baseline in red:

\documentclass{article}
%\usepackage{helvet}
%\usepackage{tgheros}
\usepackage{xcolor}
\usepackage{trimclip}
\newcommand*{\test}[2]{%
  \begingroup
    \fontfamily{#1}\selectfont
    \setbox0\hbox{tial \textbf{tial}}%
    \leavevmode
    \rlap{\color{red}\copy0}%
    \clipbox{0pt {\dp0} 0pt 0pt}{\copy0} %
    {\tiny (#2, dp=\the\dp0}\par
  \endgroup
}
\begin{document}
\test{phv}{helvet}
\test{qhv}{tgheros}
\end{document}

Result

The difference can even detected by TeX, the depth of the boxes:

dp(helvet) = 0.16492pt
dp(tgheros) = 0.0pt

A little protrusion for curved lines is IMHO correct, if it improves the appearance of a smooth baseline. The amount for this protrusion is the design decision of the font designer and to some degree a matter of taste.

  • +1 for the nifty method that colors the undershoots (the parts below the baseline) in red. :-) – Mico May 24 '16 at 2:21
2

What you claim to be Arial, in the first screen shot, isn't Arial at all. Instead, it's Computer Modern Sans Serif (aka CMSS).

The following screeshot provides a comparison of Helvetica Neue in the upper line and true Arial in the lower line.

enter image description here

Given that Arial is a (not-so-well-thought-out) clone of Helvetica, the differences are unsurprisingly rather minor. (The most obvious differences are in the shapes of "t" and "a".)

Observe that with "true" Helvetica, there's no issue with the characters not "resting" correctly on the baseline.

%% Compile with XeLaTeX or LuaLaTeX
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont{Helvetica Neue}
tial \textbf{tial}

\setmainfont{Arial}
tial \textbf{tial}
\end{document}
2

If you need a clone of Helvetica, you might prefer TeX Gyre Heros. For example:

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{tgheros}
\renewcommand*\familydefault{\sfdefault}
\usepackage{microtype}

\begin{document}
\Huge{tial}
\textbf{tial}
\end{document}

TeX Gyre Heros

Alternatively, you might browse the TeX Font Catalogue listing of sans serifs. As you seem to be using fontspec, any sans serif on your computer is available to you, but you must ensure that you specify it correctly and check the console output for warnings in case it is not found. (As Mico pointed out.)

For example, here's DejaVu Sans which is derived from the Vera fonts and has a somewhat similar a but less dramatic differences in thickness in the bold variant than Computer Modern Sans Serif:

DejaVu Sans

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{DejaVuSans}
\renewcommand*\familydefault{\sfdefault}
\usepackage{microtype}

\begin{document}
\Huge{tial}
\textbf{tial}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.