<?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>His Deeds Are Dust &#187; Paul Flo Williams</title>
	<atom:link href="http://hisdeedsaredust.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://hisdeedsaredust.com</link>
	<description>surveying sub-optimal solutions</description>
	<lastBuildDate>Tue, 17 Jan 2012 15:52:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>That well-known Unicode character, Zero Width Non Joiner Freaky Repeater</title>
		<link>http://hisdeedsaredust.com/2012/01/zero-width-non-joiner-freaky-repeater/</link>
		<comments>http://hisdeedsaredust.com/2012/01/zero-width-non-joiner-freaky-repeater/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 15:52:58 +0000</pubDate>
		<dc:creator>Paul Flo Williams</dc:creator>
				<category><![CDATA[Ebooks]]></category>

		<guid isPermaLink="false">http://hisdeedsaredust.com/?p=242</guid>
		<description><![CDATA[Just when you think you&#8217;ve been all clever by putting zero width non joiner characters around em dashes, the Kindle renderer decides to get its knickers in a twist and does this: The markup that produced the third line of that image was this: &#60;p width="0"&#62;Same bug with &#60;i&#62;italic&#60;/i&#62;&#38;#x200c;, &#60;b&#62;bold&#60;/b&#62;&#38;#x200c; or &#60;span&#62;spans&#60;/span&#62;&#38;#x200c;&#60;/p&#62; Do you see [...]]]></description>
			<content:encoded><![CDATA[<p>Just when you think you&#8217;ve been all clever by putting <a href="http://hisdeedsaredust.com/2012/01/taming-em-dashes-on-the-kindle/">zero width non joiner characters around em dashes</a>, the Kindle renderer decides to get its knickers in a twist and does this:</p>
<p><a href="http://hisdeedsaredust.com/wp-content/uploads/2012/01/bugs.png"><img src="http://hisdeedsaredust.com/wp-content/uploads/2012/01/bugs.png" alt="" title="ZWNJ bug on the Kindle" width="540" height="103" class="aligncenter size-full wp-image-243" /></a></p>
<p>The markup that produced the third line of that image was this:</p>
<pre>
&lt;p width="0"&gt;Same bug with &lt;i&gt;italic&lt;/i&gt;&amp;#x200c;,
&lt;b&gt;bold&lt;/b&gt;&amp;#x200c; or
&lt;span&gt;spans&lt;/span&gt;&amp;#x200c;&lt;/p&gt;
</pre>
<p>Do you see repeated words in the markup? No, me neither. Putting a ZWNJ (U+200C) character straight after the end of another element will cause the final word of that element to be repeated.</p>
<p>In practice, this is easily avoided. If you don&#8217;t put a ZWNJ before an em dash where that em dash comes directly after some styled element (e.g. bold, italic or text size change), you won&#8217;t hit this bug and all you lose is one extra line-break point.</p>
<p>If you weren&#8217;t using <em>any</em> ZWNJ characters around em dashes, you&#8217;d have fewer line breaks anyway, so nothing is lost.</p>
<p>In practice, as I&#8217;ve said before, I put zero width spaces around em dashes, and only change those into zero width non joiners for the Kindle&#8217;s benefit, with a script. That script also searches for places where the ZWNJ will trigger the Kindle bug and removes them, so I don&#8217;t have to think about this bug when I&#8217;m marking up a text.</p>
]]></content:encoded>
			<wfw:commentRss>http://hisdeedsaredust.com/2012/01/zero-width-non-joiner-freaky-repeater/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>No, Kindle Previewer, you may not auto update</title>
		<link>http://hisdeedsaredust.com/2012/01/no-kindle-previewer-you-may-not-auto-update/</link>
		<comments>http://hisdeedsaredust.com/2012/01/no-kindle-previewer-you-may-not-auto-update/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 13:50:31 +0000</pubDate>
		<dc:creator>Paul Flo Williams</dc:creator>
				<category><![CDATA[Ebooks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://hisdeedsaredust.com/?p=237</guid>
		<description><![CDATA[Kindle Previewer is a great time saver for checking formatting, and I&#8217;m very pleased that it runs under Wine, as I&#8217;m currently running Fedora 16 (Verne). However, this morning when I ran it, it auto-updated to the latest version, and that crashes. Auto updating is bad enough when you know you have a set of [...]]]></description>
			<content:encoded><![CDATA[<p>Kindle Previewer is a great time saver for checking formatting, and I&#8217;m very pleased that it runs under Wine, as I&#8217;m currently running Fedora 16 (Verne).</p>
<p>However, this morning when I ran it, it auto-updated to the latest version, and that crashes. Auto updating is bad enough when you know you have a set of software that works exactly as you like, but updating to a version that won&#8217;t run is just bloody rude.</p>
<p>I bet that there&#8217;s a cute SELinux trick that could be used to stop Kindle Previewer having network access, but a simple stop-gap is to reinstall the old version, go to the directory where you installed it, and prevent autoupdate.jar from being used. In my case, that&#8217;s these two lines:</p>
<pre>
 $ cd ~/.wine/drive_c/Program\ Files/kindle\ previewer
 $ chmod 0 autoupdate.jar
</pre>
<p>Kindle Previewer now moans that it can&#8217;t access that jar file when it runs (duh), but pressing &#8220;OK&#8221; allows the rest of it to run just fine. I&#8217;ll investigate more when I decide I want to see how things look on the Kindle Fire, and <em>that&#8217;s</em> not going to be until they&#8217;re available in the UK.</p>
]]></content:encoded>
			<wfw:commentRss>http://hisdeedsaredust.com/2012/01/no-kindle-previewer-you-may-not-auto-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Taming em dashes on the Kindle</title>
		<link>http://hisdeedsaredust.com/2012/01/taming-em-dashes-on-the-kindle/</link>
		<comments>http://hisdeedsaredust.com/2012/01/taming-em-dashes-on-the-kindle/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 12:53:03 +0000</pubDate>
		<dc:creator>Paul Flo Williams</dc:creator>
				<category><![CDATA[Ebooks]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://hisdeedsaredust.com/?p=229</guid>
		<description><![CDATA[I like em dashes, and use them when writing (or preserving the style of older books when I&#8217;m formatting them), but they need some taming for the Kindle, as discussions on MobileRead will show you. If you attempt to insert them between two words without any spaces, the Kindle will stubbornly keep both words together [...]]]></description>
			<content:encoded><![CDATA[<p>I like em dashes, and use them when writing (or preserving the style of older books when I&#8217;m formatting them), but they need some taming for the Kindle, as <a href="http://www.mobileread.com/forums/showthread.php?t=92119">discussions on MobileRead</a> will show you.</p>
<p>If you attempt to insert them between two words without any spaces, the Kindle will stubbornly keep both words together when breaking lines. A simple way of getting round this would be to use a spaced en dash instead, as <a href="http://jwmanus.wordpress.com/2011/08/13/ebook-formatting-adjust-the-em-dash/">Jaye Manus suggests</a>, but can we do any better?</p>
<p> The <a href="http://www.unicode.org/versions/Unicode6.0.0/">Unicode-compliant</a> method of hinting that a line break can occur <em>without a visible space</em> is to put U+200B ZERO WIDTH SPACE either side of the dash, but the Kindle doesn&#8217;t recognise this character. However, it does recognise U+200C ZERO WIDTH NON-JOINER, and appears to treat that in exactly the way that ZWSP should be treated.</p>
<p>So, I would mark up the first em dash in Jaye&#8217;s example sentence: &#8220;I think he’s the best–and I use that loosely–so will let him live.&#8221; as</p>
<pre>
...the best&amp;#x200c;&amp;#x2014;&amp;#x200c;and I use...
</pre>
<p>in the XHTML that I submit to Kindlegen.</p>
<p>With the U+200C ZWNJ included, the Kindle allows line breaking around the dash, and will even insert some space around the dash if necessary to justify the line. Dictionary lookups will also work exactly as you&#8217;d expect.</p>
<p>If you were sure that you always wanted a possible break point on both sides of your em dashes, you could just run a search and replace after marking up your document, but you may want to avoid breaks before a trailing dash at the end of a paragraph, for example.</p>
<p>The only further wrinkle here (for me) is that ZWNJ is the <em>wrong</em> character if you&#8217;re trying to maintain a &#8216;clean&#8217; master XHTML file for EPUB conversion or as a web page, so I actually mark up the document with ZWSP and make the ZWSP-to-ZWNJ conversion part of the set that I do before running Kindlegen.</p>
]]></content:encoded>
			<wfw:commentRss>http://hisdeedsaredust.com/2012/01/taming-em-dashes-on-the-kindle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I would geek critique too</title>
		<link>http://hisdeedsaredust.com/2011/06/i-would-geek-critique-too/</link>
		<comments>http://hisdeedsaredust.com/2011/06/i-would-geek-critique-too/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 11:18:32 +0000</pubDate>
		<dc:creator>Paul Flo Williams</dc:creator>
				<category><![CDATA[Fonts]]></category>

		<guid isPermaLink="false">http://hisdeedsaredust.com/?p=223</guid>
		<description><![CDATA[I just received some feedback on Dotrice, which I claim looks like an old Epson FX-80 dot matrix printer. I&#8217;m sure he won&#8217;t mind if I tell you that the email was from someone who has worked on a ton of retro tech fonts himself. The email started with a compliment, which is always nice, [...]]]></description>
			<content:encoded><![CDATA[<p>I just received some feedback on <a href="http://openfontlibrary.org/font/dotrice">Dotrice</a>, which I claim looks like an old Epson FX-80 dot matrix printer.</p>
<p>I&#8217;m sure he won&#8217;t mind if I tell you that the email was from someone who has worked on a <a href="http://www.zone38.net/font/">ton of retro tech fonts</a> himself.</p>
<p>The email started with a compliment, which is always nice, and then continued by saying that he&#8217;d downloaded the FX-80 manual and found that the bottom row of my lowercase &#8220;g&#8221; was out by half a pixel.</p>
<p>I nearly fell off my chair laughing, because <em>that&#8217;s exactly what I would do!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://hisdeedsaredust.com/2011/06/i-would-geek-critique-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Private failing in Segment14</title>
		<link>http://hisdeedsaredust.com/2011/06/a-private-failing-in-segment14/</link>
		<comments>http://hisdeedsaredust.com/2011/06/a-private-failing-in-segment14/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 15:57:55 +0000</pubDate>
		<dc:creator>Paul Flo Williams</dc:creator>
				<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://hisdeedsaredust.com/?p=212</guid>
		<description><![CDATA[My first upload to the reborn Open Font Library was Segment14, and it failed badly as a web font in Firefox 3.6.17 on Fedora, not displaying at all. Christopher Adams confirmed that it worked on the WebKit-based browsers Safari and Midori, and it works on my HTC Desire. After some minor, unrelated, cleanups, FontForge gave [...]]]></description>
			<content:encoded><![CDATA[<p>My first upload to the reborn <a href="http://openfontlibrary.org/">Open Font Library</a> was <a href="http://openfontlibrary.org/font/segment14">Segment14</a>, and it failed badly as a web font in Firefox 3.6.17 on Fedora, not displaying at all.</p>
<p>Christopher Adams confirmed that it worked on the WebKit-based browsers Safari and Midori, and it works on my HTC Desire.</p>
<p>After some minor, unrelated, cleanups, <a href="http://fontforge.sourceforge.net/">FontForge</a> gave both the SFD and OTF files a clean bill of health, but it still wasn&#8217;t working in Firefox, so I took a deeper look and found that <a href="http://www.mozilla.org/security/announce/2010/mfsa2010-78.html">Mozilla had added the OTS font sanitizing library to Firefox</a> from version 3.6.13, back in December 2010.</p>
<p><a href="http://code.google.com/p/ots/">OTS</a> is mainly designed to be added as a font condom for OpenType-consuming applications, as Firefox apply it, but it also has a standalone checker called <tt>ot-serialize</tt>. OTS isn&#8217;t packaged in Fedora yet, so I collected it from upstream and ran it over my font, with these results:</p>
<pre style="white-space:normal">ERROR at /home/paul/projects/ots/ots-read-only/src/cff.cc:377 (bool<unnamed>::ParsePrivateDictData(const uint8_t*, size_t, size_t, size_t, </unnamed><unnamed>::DICT_DATA_TYPE, ots::OpenTypeCFF*))</unnamed></pre>
<p>Ugly. Still, it&#8217;s a &#8220;yes/no&#8221; tool, so I&#8217;m prepared to do a little hunting through the source to find out exactly why it hates me.</p>
<p>The answer is that my FontForge source had a definition of BlueValues in the Type 1 Private dictionary. I don&#8217;t remember how it got there, because it is optional, but I had put one in, and I had <b>defined it as an empty array</b>. OTS decided that, if arrays exist in the Private dictionary, they must not be empty. With a quick snip, my font works again.</p>
<p>I&#8217;ll certainly be adding OTS to my fonty toolchain, and it strikes me that this would be a useful tool for packaging and using in font reviews. You wouldn&#8217;t want to fail a review because of it, but it would certainly help to know whether a font will fail on the Web, which must be a large part of users&#8217; expectations now.</p>
]]></content:encoded>
			<wfw:commentRss>http://hisdeedsaredust.com/2011/06/a-private-failing-in-segment14/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

