[Tex/LaTex] How to display text at 60pt or even 600pt

fontsize

I am new to LaTeX. I am having a hard time creating a font past 40 points. Here is my code:

\documentclass[letterpaper]{article}
\begin{document}
    \fontsize{40}{48}\selectfont hi
\end{document}

If I change the 40 and corresponding 48 to anything bigger, it does not seem to increase the size of the word "hi". I can go lower but not higher.

Technically I need this for some text in a cell for a table I am working on in LaTeX, but I'm sure if I figured out what I was doing wrong I could apply it to the table. The font size I am aiming for is somewhere around 60 to 100 points in size.

Best Answer

Edit: I added a new example to compare scaled fonts and resized fonts.

LaTeX can't use font sizes that are not listed in the .fd file. When compiling your MWE, you can see some warnings:

LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <40> not available
(Font)              size <24.88> substituted on input line 8.

because the .fd file of Computer Modern provides a discrete list of sizes (with a maximum size of 24.88pt).

To use scalable fonts, there are some useful packages:

  • type1cm (Computer Modern via cm-super).

  • anyfontsize (with any font but automatically only via latex)

  • lmodern (a sort of "super cm-super").

Here is an example using lmodern package (that provides scalable fonts):

enter image description here

\documentclass[letterpaper]{article}
\usepackage{lmodern}
\usepackage{graphicx}
\begin{document}
    \fontsize{40}{48}\selectfont hi
    \fontsize{60}{70}\selectfont hi
    \fontsize{100}{120}\selectfont hi%

    % compare scaled fonts and resized fonts
    \fontsize{100}{120}\selectfont hi%
    \scalebox{5}{\fontsize{20}{24}\selectfont hi}%
    \scalebox{10}{\fontsize{10}{12}\selectfont hi}%
    \scalebox{20}{\fontsize{5}{6}\selectfont hi}

    % a BIG font
    \fontsize{300}{350}\selectfont hi
\end{document}