Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This is an unusual question regarding rendering of a font with a specific 3D-esque style in LaTeX, XeLaTex, or any other TeX flavor.

I was looking at some fonts the other day and I came across one of which I am very fond:

enter image description here

There are many beautiful examples of this font, such as:

enter image description here

However, each of these examples has a 3D quality to it. The font is both shaded and colored, which make it look tolerable. In regular, two dimensions it looks like this: enter image description here Which is hardly anything to write home about. My question is simple: how can I get LaTeX, XeLaTeX, or any other flavor, to render a font with a 3D effect like the one in the pictures above? Is it possible or would it have to be done in an image editor?

Unfortunately, Googling has yielded poor results and I have began to think that it may be hopeless, though documents like this one make me think it may be possible.

[EDIT]

For further clarification, the 3D effect that is of interest is the shading on the characters of the font. In the first image, this effect can be observed on the letters of the word "Octant", which shades each character on the right side, as though there is a light source to the left. Another example of the effect is the words "Griffin & Quayle" in the second image.

share|improve this question
1  
for colo(u)r specified within the font, see this discussion on the xetex mailing list tug.org/pipermail/xetex/2013-August/024681.html –  David Carlisle Feb 27 at 14:43
1  
See also tex.stackexchange.com/q/85050/86 –  Loop Space Feb 27 at 15:38
    
That is a lot closer to what I was after. I'll have to have a good look at it and see if I can adjust the answer to produce the desired result. It looks very promising. –  Tikzsplosion Feb 27 at 16:21
1  
You’d have a much easier time with a font that comes in layers (e.g., myfonts.com/fonts/canadatype/roma); then you’d simply assign each layer a color through fontspec and put layer over layer with \llap. –  Thérèse Feb 27 at 20:33
add comment

2 Answers

works only with latex->dvips->ps2pdf:

\documentclass[landscape]{article}
\usepackage{geometry}
\usepackage{pst-light3d}
\DeclareFixedFont{\Bf}{T1}{ptm}{b}{n}{3cm}
\begin{document}
\psframebox[fillstyle=solid,fillcolor=blue!20!black!40,framesep=20pt]{%
 \PstLightThreeDText[fillstyle=solid,fillcolor=white!90]%
   {\Bf 3D font in L\kern-35pt\raisebox{0.7ex}{A}\kern-15pt\TeX}}
\end{document}

enter image description here

share|improve this answer
    
That certainly looks 3D, but does not come close to the particular 3D effect I was hoping to emulate. In particular, there is no shading on the characters themselves, only on the added '3D' part. –  Tikzsplosion Feb 27 at 15:15
add comment
up vote 1 down vote accepted

I did some additional research into layered fonts (thanks Thérèse) and discovered that they are exactly what I need. Switching gears to XeLaTex, I found a free layered font and started playing around.

The font is called Tribbon, and while it looks nothing like the font I was interested in, it can mostly achieve the same effect. I downloaded, installed the font, and from there it was simple to make it overlay in different colors at different opacities. Here is a nice example I whipped up:

\documentclass{article}
 \usepackage{xcolor}%for color change
\usepackage{pgf}%must have for the transparency
\usepackage{fontspec}%for font specification

\definecolor{mysilver}{RGB}{208,208,208}

 \begin{document}
Tribbon is a layered font.\\
{\fontspec{Tribbon A}Tribbon A}\\
{\fontspec{Tribbon B}Tribbon B}\\
{\fontspec{Tribbon C}Tribbon C}\\
\\
By combing the layers using different colors and opacities, using \rlap to overlay the text, we can achieve a shading effect on the characters in the font. For example, combining the following:\\
{\color{mysilver}\fontspec{Tribbon B}\huge THIS IS A SAMPLE} \\ {\pgfsetfillopacity{0.3}\color{black}\fontspec{Tribbon C}\huge THIS IS A SAMPLE} \\ {\pgfsetfillopacity{0.4}\color{mysilver}\fontspec{Tribbon A}\huge THIS IS A SAMPLE}\\
\\becomes\\
\\
\rlap{\pgfsetfillopacity{1}\color{mysilver}\fontspec{Tribbon B}\huge THIS IS A SAMPLE}{\pgfsetfillopacity{0.3}\color{black}\fontspec{Tribbon C}\huge THIS IS A SAMPLE}\llap{\pgfsetfillopacity{0.4}\color{mysilver}\fontspec{Tribbon A}\huge THIS IS A SAMPLE}\\

\end{document}

Which produces: enter image description here

This method would require fine tuning for each font and may require additional tuning based on color and need. That said, converting this to a macro that takes text and a color as inputs, and outputs shaded text in a layered, 3D-esque font should be trivial. The only difficulty is finding the right layered font.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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