If I have:
Graphics[
{Red, EdgeForm[Directive[White, Thick]],
Inset[Style[Text@"Hi!", 44], {0, 0}]}, Background -> Black
]
I unfortunately get:
Which as you can see does not have a thick white outline. Is there a way to get around this since EdgeForm
clearly does not work?
By the way, I would rather NOT delve into making a larger, white "Hi"
and then putting the red one on top. That's just not elegant.
MMA 8.0.1 for students
OS Windows 7 64-bit
Answer
Import text as a FilledCurve in graphics, using PDF as an intermediate format. Below are modified examples from Documentation Center:
text = First[First[ImportString[ExportString[Style["Hi", Italic, FontSize -> 24,
FontFamily -> "Times"], "PDF"], "PDF", "TextMode" -> "Outlines"]]];
Outline fonts using different edge and face forms:
Graphics[{EdgeForm[Directive[White, Thick]], Red, text},
Background -> Black, PlotRange -> {{-5, 25}, {-0, 20}}]
3D text effect:
Graphics[{EdgeForm[Opacity[0.5]], Table[{ColorData["TemperatureMap"][t],
Translate[text, 4 {-t, t}]}, {t, 0, 1, 1/10}]}, ImageSize -> Medium]
Comments
Post a Comment