<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;CkcER345cCp7ImA9WhZbEks.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619</id><updated>2011-06-17T03:03:26.028+05:30</updated><title>iFiddling</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Ifiddling" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="ifiddling" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CEMEQXk4eSp7ImA9WxVWGU8.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619.post-8720528959064242539</id><published>2009-03-01T21:04:00.001+05:30</published><updated>2009-03-01T21:16:40.731+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-01T21:16:40.731+05:30</app:edited><title>BDF support added to Mobile Font Engine</title><content type="html">As I suspected, BDF was not hard to support. Here are a couple of layouts in iPhone-sized screens, 320x480 and 480x320.&lt;br /&gt;&lt;br /&gt;The following features &lt;a href="http://hea-www.harvard.edu/~fine/Tech/x11fonts.html"&gt;Thomas A. Fine’s Atari-Small&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_jA44GvHEh_M/Saqsoy725tI/AAAAAAAAAO4/dD8zxTNPDKI/s1600-h/atari-small-landscape.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_jA44GvHEh_M/Saqsoy725tI/AAAAAAAAAO4/dD8zxTNPDKI/s1600/atari-small-landscape.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5308244927677130450" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/Saqs5DZMQAI/AAAAAAAAAPA/FRDMCmzMBi8/s1600-h/atari-small-portrait.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/Saqs5DZMQAI/AAAAAAAAAPA/FRDMCmzMBi8/s1600/atari-small-portrait.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5308245206973038594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And this is -Bitstream-Charter-Medium-I-Normal--19-180-75-75-P-103-ISO8859-1:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/SaqtGqpeNDI/AAAAAAAAAPI/A43eQ3BXIcc/s1600-h/charter-portrait.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/SaqtGqpeNDI/AAAAAAAAAPI/A43eQ3BXIcc/s1600/charter-portrait.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5308245440848606258" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/SaqtSQWvOtI/AAAAAAAAAPQ/2nDHlto1C5o/s1600-h/charter-landscape.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/SaqtSQWvOtI/AAAAAAAAAPQ/2nDHlto1C5o/s1600/charter-landscape.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5308245639949138642" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/550021620398023619-8720528959064242539?l=ifiddling.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Ifiddling/~4/3lgX__qRcy0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/8720528959064242539/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=550021620398023619&amp;postID=8720528959064242539" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/8720528959064242539?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/8720528959064242539?v=2" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/2009/03/bdf-support-added-to-mobile-font-engine.html" title="BDF support added to Mobile Font Engine" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_jA44GvHEh_M/Saqsoy725tI/AAAAAAAAAO4/dD8zxTNPDKI/s72-c/atari-small-landscape.png" height="72" width="72" /><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;C0MEQ38yfSp7ImA9WxVWF0g.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619.post-6636527686378290206</id><published>2009-02-27T08:19:00.002+05:30</published><updated>2009-02-27T21:46:42.195+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-27T21:46:42.195+05:30</app:edited><title>A review of the Shortcovers app for the iPhone</title><content type="html">&lt;a href="http://www.shortcovers.com/"&gt;Shortcovers&lt;/a&gt; launched yesterday. Being extremely interested in mobile publishing, I dropped everything to take a look at their iPhone application. It’s not bad, but there are certainly some rough edges. Here’s what I think:&lt;br /&gt;&lt;br /&gt;&lt;ol style="list-style-type: decimal"&gt;&lt;li&gt;&lt;strong&gt;UI elements take up too much space:&lt;/strong&gt; On a tiny device such as the iPhone, I expect to be able to make use of the whole screen for reading. The app needs a fullscreen-mode. As it is at this time, a solid chunk is removed by the status bar, a navigation controller and a translucent toolbar. The translucency doesn’t help.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_jA44GvHEh_M/SagOzEfsAtI/AAAAAAAAAOo/Kiv9HwlTCRk/s1600-h/Shortcovers.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_jA44GvHEh_M/SagOzEfsAtI/AAAAAAAAAOo/Kiv9HwlTCRk/s1600/Shortcovers.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5307508431398896338" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Flipping pages is too much work: &lt;/strong&gt;In Shortcovers &lt;em&gt;parlance&lt;/em&gt;, a ‘page’ is a multi-screen sequence where your only option to go from screenful to screenful is to flick or track across the screen with your finger. There are ‘previous page’ and ‘last page’ buttons, but these go to the next multi-screen chunk and not to any text contiguous to what is on the screen currently, unless you’re at either end of the ‘page’. Not only is this an unnecessary break from convention, I bet it’s more tiring to go through a whole book so physically. Not only are you flicking every few seconds or dragging a fingertip constantly, you must track your ‘point’ visually to resume reading and finally suffer the distraction of the bounce-scroll at page ends.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Connection problems:&lt;/strong&gt; I have not been able to purchase a book at all; I’ve tried a few times. I get a ‘Shortcovers Error ...’ alert.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Autocorrection in Search should be off.&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;Finally, a non-complaint: the following screenshot shows Shortcovers approach to CoverFlow that is not CoverFlow, i.e., something in the category that has no chance of being mistaken by Apple as an instance of the use of their private frameworks.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_jA44GvHEh_M/SagPGNlvbtI/AAAAAAAAAOw/J0Mbdul__j4/s1600-h/CoverFlow.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SagPGNlvbtI/AAAAAAAAAOw/J0Mbdul__j4/s1600/CoverFlow.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5307508760257720018" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I’m sick of the whole thing. The obsession with this class of silly gimmick has me perplexed. What’s wrong with a nice table?&lt;br /&gt;&lt;br /&gt;Anyway, I hope they add a fullscreen mode soon (and support for Urdu?) because I have every intention of using this all day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/550021620398023619-6636527686378290206?l=ifiddling.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Ifiddling/~4/_LsAWvC6njM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/6636527686378290206/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=550021620398023619&amp;postID=6636527686378290206" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/6636527686378290206?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/6636527686378290206?v=2" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/2009/02/review-of-shortcovers-app-for-iphone.html" title="A review of the Shortcovers app for the iPhone" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_jA44GvHEh_M/SagOzEfsAtI/AAAAAAAAAOo/Kiv9HwlTCRk/s72-c/Shortcovers.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0QGSXg6fip7ImA9WxVWFEQ.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619.post-2808311219345350656</id><published>2009-02-23T07:38:00.000+05:30</published><updated>2009-02-24T23:45:28.616+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-24T23:45:28.616+05:30</app:edited><title>Adding BDF support to my Mobile Font Engine</title><content type="html">Having designed my font engine to support proportional-width fonts from the start, I’d been thinking about how to store glyphs:&lt;br /&gt;&lt;br /&gt;&lt;ol style="list-style-type: decimal"&gt;&lt;li&gt;Should I store one large ‘global image’: an image with all glyphs laid out and a separate table of offsets and widths, particularly delectable samples of which can be found on &lt;a href="http://benfry.com/mariosoup/"&gt;Ben Fry’s website&lt;/a&gt;?&lt;/li&gt;&lt;li&gt;Should I store glyphs in individual files, which would be an implicit description of the same offsets and widths?&lt;/li&gt;&lt;/ol&gt;It then occurred to me that I was being a silly ass. &lt;br /&gt;&lt;br /&gt;Of course there have been standards for this sort of thing before outline-based fonts came to rule the world. Supporting a once-popular standard might make available a related set of utilities, editors and possibly even some nice free fonts. That’s too much to pass up.&lt;br /&gt;&lt;br /&gt;So I applied my careful method, as in all things, of indiscriminately picking the first option. Which happened to be the BDF. Calling it &lt;em&gt;the BDF format,&lt;/em&gt; being the same as saying &lt;em&gt;the Bitmap Distribution Format&lt;/em&gt; &lt;em&gt;format,&lt;/em&gt; is a little on the uncouth side.&lt;br /&gt;&lt;br /&gt;And here was some unexpected joy: BDF is a 7-bit format! Very nice; nothing niftier than editing a font in TextEdit. To be serious, &lt;a href="http://fontforge.sourceforge.net/"&gt;FontForge&lt;/a&gt; seems to support BDF well enough. Or you could just use this fine editor written in Tcl/Tk: &lt;a href="http://hea-www.harvard.edu/~fine/Tech/bdfedit.html"&gt;Thomas A Fine’s bdfedit&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Here’s &lt;a href="http://partners.adobe.com/public/developer/en/font/5005.BDF_Spec.pdf"&gt;a link to the BDF spec&lt;/a&gt;, and &lt;a href="http://pfaedit.sourceforge.net/BDFgrey.html"&gt;one to a description of Microsoft’s extension to BDF for anti-aliasing&lt;/a&gt;. And of course you can find plenty of BDF fonts (in a legally suspect manner, so don’t do it) with just &lt;a href="http://www.google.com/search?hl=en&amp;q=filetype:bdf"&gt;a google search&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/550021620398023619-2808311219345350656?l=ifiddling.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Ifiddling/~4/DLs879kGepo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/2808311219345350656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=550021620398023619&amp;postID=2808311219345350656" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/2808311219345350656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/2808311219345350656?v=2" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/2009/02/adding-bdf-support-to-my-mobile-font.html" title="Adding BDF support to my Mobile Font Engine" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkINRng_fyp7ImA9WxVXEks.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619.post-7729663177243882052</id><published>2009-02-10T12:35:00.002+05:30</published><updated>2009-02-10T15:39:57.647+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-10T15:39:57.647+05:30</app:edited><title>Starting on an embedded font engine for the iPhone</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/SZFRyVkEEcI/AAAAAAAAAOg/oT_aZn2Lcyo/s1600-h/04+latinate.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 275px; height: 250px;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/SZFRyVkEEcI/AAAAAAAAAOg/oT_aZn2Lcyo/s400/04+latinate.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5301108161615499714" /&gt;&lt;/a&gt;&lt;br /&gt;I’ve recently started work on an embeddable bitmap font engine for the iPhone, for the specific use of non-mainstream scripts such as the many Indian languages, Arabic, Farsi, etc. &lt;br /&gt;&lt;br /&gt;Why write my own engine and not work with Apple’s system libraries?&lt;br /&gt;&lt;ol style="list-style-type: decimal"&gt;&lt;li&gt;I don’t trust Apple’s QA process for scripts that don’t represent a big market. They brought a Devanagari font (for Hindi) to the iPhone but shipped it with the &lt;em&gt;chhoti-I matra&lt;/em&gt; broken; this is one high-impact bug. One possible explanation is that their system font library (FreeType?) doesn’t yet support OpenType features that enable glyph re-ordering etc., which Indic scripts rely on. But why ship the font with the phone if you know you can’t render it correctly yet? I have to assume that they intended to support this (because they owned the font anyway) but that their QA was broken.&lt;br /&gt;  In general it’s safe to assume that Apple isn’t interested in supporting non-mainstream scripts unless they have to; Arabic has to be a bigger market than Hindi and the iPhone still doesn’t support Arabic despite being &lt;a href="http://www.macworld.com/article/137672/2008/12/iphone_arabic.html"&gt;available now in Jordan&lt;/a&gt;, as of early Feb 2009. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Fixes in the firmware henceforth won’t work for users who’re on older firmware. You can’t discount that some people might not upgrade. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;It should be easier to port the font engine to the other prominent mobile platforms: Android, Symbian, Blackberry, Java ME, Palm, etc.  &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;But why bitmap fonts? Doesn’t everyone use TrueType now?&lt;br /&gt;&lt;ol style="list-style-type: decimal"&gt;&lt;li&gt;They’re easier to construct than TrueType fonts, especially if you only need them at a small number of point-sizes. I expect redistributable licenses for existing Indic fonts will be hard to obtain and will be missing the more exotic diacritics and ligatures in any case. The fonts that do come with OS X are certainly missing some of these. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;The rendering and glyph-alignment will be far simpler to code, and smaller, which is all good in a mobile app.&lt;/li&gt;&lt;/ol&gt;I’ve made a little progress; I’ll report it here as I go along.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/550021620398023619-7729663177243882052?l=ifiddling.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Ifiddling/~4/IJrs6JwWFIw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/7729663177243882052/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=550021620398023619&amp;postID=7729663177243882052" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/7729663177243882052?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/7729663177243882052?v=2" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/2009/02/starting-on-embedded-font-engine-for.html" title="Starting on an embedded font engine for the iPhone" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_jA44GvHEh_M/SZFRyVkEEcI/AAAAAAAAAOg/oT_aZn2Lcyo/s72-c/04+latinate.png" height="72" width="72" /><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DkYHQ3g4fSp7ImA9WxVQF0g.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619.post-5881772134972957977</id><published>2009-01-27T19:49:00.006+05:30</published><updated>2009-02-04T18:58:52.635+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-04T18:58:52.635+05:30</app:edited><title>A temporary fix for Hindi (Devanagari) on the iPhone</title><content type="html">As I explained in my &lt;a href="http://ifiddling.blogspot.com/2009/01/hindi-is-broken-on-iphone-as-of-22.html"&gt;last post&lt;/a&gt;, the Devanagari rendering situation on the iPhone is dead on arrival. To wit, the &lt;em&gt;chhoti-I matra&lt;/em&gt; (the vowel ‘i’ as in k&lt;em&gt;i&lt;/em&gt;ck) is always rendered one position to the right of its conventional placement.&lt;br /&gt;&lt;br /&gt;While explaining the problem to a keen-eared buddy this evening, it occurred to me that there was a simple fix &lt;em&gt;ad hoc&lt;/em&gt;:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;shift the &lt;em&gt;chhoti-I matra&lt;/em&gt; one position to the left in the encoding&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is just fixing the symptom but there’s nothing else to be done (short of providing one’s own font engine) while we wait for Apple to fix this in the firmware. In any case, the lack of any symptoms is all that the discerning public cares for.&lt;br /&gt;&lt;br /&gt;I’d remember to check for firmware version to be at most 2.2 with a message to [[UIDevice currentDevice] systemVersion], and remember to update things accordingly when the next firmware version is released.&lt;br /&gt;&lt;br /&gt;Xcode:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_jA44GvHEh_M/SYmX0q-oprI/AAAAAAAAANw/ZsOhmK6qZE4/s1600-h/xcodefix2.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SYmX0q-oprI/AAAAAAAAANw/ZsOhmK6qZE4/s1600/xcodefix2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5298933367724091058" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;iPhone simulator (correct - for now):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_jA44GvHEh_M/SX83RJ3dHYI/AAAAAAAAANg/LkTqJ_uNtmA/s1600-h/simfix.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 155px; height: 84px;" src="http://3.bp.blogspot.com/_jA44GvHEh_M/SX83RJ3dHYI/AAAAAAAAANg/LkTqJ_uNtmA/s400/simfix.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5296012454656810370" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/550021620398023619-5881772134972957977?l=ifiddling.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Ifiddling/~4/k9Pl3C0nLDI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/5881772134972957977/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=550021620398023619&amp;postID=5881772134972957977" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/5881772134972957977?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/5881772134972957977?v=2" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/2009/01/temporary-fix-for-hindi-devanagari-on.html" title="A temporary fix for Hindi (Devanagari) on the iPhone" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_jA44GvHEh_M/SYmX0q-oprI/AAAAAAAAANw/ZsOhmK6qZE4/s72-c/xcodefix2.png" height="72" width="72" /><thr:total>11</thr:total></entry><entry gd:etag="W/&quot;A0YNSXo6eCp7ImA9WxVRFk0.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619.post-6369471286331827705</id><published>2009-01-21T21:51:00.003+05:30</published><updated>2009-01-22T12:56:38.410+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-22T12:56:38.410+05:30</app:edited><title>Hindi is broken on iPhone (as of 2.2)</title><content type="html">This afternoon I decided to wrap the (public-domain) text of a Hindi short story (by&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgdu6TfnSI/AAAAAAAAAMY/OMMlC6ml1EQ/s1600-h/premchand.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 42px; height: 19px;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgdu6TfnSI/AAAAAAAAAMY/OMMlC6ml1EQ/s400/premchand.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5294014053736226082" /&gt;&lt;/a&gt;) in a little application to run on my iPod Touch, as what you might call a standalone e-book. I hadn’t really done any Hindi browsing on the device so far but when I’d first tried it I had easily managed to rename a well-known Hindi song successfully from ‘Mere Mehboob’ to &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgeAXKZjUI/AAAAAAAAAMg/N7-Bm_LXNkM/s1600-h/mehboob.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 58px; height: 20px;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgeAXKZjUI/AAAAAAAAAMg/N7-Bm_LXNkM/s400/mehboob.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5294014353540484418" /&gt;&lt;/a&gt;, and it’d showed as such on the iPod. &lt;br /&gt;&lt;br /&gt;So, naturally, I was encouraged and had expected things to go smoothly with the little ebook app.&lt;br /&gt;&lt;br /&gt;Fail! The Devanagari script (Hindi as it is written) is badly broken on the iPhone platform. The &lt;em&gt;chhoti-I matra&lt;/em&gt;, the short ‘i’ sound as in k&lt;em&gt;i&lt;/em&gt;ck does not render correctly at all.&lt;br /&gt;&lt;br /&gt;It should be before the consonant to which it is attached:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgeKYftGII/AAAAAAAAAMo/rUEweu9rhtY/s1600-h/lipi1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 63px; height: 42px;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgeKYftGII/AAAAAAAAAMo/rUEweu9rhtY/s400/lipi1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5294014525696972930" /&gt;&lt;/a&gt;&lt;br /&gt;It renders instead as follows, after the consonant:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_jA44GvHEh_M/SXgeW1rNSrI/AAAAAAAAAMw/rQ2FUugAonQ/s1600-h/lipi2.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 65px; height: 33px;" src="http://3.bp.blogspot.com/_jA44GvHEh_M/SXgeW1rNSrI/AAAAAAAAAMw/rQ2FUugAonQ/s400/lipi2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5294014739688278706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is not a valid expression in Devanagari. It is lamentable that Apple went far enough to support the script at all and then neglected this little show-stopper at the tail end. Especially because it works well on OS X and you’d think they’d share some tests with the iPhone platform.&lt;br /&gt;&lt;br /&gt;Xcode (correct):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgelag9iqI/AAAAAAAAAM4/UjPFvi4labE/s1600-h/xcode.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 267px; height: 77px;" src="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgelag9iqI/AAAAAAAAAM4/UjPFvi4labE/s400/xcode.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5294014990095583906" /&gt;&lt;/a&gt;&lt;br /&gt;iPhone simulator (incorrect):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_jA44GvHEh_M/SXgetlm_r-I/AAAAAAAAANA/BL9C6tesoqs/s1600-h/sim.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 161px; height: 80px;" src="http://4.bp.blogspot.com/_jA44GvHEh_M/SXgetlm_r-I/AAAAAAAAANA/BL9C6tesoqs/s400/sim.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5294015130512633826" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You could disregard this and get by with a mental re-ordering of the &lt;em&gt;I-matra&lt;/em&gt; if you must, but it’s still not what you’d expect in an Apple device.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/550021620398023619-6369471286331827705?l=ifiddling.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Ifiddling/~4/KPtxY9PwbuE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/6369471286331827705/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=550021620398023619&amp;postID=6369471286331827705" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/6369471286331827705?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/6369471286331827705?v=2" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/2009/01/hindi-is-broken-on-iphone-as-of-22.html" title="Hindi is broken on iPhone (as of 2.2)" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_jA44GvHEh_M/SXgdu6TfnSI/AAAAAAAAAMY/OMMlC6ml1EQ/s72-c/premchand.png" height="72" width="72" /><thr:total>11</thr:total></entry><entry gd:etag="W/&quot;D0EEQH0yeyp7ImA9WxVSEkg.&quot;"><id>tag:blogger.com,1999:blog-550021620398023619.post-7449915016290959499</id><published>2009-01-06T16:06:00.003+05:30</published><updated>2009-01-06T20:56:41.393+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-06T20:56:41.393+05:30</app:edited><title>Use the Mac's accelerometer in the iPhone Simulator</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_jA44GvHEh_M/SWNiKI1KtRI/AAAAAAAAADA/rFWOOMdBAJk/s1600-h/accgraphsim.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 207px; height: 385px;" src="http://4.bp.blogspot.com/_jA44GvHEh_M/SWNiKI1KtRI/AAAAAAAAADA/rFWOOMdBAJk/s400/accgraphsim.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5288178313771791634" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The accelerometer is not simulated in the current iPhone SDK (for iPhone OS 2.2).&lt;br /&gt;&lt;br /&gt;Otto Chrons has posted a &lt;/span&gt;&lt;a href="http://code.google.com/p/accelerometer-simulator/wiki/Home"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;neat package&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; that sends accelerometer data from an iPhone or iPod Touch to an application running in the iPhone simulator. This package is in two parts: a ‘server’ that runs on your iPhone hardware and a ‘client’ in the form of source code that you can drop into your project (adding just an #import statement).&lt;br /&gt;&lt;br /&gt;This works really well, except when:&lt;br /&gt;1) you don’t have an iPhone or iPod Touch, or&lt;br /&gt;2) you’re not registered in the Standard or Enterprise iPhone Development programme; I wasn’t registered at the time, and so I had no way to push Otto’s server application to my iPod Touch.&lt;br /&gt;&lt;br /&gt;But then it occurred to me that my MacBook did have an accelerometer. If only that could serve data to the fake accelerometer in the simulator... So I looked, and providentially enough, &lt;/span&gt;&lt;a href="http://unimotion.sourceforge.net/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;UniMotion&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; hove into view.&lt;br /&gt;&lt;br /&gt;So I browsed the source for the two packages for a bit, with a view to nefarious smash-and-grab, but by more happy chance it turned out that the relevant pieces in both were modular enough to fit as they were, with a little python for glue.&lt;br /&gt;&lt;br /&gt;Otto’s client expects a string with timestamp and x,y,z readings over UDP, and UniMotion’s &lt;/span&gt;&lt;em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;motion&lt;/span&gt;&lt;/em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; is kind enough to spew x, y and z readings to standard output, though they’re not oriented in the same directions as those in the iPhone SDK’s UIAcceleration.&lt;br /&gt;&lt;br /&gt;On my late 2006 MacBook, &lt;/span&gt;&lt;em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;motion&lt;/span&gt;&lt;/em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; emits x,y,z with a positive magnitude to the left, towards me and downwards, respectively. UIAcceleration expects readings to be positive to the right, away from me and upwards, respectively.&lt;br /&gt;&lt;br /&gt;So all I needed to do was to grab &lt;/span&gt;&lt;em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;motion&lt;/span&gt;&lt;/em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;’s output (with the -f flag for acceleration in units of G), multipy each value by -1, add a timestamp and broadcast over UDP on the given port in the format that Otto’s client expects. I did need to run &lt;/span&gt;&lt;em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;calibrate&lt;/span&gt;&lt;/em&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; in the UniMotion suite first.&lt;br /&gt;&lt;br /&gt;Here’s my python glue:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(4,26,115);"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;import sys, socket, time, traceback&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="color: rgb(4,26,115);"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;kCFAbsoluteTimeIntervalSince1970 = 978307200.0 # from CFDate.c                                            &lt;br /&gt;&lt;br /&gt;sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)&lt;br /&gt;sock.bind(('',0))&lt;br /&gt;sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)&lt;br /&gt;&lt;br /&gt;while 1:&lt;br /&gt;  try:&lt;br /&gt;    line = sys.stdin.readline()[:-1]     # read line and strip EOL                                    &lt;br /&gt;    fields = line.split()                # split around space character                               &lt;br /&gt;    floatfields = map(float, fields)     # convert to floats                                          &lt;br /&gt;&lt;br /&gt;    # transform co-ordinate system, from SMS- to UIAcceleration-format,                               &lt;br /&gt;    # for my macbook (late 2006)                                                                      &lt;br /&gt;    x, y, z = map(lambda x: -1 * x, floatfields)&lt;br /&gt;&lt;br /&gt;    # change epoch to be compatible with CFAbsoluteTimeGetCurrent()                                   &lt;br /&gt;    currentTime = time.time() - kCFAbsoluteTimeIntervalSince1970&lt;br /&gt;&lt;br /&gt;    accdata = ','.join(map(str,('ACC: 0',currentTime,x,y,z)))&lt;br /&gt;&lt;br /&gt;    sock.sendto(accdata, ('&amp;lt;broadcast&amp;gt;', 10552))&lt;br /&gt;    #        print '% .2f % .2f % .2f' % (x, y, z)                                                            &lt;br /&gt;  except (ValueError, KeyboardInterrupt):&lt;br /&gt;    sock.close()&lt;br /&gt;    sys.exit(-1)&lt;br /&gt;  except:&lt;br /&gt;    traceback.print_exc()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;I call this &lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;sendaccsim.py&lt;/span&gt;&lt;/em&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; and run it as:&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;$ ./motion -f 17 | python sendaccsim.py&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;It’s just a bit awkward swinging the Mac around like a tea tray.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/550021620398023619-7449915016290959499?l=ifiddling.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Ifiddling/~4/jALdAAf1bjM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ifiddling.blogspot.com/feeds/7449915016290959499/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=550021620398023619&amp;postID=7449915016290959499" title="21 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/7449915016290959499?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/550021620398023619/posts/default/7449915016290959499?v=2" /><link rel="alternate" type="text/html" href="http://ifiddling.blogspot.com/2009/01/dummy2.html" title="Use the Mac&amp;#39;s accelerometer in the iPhone Simulator" /><author><name>Karan Vasudeva</name><uri>http://www.blogger.com/profile/02985733443651962905</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="30" height="32" src="http://2.bp.blogspot.com/_jA44GvHEh_M/SWNtI0OVa7I/AAAAAAAAADI/CI0sKJJy6ec/S220/karan.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_jA44GvHEh_M/SWNiKI1KtRI/AAAAAAAAADA/rFWOOMdBAJk/s72-c/accgraphsim.png" height="72" width="72" /><thr:total>21</thr:total></entry></feed>

