1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- XML file produced from file: manual.tex
using Hyperlatex v 2.6 (c) Otfried Cheong
on Emacs 21.3.1, Tue Sep 26 20:03:47 2006 -->
<head>
<title>Ipe Manual -- 11 Using Truetype fonts</title>
<style type="text/css">
.maketitle { align : center }
div.abstract { margin-left: 20%; margin-right: 10%; }
h3.abstract { align : center }
div.verse, div.quote, div.quotation {
margin-left : 10%;
margin-right : 10%;
}
</style>
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffe6">
<table width="100%" cellpadding=0 cellspacing=2><tr><td bgcolor="#99ccff"><a href="manual_33.html"><img border="0" alt="12 Unicode text" src="next.png"></a></td><td bgcolor="#99ccff"><a href="manual.html"><img border="0" alt="Top" src="up.png"></a></td><td bgcolor="#99ccff"><a href="manual_31.html"><img border="0" alt="10 Troubleshooting the LaTeX-conversion" src="previous.png"></a></td><td align="center" bgcolor="#99ccff" width="100%"><b>11 Using Truetype fonts</b></td></tr></table>
<h1>11 Using Truetype fonts</h1>
<p>To make PDF presentations that are as "fancy" as the PowerPoint
presentations of competing speakers one needs to use fancy fonts.
It's not hard to find nice fonts, but they are mostly in Truetype
(TTF) format. This section explains how to use TTF fonts in Ipe.
<p>Ipe relies on Pdflatex to translate the text source representation
into a string of PDF operators and font subsets, that can then be used
to generate Postscript, PDF, and to display the text on the screen.
Ipe can therefore use any font that Pdflatex can handle, and to use a
TTF font we just have to add it to Pdflatex's font reportoire.
<p>I've made a <a href="http://ipe.compgeom.org/pdftex.html">webpage</a>
explaining the steps necessary to add a TTF font to Pdftex's font
repertoire, using the <i>lhandw.ttf</i> font as an example. Let's
assume that you have performed these steps, and that you can access
the font when running Pdflatex normally (not from Ipe).
<p>We are then ready to try the font from within Ipe. Let's first assume
you only want to use the new font in a few places in your Ipe
document. You should define a command analogous to <code>\textrm</code> to
switch to the new font. Open the <em>Document properties</em> dialog in
the <em>Edit</em> menu, and add this line to the <em>Latex preamble</em>:
<pre>
\DeclareTextFontCommand{\textlh}
{\fontencoding{T1}\fontfamily{lhandw}\selectfont}
</pre>
You can now use <code>\textlh</code> inside Ipe text objects to typeset in
Lucida-Handwriting.
<p>Finally, let's make a multi-page presentation typeset wholly using
Lucida-Handwriting. This declaration in the Latex preamble will
change the document fonts:
<pre>
\renewcommand{\encodingdefault}{T1}
\renewcommand{\rmdefault}{lhandw}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}
</pre>
Note that this switches all text fonts to TTF or Postscript fonts.
This is necessary, as we use the <code>T1</code> encoding (an 8-bit
encoding) for Lucida-Handwriting. Keeping Computer-Modern as the font
for <code>\textsf</code> or <code>\texttt</code> would cause LaTeX to load the
<code>T1</code> version of Computer-Modern. These are bitmapped "Type3"
fonts, which Ipe cannot handle.
<hr />
<table width="100%" cellpadding=0 cellspacing=2><tr><td bgcolor="#99ccff"><a href="manual_33.html"><img border="0" alt="12 Unicode text" src="next.png"></a></td><td bgcolor="#99ccff"><a href="manual.html"><img border="0" alt="Top" src="up.png"></a></td><td bgcolor="#99ccff"><a href="manual_31.html"><img border="0" alt="10 Troubleshooting the LaTeX-conversion" src="previous.png"></a></td><td align="center" bgcolor="#99ccff" width="100%"><b>11 Using Truetype fonts</b></td></tr></table></body></html>
|