Nov 24, 2008

Extract font outlines

I find this tip from the talk: Doing Physics with Mathematica 6 by Michael Trott

 

GCText[text_,tsize_]:= ImportString[ExportString[Cell[TextData[StyleBox[
text, FontWeight->"Bold",FontFamily->"Helvetica"]], "Text", tsize], "PDF"]][[1]]

outlines =  (First /@ Cases[GCText["ABC", 20], _Polygon, Infinity]);

Graphics3D[{FaceForm[],EdgeForm[Black],Polygon[Map[Append[#, 10]&, outlines, {-2}]]}];

for fun:

image