1

I defined a new font size using this command

\newcommand{\Hone}[1]{{\fontsize{2em}{2.2em}\selectfont\textbf{#1}}}

but I noticed that it is not applied for all sizes

what I mean by that is for example if I change 2em to 50em or to 100em the font will be the same

this is how I'm using the command

\Hone{test}

why is this happening?

JamesT
  • 3,169

1 Answers1

3

Add the package fix-cm to the preamble:

enter image description here

\RequirePackage{fix-cm}
\documentclass{article}

%\usepackage{fix-cm} % if T1 encoding is used

\newcommand{\HoneTwo}[1]{{\fontsize{2em}{2.2em}\selectfont\textbf{#1}}} \newcommand{\HoneFive}[1]{{\fontsize{5em}{2.2em}\selectfont\textbf{#1}}} \newcommand{\HoneTen}[1]{{\fontsize{10em}{2.2em}\selectfont\textbf{#1}}}

\begin{document} \HoneTwo{Text at 2.2em}\ \HoneFive{Text at 5em}\ \HoneTen{Text at 10em} \end{document}

JamesT
  • 3,169
  • 1
    It's better \RequirePackage{fix-cm} before \documentclass if the T1 encoding is not used. – egreg Mar 10 '23 at 12:51