[Tex/LaTex] Change fontsize in TikZ figure

fontsizetikz-pgf

I had my documentclass set at 10pt and I import my TikZ figures just with \input. Everything was working fine but now I want to have 11pt in the document and all my nodes are bigger because the fonts are now bigger and everything is distorted.

So, how can I set the fontclass (or whatever name it has) in TikZ to 10pt so the normalfont in the figures is 10pt as I had designed everything with in mind instead of 11pt that would be the actual document?

Best Answer

If you do not change the font size within your pictures, it is fairly simple and you could just try this:

\documentclass[11pt]{article}
\usepackage{tikz}
\tikzset{
  font={\fontsize{10pt}{12}\selectfont}}
\begin{document}
  This is some text.

  \begin{tikzpicture}
    \node {This is a node.};
  \end{tikzpicture}

  This is some text.
\end{document}

size switch

Obviously, if you use commands like \small etc. within pictures, things are more complicated.

Related Question