# How to get the tikz/font pgfkey value and pass is to \pgfnode command

Let's say that I'm writing a decoration where I use the \pgfnode command in it. It works well but if I change the pgfkey TikZ/font to any dimension, it is not passed to the nodes in the decoration. How can I avoid it?

-

Searching on tikz.code.tex I found the following line:

\tikzoption{font}{\def\tikz@textfont{#1}}


so the tikz/font value is stored into \tikz@textfont. To use it into my node in decoration, I write:

{
\pgftransformshift{\pgfpoint{<x value>}{<y value>}}
\tikz@textfont
\pgfnode{rectangle}{south}{<text>}{<node name>}{\pgfusepath{<use path option>}}
}


That's all

-