<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>(b)logophile &#187; fonts</title>
	<atom:link href="http://www.logophile.org/blog/tags/fonts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.logophile.org/blog</link>
	<description>blog of a logophile (not "logos", but "λόγος")</description>
	<lastBuildDate>Sun, 05 Feb 2012 08:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Another TeX font hint</title>
		<link>http://www.logophile.org/blog/2010/05/17/another-tex-font-hint/</link>
		<comments>http://www.logophile.org/blog/2010/05/17/another-tex-font-hint/#comments</comments>
		<pubDate>Mon, 17 May 2010 21:10:22 +0000</pubDate>
		<dc:creator>tikitu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[(La)TeX]]></category>
		<category><![CDATA[complicated]]></category>
		<category><![CDATA[fonts]]></category>

		<guid isPermaLink="false">http://www.logophile.org/blog/?p=897</guid>
		<description><![CDATA[New to ctan: the TeX Font Errors Cheatsheet, by Nico Schlömer. It&#8217;s for people trying to install fonts for vanilla (La)TeX (as I noted recently, there is an easier way), or for unfortunates whose already-installed fonts somehow break. It gives a chart showing what files TeX looks for when, cross-indexed to the errors that it [...]]]></description>
			<content:encoded><![CDATA[<p>New to <a href="http://www.ctan.org/">ctan</a>: the <a href="http://ctan.org/tex-archive/info/tex-font-errors-cheatsheet/">TeX Font Errors Cheatsheet</a>, by Nico Schlömer. It&#8217;s for people trying to install fonts for vanilla (La)TeX (as I <a href="/blog/2010/04/28/some-notes-on-fonts/">noted recently</a>, there is an <a href="http://ctan.org/tex-archive/macros/xetex/latex/fontspec/">easier way</a>), or for unfortunates whose already-installed fonts somehow break. It gives a chart showing what files TeX looks for when, cross-indexed to the errors that it gives when it doesn&#8217;t find things. Handy, if things are going wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logophile.org/blog/2010/05/17/another-tex-font-hint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some notes on fonts</title>
		<link>http://www.logophile.org/blog/2010/04/28/some-notes-on-fonts/</link>
		<comments>http://www.logophile.org/blog/2010/04/28/some-notes-on-fonts/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 18:39:20 +0000</pubDate>
		<dc:creator>tikitu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[(La)TeX]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.logophile.org/blog/?p=878</guid>
		<description><![CDATA[Recently I&#8217;ve discovered some fun new things about fonts, in LaTeX and under linux. (Yes, it&#8217;s another geek-out post. Sorry mum.) All this stuff can be found online (that&#8217;s where I found it), but it&#8217;s a bit scattered around. And I can&#8217;t remember where any of it is. Summary: XeTeX gives LaTeX access to non-TeX-installed [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve discovered some fun new things about fonts, in LaTeX and under linux. (Yes, it&#8217;s another geek-out post. Sorry mum.) All this stuff can be found online (that&#8217;s where I found it), but it&#8217;s a bit scattered around. And I can&#8217;t remember where any of it is.</p>

<p>Summary:</p>

<ul>
<li><a href="http://scripts.sil.org/xetex">XeTeX</a> gives LaTeX access to non-TeX-installed fonts, and <a href="http://ctan.org/tex-archive/macros/xetex/latex/fontspec/"><code>fontspec</code></a> makes it easy.</li>
<li>XeTeX also lets you write in unicode; <a href="http://ctan.org/tex-archive/macros/latex/exptl/biblatex/"><code>biblatex</code></a> will play nicely if you use <a href="http://ctan.org/tex-archive/biblio/biber/"><code>biber</code></a> instead of <code>bibtex</code> as the backend.</li>
<li><code>fc-list</code> lists installed fonts (giving the names that XeTeX needs).</li>
<li><a href="http://fontforge.sourceforge.net/"><code>fontforge</code></a> will display every glyph in the font, nice and big (and you can print the result).</li>
<li><a href="http://fontmatrix.net/"><code>fontmatrix</code></a> has a <em>very</em> slick interface for font-browsing, from &#8220;tag-this-font&#8221; to &#8220;inspect-this-glyph&#8221;.</li>
<li>All of these except <code>biblatex</code> and <code>biber</code> (which are still in beta) are packaged for various Linux flavours; <code>biblatex</code> installation is easy, for <code>biber</code> I vaguely recall that I installed via CPAN, which is rather a pain. There may be easier alternatives by now though. </li>
</ul>

<p><span id="more-878"></span></p>

<h2>XeTeX lets you use all your fonts in LaTeX</h2>

<p>XeTeX is a TeX replacement; you compile your document with <code>xelatex</code> if you&#8217;ve been using <code>pdflatex</code>, and nothing much changes apart from that. But behind the scenes quite a lot happens; among other things, you get to use the <code>fontspec</code> package, which works with the font names that the rest of your Linux system knows about. (Another, less positive, feature of the move is that you XeTeX is incompatible with <a href="http://ctan.org/tex-archive/macros/latex/contrib/microtype/"><code>microtype</code></a>. Can&#8217;t have everything&#8230;)</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">article</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">fontspec</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">xunicode</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">xltxtra</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\setmainfont</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Mapping=tex-text</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Verdana</span><span style="color: #E02020; ">}</span></pre></div></div>


<p>If you pick a font with italic and bold alternatives, <code>\textit{}</code> and <code>\textbf{}</code> and so on will just work. Just like that. Which is nice.</p>

<p>If your font has Greek and Russian characters (Greek <em>text</em> characters, not a math alphabet), you can just type &#8216;em:</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;">Lorem ipsem and so forth; ο ξυπόλητος πρίγκιπας; 
зону большого над, языке а; 
italic: <span style="color: #E02020; ">\</span><span style="color: #800000;">textit</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">in Latin και στα Ελληνικά</span><span style="color: #E02020; ">}</span>,</pre></div></div>


<p>Which is nice.</p>

<p>(I don&#8217;t know what the Russian says, nor do I remember where I got it. The Greek says &#8220;The barefoot prince&#8221; and &#8220;and in Greek&#8221;.)</p>

<p>That <code>Mapping=tex-text</code> says that XeTeX should recognise the old LaTeX style for quotes, long dashes, and so on. But you don&#8217;t have to use it: you can type them directly as unicode characters (which is nice).</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;">When he goes---``Hello World!''<span style="color: #E02020; ">\\</span>
She replies—“Hello dear!”</pre></div></div>


<p>And if the font you&#8217;re using has fun OpenType features (and that&#8217;s the whole point, right?), you can access them easily too:</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\fontspec</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Ligatures={<span style="color: #2020C0; font-weight: normal;">Common, Rare</span>}</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Impact</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\fontsize</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">12pt</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">18pt</span><span style="color: #E02020; ">}</span><span style="color: #800000; font-weight: normal;">\selectfont</span> Questo è strano assai!
<span style="color: #800000; font-weight: normal;">\fontspec</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Numbers={<span style="color: #2020C0; font-weight: normal;">OldStyle</span>}</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Impact</span><span style="color: #E02020; ">}</span>Old style: 1234567<span style="color: #E02020; ">\\</span>
<span style="color: #800000; font-weight: normal;">\fontspec</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Numbers={<span style="color: #2020C0; font-weight: normal;">Lining</span>}</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Impact</span><span style="color: #E02020; ">}</span>Lining: 1234567</pre></div></div>


<p>See the <code>fontspec</code> documentation for much, much more. (If your pdf seems to have half its text missing, there&#8217;s something wrong with your pdf rendering library. I don&#8217;t remember what I did to fix this though; possibly just updated, or possibly changed to a different pdf viewer.)</p>

<h2><code>biblatex</code> with <code>biber</code> can handle unicode bibliographies</h2>

<p>So part of the reason I was originally playing around with all this was to help Olga write documents mixing Greek and Latin characters, with both Greek and Latin in the bibliography, with a minimum of hassle. It turns out that <code>bibtex</code> doesn&#8217;t like unicode, in particular it doesn&#8217;t know what to do with Greek. But <code>biber</code>, which is being developed as a backend for the <code>biblatex</code> package, is designed for unicode from the ground up. Both <code>biber</code> and <code>biblatex</code> are beta release software and there are still a few kinks to iron out, but they can already do <em>a lot</em>.</p>

<h2>List installed fonts with <code>fc-list</code></h2>

<p>If you&#8217;re anything like me, the first thing you&#8217;re going to want to do once you see how XeTeX and <code>fontspec</code> work is try out <em>lots</em> of fonts to see what you&#8217;ve got installed that you could use.</p>

<p>If you just want to know names, <code>fc-list</code> is your friend. Be prepared for a lot of output though&#8230;</p>

<p>Here&#8217;s a handy trick: use the <a href="http://ctan.org/tex-archive/graphics/pgf/base/plain/pgf/utilities"><code>pgffor</code></a> package (part of the fantastic graphics package <a href="http://ctan.org/tex-archive/graphics/pgf/"><code>pgf</code></a>) and you don&#8217;t have to constantly retype Lorem ipsem:</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">pgffor</span><span style="color: #E02020; ">}</span>
...
<span style="color: #800000; font-weight: normal;">\foreach</span> <span style="color: #800000; font-weight: normal;">\f</span> in <span style="color: #E02020; ">{</span>
  Droid Serif,
  Alfios,
  Alexander,
  Dustismo
  ...
  URW Bookman L<span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">
  <span style="color: #800000; font-weight: normal;">\noindent</span><span style="color: #800000; font-weight: normal;">\setmainfont</span><span style="color: #E02020; ">{</span><span style="color: #800000; font-weight: normal;">\f</span></span><span style="color: #E02020; ">}</span><span style="color: #800000; font-weight: normal;">\f</span>:
  Lorem ipsem and so forth.
  <span style="color: #E02020; ">\</span><span style="color: #800000;">par</span><span style="color: #800000; font-weight: normal;">\medskip</span>
<span style="color: #E02020; ">}</span></pre></div></div>


<h2>Viewing fonts (and individual glyphs) with <code>fontforge</code> and <code>fontmatrix</code></h2>

<p>Somewhere along the line I picked up a free font with heaps of fleurons, and a font of 300 ampersands each by a different designer (yeah, a gimmick, but the proceeds went to charity). For both of these, I wanted a way to see all the glyphs the font contains, large enough to appreciate them as individual characters, and also with the codepoint information so I know how to get access to whichever one I might want to use.</p>

<p>The internet was silent on how to achieve this (or my google-fu was weak), until <a href="http://typophile.com/user/9108">JanekZ</a> helped me out <a href="http://typophile.com/node/69816">on typophile</a>. It seems <a href="http://fontforge.sourceforge.net/"><code>fontforge</code></a> is the only way to get a conveniently-formatted listing of every glyph the font contains (&#8220;Encoding >> Compact&#8221;); it can generate a pdf for printing but the pdf doesn&#8217;t contain codepoint information. But for simply browsing, <a href="http://fontmatrix.net/"><code>fontmatrix</code></a> is a thing of beauty. Unfortunately it seems to be buggy: &#8220;print&#8221; doesn&#8217;t produce any output, and &#8220;view all mapped glyphs&#8221; refuses to scroll. But the stuff that works works beautifully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logophile.org/blog/2010/04/28/some-notes-on-fonts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

