If one needs to slightly increase the size of the text in a TikZ node. What are the pros and cons of using scale= in the style options instead of changing the font size with the usual LaTeX\TeX macros: \Huge, \Large and \large ?

  • 1
    Since you mentioned that you had recently started to read the TeXbook (if I recall correctly from another question), I just found a quote from Knuth regarding this issue and I've added it as an edit to my answer. – Gonzalo Medina May 14 '14 at 22:12
  • 2
    I would say thank you for the quote even if we are not suppose to say thanks here. :-) – Sergio Parreiras May 14 '14 at 22:40

Scaling affects all the glyph strokes and this can be not very pleasant (some strokes will be unnecessarily and excessively thick); changing the font size using the font switches or \fontsize produce more harmonious results.

Compare the results in the following simple experiment; the upper line uses \fontsize; the lower line uses scale:



\begin{scope}[scale=12,transform shape]
\node (A) {1234AQMI};
\node[font=\fontsize{120}{144}\selectfont] at (0,4) (B) {1234AQMI};


enter image description here

Of course, for a small scaling factor the difference can be almost imperceptible, but I'd use the font switches for better results unless, of course, one is specifically after the effect produced by scaling.

Addressing this same situation, D. Knuth mentions on the fourth bend sign on page 16 of the TeXbook:

What's the difference between cmr5 at 10pt and the normal 10-point font, cmr10? Plenty; a well-designed font will be drawn differently at different point sizes, and the letters will often have different relative heights and widths, in order to enhance readability[...]

It is usually best to scale fonts only slightly with respect to their design size, unless the final product is going to be photographically reduced after TeX has finished with it, or unless you are trying for an unusual effect.

  • The second text is bit bolder. Does that matter? – subham soni May 14 '14 at 4:16
  • 1
    @subhamsoni of course it matters; that's what my answer shows. The second line produced with scale is not as harmonious as the first one using \fontsize. – Gonzalo Medina May 14 '14 at 4:17
  • 1
    @SergioParreiras font size and value for baseline skip. – Gonzalo Medina Jun 4 '14 at 17:17
  • 2
    if you had used (0,-4) the order in the code and the order in the picture would line up, making it easier to follow – ted Apr 11 '15 at 23:06
  • 1
    instead of specifying the absolute font size, you can also use font=\small or any of the relative font sizes – Gunther Struyf Feb 10 '16 at 17:52

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.