13

There are several points, especially when using LaTeX, that give me the feeling that the size of a font is not really a continuous quantity, but somehow quantized, i.e. can only take some specific predefined values.

  • LaTeX has several macros like \Large, \huge, \footnotesize, etc. to specify the font size I want to use. This seems very reasonable, because this is some kind of recommendation and standardization of what sizes to use for what kind of task. However, it seems there is no built-in way to set the font size to some specific value like 13pt without you having to specify at least some other "independent" parameter (e.g. some skip value when using \fontsize).

  • When using the usual document classes, e.g. article, I am restricted to sizes like 10pt, 11pt and 12pt.

  • The macro \fontsize{13pt}{10pt} should do the trick. However, the documentation stated (and I confirmed by myself) that the value of the first argument gets rounded to the next available value. E.g. 16pt, 17pt, 18pt and 19pt all gave the exact same result. Why are there just a few available options here?

In my naive understanding, fonts are vector graphics, so there should be no problem in scaling them to any arbitrary value.

My best guesses for why this is the case are

  1. It is not so easy. Each font size has its own specific properties and fine tuned algorithms for type setting.
  2. TeX is from a time where it was not so easy to use vector graphics as careless as today. Maybe fonts where not even vector graphics back then.

I do not have much background in the theory or history of type setting. So I might have used very wrong assumptions.


Note: I completely rewrote this question after some suggestion to clarify my intentions and to sort out the several different sub questions. I did this after some answers were given. However, I made sure that the current answers still fit the question.

  • 2
    \fontsize{13pt}{14pt}\selectfont? Although that's not the optimum. – TeXnician Jun 23 '17 at 16:06
  • 1
    Many fonts are designed for specific sizes. This a font designed for 6pt might not look particularly nice optically scaled to 12pt, thus the snapping to sizes i mentioned. Fix-cm does something similar to allowing the closest font size to be optically scaled to the font size required. – daleif Jun 23 '17 at 16:19
  • 4
    You're confusing two different things: one is about whether arbitrary font sizes are possible in LaTeX (they are, although scaling isn't always ideal) and the other is about why document classes have limited fontsize options. Since the premise of the first question is incorrect, perhaps you should refocus the question on the second question. – Alan Munn Jun 23 '17 at 16:26
  • 1
    The documentation that you say you saw is wrong, and there is no way to determine the second value, it is your choice. – David Carlisle Jun 23 '17 at 16:26
  • 1
    It's completely fine to revise this one, especially since nobody has answered yet. This is one of the reasons for comments, so that questions can be improved. – Alan Munn Jun 23 '17 at 16:32
26

You can specify any size that you like, for example

\fontsize{2cm}{2in}\selectfont

for a 2cm font on a 2in baseline.

However some fonts (not many these days) are only available in a fixed set of sizes. By default the initial Computer Modern fonts are restricted as originally they were only available as bitmap fonts and while they could be generated at different sizes you would not want to generate arbitrary bitmaps and fill your disk.

If you put

\RequirePackage{fix-cm}

at the top of the file, Computer Modern is also allowed at any size.

Most other fonts typically used with TeX are by default allowed at arbitrary sizes.

Note that most classes offer a restricted set of font sizes not because it is technically hard to load a font at another size but because for each size supported you need to specify matching font sub/super script sizes, matching vertical spaces around lists etc, and also it is good document practice to use a small consistent set of font sizes not have different sized fonts all over the document.

So in the standard classes font choices are restricted in two ways, firstly a fixed set of named sizes \tiny, ... \normalsize, ... \huge ... these do not just set the font size as would happen with \fontsize{}{}\selectfont they also set matching spaces and math fonts. A more restricted set of three size options for the class 10pt,11pt,12pt are only loosely related to choosing a font size at all, they are named after the default font size but the class options set up page size, heading choices math font setup, so they are really best thought of a name of an option rather than a length.

  • Thank you very much for this good answer! In my naiv understanding, using a bigger font was just scaling up everything. At this moment I cannot really imagine why this should not lead to aesthetically appealing results. – M. Winter Jun 23 '17 at 16:45
  • @M.Winter it's not just scaling for several reasons, firstly the fonts may not scale with cm if you select a 5pt font it is not the 10pt font scaled down but a font designed to be read at that size, similarly if you look at the spaces used in the standard classes they are not scaled in exact proportion, someone actually looked at a 15pt list on the standard page sizes and decided how much space it should have, – David Carlisle Jun 23 '17 at 16:50
  • 6
    @M.Winter It's all about the optical human interface to the font...since small things are harder to read, the font designer adjusts things to help the reader at those sizes. See tex.stackexchange.com/questions/328228/… to appreciate better... \tiny font is easier to read than a scaled down \normalsize font – Steven B. Segletes Jun 23 '17 at 16:53
  • @M.Winter another consideration is that if you set up the math fonts for any arbitrary font size change, that each time you would have to load up to 16 math families in three sizes (text, subscript and subsubscript) and when latex was designed you would run out of memory very soon if you did this for more than a few sizes. – David Carlisle Jun 23 '17 at 16:54
  • @M.Winter when "type" was a physical thing (i.e. pieces of metal) there was no scaling - there was a set of fixed sizes, just like mechanical nuts and bolts (try buying an 11.3mm diameter bolt in your local DIY shop!) Some of the scaling issues also depend on the display or printing technology - real "ink on paper" always spreads and runs to some extent, and "computer screens" have a fixed pixel resolution. Professional fonts are designed so that at "standard" sizes, those limitation don't create annoying visual artefacts. Arbitrary scaling is too hard to do, to get the same quality output. – alephzero Jun 24 '17 at 3:18
