# Scalefnt and tkz

I am trying to scale the font in a tikz picture using the scalefnt (compare this question) package. However for tkz obejects it doesn't work, for example:

\documentclass{minimal}
\usepackage{scalefnt}
\usepackage{tkz-euclide}

\begin{document}

{\scalefont{2}
\begin{tikzpicture}
\path (2,0)  node{works};
\tkzDefPoint(0,0){A}
\tkzDrawPoint(A)
\tkzLabelPoint(A){test}
\end{tikzpicture}
}
\end{document}


Any ideas how to fix this?

-

Looking at the file tkz-obj-points.tex you find that the style for the label of points is set using

\tikzset{label style/.style=\tkz@euc@pointpos,\tkz@euc@labelcolor,font=\normalsize}}


so you can change the font= key from \normalsize to the desired font:

\documentclass{article}
\usepackage{scalefnt}
\usepackage{tkz-euclide}

\makeatletter
\tikzset{label style/.style={\tkz@euc@pointpos,\tkz@euc@labelcolor,font=\scalefont{2}}}
\makeatother

\begin{document}

\begin{tikzpicture}[every node/.style={font=\scalefont{2}}]
\path (2,0)  node{ works};
\tkzDefPoint(0,0){A}
\tkzDrawPoint(A)
\tkzLabelPoint(A){test}
\end{tikzpicture}

\end{document}


I would suggest to make the change in the font size using every node/.style, as I did in my example code.

-
@Altermundus: now that I see how you set the font in label style/.style, wouldn't it be better to use something like font=\tkz@euc@labelfont, with a convenient initial value, instead of a fixed font=\normalfont? –  Gonzalo Medina Jun 25 '11 at 23:10
Yes I can look at this request but the idea is to use the same font with the same size in the document and in the picture. The size of font was not my first priority ! :) –  Alain Matthes Jun 26 '11 at 5:10