I'm using tikz to create color boxes containing text. However I haven't been able to set font size within these boxes using pts.
I found a snippet in this question that defines a Boxed command:
\newcommand{\Boxed}[2][]{%
% #1 = box draw/fill options
% #2 = text
\settowidth{\LengthOfText}{\mbox{#2}}%
\pgfmathsetlength{\LengthOfTextExceedingLineWidth}
{\LengthOfText-\linewidth}
\pgfmathsetlength{\TextWidth}{\LengthOfTextExceedingLineWidth > 0pt ? \linewidth : \LengthOfText}%
\begin{tikzpicture}[baseline, inner sep=2pt, outer sep=0]
\tikzstyle{every node}=[font=\small]
\node [text width=\TextWidth, #1] (Origin) {#2};
(Origin.south west) rectangle (Origin.north east) ;
\end{tikzpicture}%
}
I've modified it a little, however using a tikzstyle I'm only able to set font to things like \small, \tiny, etc. I would like to set font size to 10pt.

tcolorbox. – Jul 17 '13 at 07:28mdframedbut I couldn't get it right either, what's wrong with using tikz? sorry I'm still a noob in Latex, thanks. – maraujop Jul 17 '13 at 07:51Tikzis relevant, check this question and associated answers: http://tex.stackexchange.com/questions/48276/latex-specify-font-point-size – Roelof Spijker Jul 17 '13 at 08:28