14

Why is it that font sizes seems to be of a quantized character instead of being continuous? This seems not to be restricted to TeX, but an overall thing in typography.

Indeed, the "quantized character" of font sizes is not restricted to TeX and friends, it's widely observed in (good) typography. Basically, when you change font sizes (say, for headers, or for footnote material), you want to make the size change both noticeable and yet "not too jarring" as well.

  • For text material, a well-established typographic convention is to change the font sizes in a geometric progression of 20% increments/decrements. E.g., if the basic font size is 10pt, \footnotesize is 20% (linearly) smaller (8pt), while \large and \Large are 20% and 44%, resp., linearly larger (12pt and 14.4pt, resp.). And so on.

  • For math material, the typographic convention implemented by TeX and friends is to make subscript and superscript items 30% linearly smaller, and sub-subscript and super-superscript material 30% linearly smaller yet again, for a total reduction of roughly 50% below the basic font size. (0.7 times 0.7 = 0.49.) Thus, if the basic font size is 10pt, \scriptsize is 7pt and \scriptscriptsize is 5pt.

Why step sizes of 20% for text material rather than, say, 22% or 18%? I trust nobody is going to claim that 20% represents the unique solution to some well-specified visual optimization problem. The step sizes were arrived at over long periods of time, through various trial and error processes. My guess is that size changes of about 10% (or less) are probably too small to be easily recognized, while sizes of about 30% (or more) are too jarring for "average" aesthetics. 20% was probably arrived at as "something that looks ok to most readers".

If you really, really believe that the step size progression ought to use 18% instead of 20%, it's actually not too much effort to achieve that. However, virtually none of your readers will take notice, while the few who do are unlikely to appreciate the effort you've put in.


You also asked an entirely separate question, which was about why the article document class offers only 10pt, 11pt, and 12pt as the main font sizes. I suppose that's a legacy of the fact that this document class and its siblings, the report and book classes, have been around since the days of LaTeX2.09 (and probably even longer). Back in the 1980s, practically the only font family available for use with LaTeX was Computer Modern, with (you guessed it) 10pt, 11pt (really: 10.95pt, i.e., the geometric mean between 10pt and 12pt) and 12pt as the main text font sizes. More-recent document classes offer additional choices. For instance, the memoir document class offers the following default font size options: 9, 10, 11, 12, 14, 17, 20, 25, 30, 36, 48, and 60 [!] points. The KOMA-Script document classes nowadays let you specify just about any size. Not all font size choices will generate readable output, though. E.g, if you set the main document size to 3pt, absolutely nobody will be able to read a word of what you wrote unless you also provide your readers with high-powered magnifying glasses...

  • 2
    The discrete steps were an obvious technical limitation with metal type. – egreg Jun 23 '17 at 17:02
  • 1
    @egreg - Indeed, if 12pt were the main document font size and a 20% step size is deemed optimal, one should use 9.6pt for \footnotesize. However, all LaTeX document classes I'm familiar with which provide a 12pt main font size option use 10pt rather than 9.6pt for \footnotesize -- presumably because Computer Modern offers 10pt but not 9.6pt as well which, in turn, probably goes back to the limitations of metal type. – Mico Jun 23 '17 at 18:07
  • 2
    @Mico -- all the choices that knuth made were based on the traditions of metal type, and in particular, of what was available from monotype. take a look at this paper: ultrasparky.org/school/pdf/Rhatigan_Monotype_4-line_math.pdf and also google "monotype math typesetting" for more references. – barbara beeton Jun 24 '17 at 0:39
  • @barbarabeeton - An excellent point! For extra clarity, I should maybe have written that the Computer Modern fonts, at sizes from5pt to 17pt, were based on and influenced by metal type precursors from Monotype which, in turn, incorporated lots of typographic traditions related to font size changes. – Mico Jun 24 '17 at 5:43
  • 1
    @EmanuelePaolini - Moreover, in the somewhat distant past, step size calculations based on a multiplicative factor of 1.2 must be a lot easier to carry out (and almost certainly a lot less error prone) than those based on a factor of 1.1892, right? :-) – Mico Jun 28 '17 at 8:07
5

Well... I'm agree with Mico when he said your question involved two different issues: on the one hand the way fonts are scaled to generate the visual structure of a document and on the other hand the (limited) set of sizes available in the standard classes.

