Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 ?

share|improve this question
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 at 22:12
1  
I would say thank you for the quote even if we are not suppose to say thanks here. :-) –  Sergio Parreiras May 14 at 22:40

1 Answer 1

up vote 13 down vote accepted

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:

\documentclass[border=3pt]{standalone}
\usepackage{tikz}
\usepackage{fix-cm}

\begin{document}

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

\end{document}

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.

share|improve this answer
    
The second text is bit bolder. Does that matter? –  subham soni May 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 at 4:17
    
@GonzaloMedina: What are the #1 and #2 arguments in font=\fontsize{#1}{#2}\selectfont. Width and height? –  Sergio Parreiras Jun 3 at 17:17
1  
@SergioParreiras font size and value for baseline skip. –  Gonzalo Medina Jun 4 at 17:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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