Possible Duplicate:
Outlined characters

There are many ways how to change whole character color. I want edge color to be different from body color of character. How to do it?

It is possible to make character not from one color? (To make effects like "shadowed" character.)


You can use the contour package for this. If you load it with the outline option, you'll get "proper" outlines (as opposed to several offset copies of your text).


\textcolor{yellow}{\contour{blue}{Some Words}}

Another alternative is package pdfrender:

  • It needs pdfTeX or LuaTeX in PDF mode.
  • It works for Type 1 fonts by changing their rendering mode, thus PK fonts or rules are not supported.
  • Paragraphs, line breaks and even page breaks are supported.
  • Works with LaTeX or plain TeX based formats.
  • Available both as switch \pdfrender and as macro \textpdfrender similar to \textcolor.

Example file:


}{Hello World}


  • Oh, that looks interesting! Three questions: 1. Is there a way to put the stroke behind the text (thick strokes will otherwise drown out the fill colour)? 2. It seems that \pdfrender acts as a switch, changing the drawing style for all text that follows. Is there a way to apply the style only to a selected text segment? 3. Do you see a way of applying the pdfrender style to things like fraction lines (see tex.stackexchange.com/questions/8602/…)?
    – Jake
    Dec 5 '12 at 13:47
  • 2
    @Jake (2) Use \textpdfrender instead of \pdfrender... Dec 5 '12 at 13:48
  • @Jake Even with \textpdfrender, the effect of clip actions (as TextRenderingMode=7) overflows the given text segment... May be a bug. Dec 5 '12 at 14:19
  • 3
    @Jake Ad 1.: You could put the fill variant over the stroke variant. But this looses line and page breaks. Ad 2.: Mistake, fixed, use \textpdfrender. Ad 3.: No, the feature works with glyphs from Type 1 fonts. Other things like rules or PK fonts are not supported. Dec 5 '12 at 14:33

pst-text (part of the pstricks bundle) has some text-manipulation capability, including turning text into paths:

enter image description here

\usepackage{pst-text}% http://ctan.org/pkg/pst-text
\pscharpath[linecolor=red,linewidth=.4pt,fillstyle=solid,fillcolor=green]{\Large Some text}

More (illustrative) examples are contained within the pst-text documentation.


And here comes a ConTeXt example using the effect feature with the outer setting.



\startcolor [green]%
\hbox to\zeropoint{Hello World!}%
\startcolor [blue]%
\hbox to\zeropoint{%
  \starteffect [outline]%
    Hello World!



Not the answer you're looking for? Browse other questions tagged or ask your own question.