I will start answering to the first without relying on what has been said in previous answers and comments.

The percentages given by Mico are a sample of how a typographic scale works, in the case of TeX, is parameterized as a function of a single variable or parameter, which is the size of the base text, however takes into account that the proportions of the scale depend on optical considerations that vary with each typography, inasmuch as their own proportions and strokes may need slightly different adjustments, E.G. a large x height implies ascending strokes shorter than a letter with an x height smaller and that fact can make that two typographies of the same size require different adjustments to obtain the same visual result.

I understand that TeX and LaTeX, in addition, are designed in the best editorial tradition, so Donald Knuth was based on the tradition of the Monotype metal types as Barbara Beeton points out.

In this sense, it is necessary to see that good editorial design does not have a quantic or continuous approach, it is a question of making use of a congruent way of a scale that allows the size of the page, the type box and the typography chosen to harmonize each.

When, instead of using LaTeX, you make use of some DTP like Scribus, InDesign or QuarkXpress (does QuarkXpress still exist?), you need to choose the base grid around which the base body text size must fit for the reading text, and each one of the headings, the text in quotations or footnotes. You must adjust the dimensions of the typographic box so that it matches the final size of the page and that the font size is adequate to form lines of text of the necessary length and fit with the above requirements I have just outlined.

Any change in these decisions may involve a complete redesign of everything, and since this approach is WYSIWYG, it requires a lot of time to make all these changes, in addition to greater knowledge to achieve a result comparable to that achieved with TeX.

In this sense we can say that TeX is a tool rather to design parametrically, and therefore allows to make changes with a facility that people who live in the visual logic of the DTP can't even imagine.

The connection with your second question is on the scale or scales used in design, a very interesting example you can find in Le Modulor.

Since TeX makes use of a parametric design, it is not surprising that the scale it uses is a function of a single parameter, that is, the base body of the text. In this way, by choosing that value, you can adjust the entire scale without having to worry about doing it manually as in a DTP.

I don't know what you think, but IMHO, this is wonderful and allows to obtain a professional typographic quality to any n00b who has neither the time nor the desire to delve into these details.

However, standard classes allow you a value for the base text of between 10 and 12 points, it is not a willful limitation or the product of a technical limitation almost impossible to solve, it is, again, part of a deep-rooted editorial tradition, which dictates that the base body for a book, ranges from 10 to 12 points, depending on the typography chosen and other considerations such as line spacing, width of typographic box, etc.

I must confess that when I saw the first comments to your question I was surprised that no one mentioned KOMA Script, again I thank MICO that he has finished with that omission.

Briefly, I have to say that KOMA Script is a bundle of packages that IMNSHO, greatly improves the capabilities of standard classes, corrects their errors and therefore escapes their limitations. You can choose a font size for the base text smaller than 10 pt and much greater than 12 pt retaining the scales, which you will find, I think, quite useful.

Thinking in the example given by samcarter in the comments to your question, we can get something like this:

\documentclass[fontsize=14pt,paper=a4,DIV=calc,BCOR=5mm]{scrartcl} 
\usepackage{lmodern}  
\begin{document} 

\section{Test}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.  
\end{document}

In a nutshell, as you can see, TeX, and therefore LaTeX, are designed according to best editorial practices, one of them is to use a 10 pt to 12 pt text size for the reading text in a document, from which all the other sizes you can use are calculated. Thus, unlike a DTP or a word processor, you forget to waste time adjusting margins and font sizes, not to mention the format inconsistencies.

  • @Mico I meant that these percentages may vary slightly depending on the typography chosen. I did not say it by the way TeX scales the letters in that percentage, but thinking of a manual adjustment of a typographic scale. In addition the variances would be small, for example, instead of 20% it was 21.02% or something like that. – Aradnix Jun 25 '17 at 5:18
  • @Mico Well, I didn't mean to offend or disqualify you or say you were wrong, I was rather "thinking aloud" about different typographies that because of their design required optical adjustments that might vary slightly from the values you wrote. I didn't think of Computer Modern but rather a lot of fonts that escape the proportions and design of the default font in LaTeX. I regret that I have hurt sensitivities and I hope this wording would be clearer. Regards. – Aradnix Jun 25 '17 at 8:16
  • 1
    No worries -- you neither offended me nor hurt my feelings. I was just genuinely unsure as to what you were trying to say. I like the revised paragraph -- +1. :-) – Mico Jun 25 '17 at 10:13
2

To complement other answers. Originally TeX fonts were encoded in MetaFont. MetaFont contains a description of how glyphs and characters should be outlined. Moreover different font sizes are not simply rescaled versions of each other: small fonts can have relatively larger pen strokes or other variations to be more readable (see https://en.wikipedia.org/wiki/Metafont).

When a new font size was used, the TeX engine required the whole font to be computed (in raster form) from the metafont description. At that time this required a lot of time and a lot of disk space.

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.