tag:blogger.com,1999:blog-3210999259312346562024-02-21T17:28:17.446+01:00Beyond LatinWriting across ages and continentsUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-321099925931234656.post-88271346105575514262010-08-26T03:50:00.003+02:002010-09-16T18:00:29.394+02:00Playing cardsThe upcoming Unicode 6.0 standard brings us a host of symbol characters, among them a block called “Playing Cards” at U+1F0A0. The symbols there represent the Minor Arcana of the Tarot deck (or the traditional western 52-card deck plus four Knights, if you prefer), of which at least some are usually illustrated in more or less detail.<br />
<br />
The Unicode code charts shows complete cards, albeit with stylized illustrations. This is a sensible design choice for representative glyphs. George Douros’ <a href="http://users.teilar.gr/%7Eg1951d/">Symbola</a> even features full-fledged b/w illustrations, but the level of detail requires the card symbols to be set apart from the text body at larger point sizes.<br />
<br />
Since the DejaVu fonts is first and foremost a screen font, playing cards would not fit in with this approach. Fortunately the semantics of a playing card symbol is relatively simple: it is a card, it belongs to one of the four suits (♠♥♦♣) and it has a rank. The following poker game example shows a minimalistic approach to get this information across:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1zSod7LO0HVbCiuuU9eTf7Bf9mI-2H2JcNaX8Cyex5YBiq6T4XATry8ttPAME-KRlgNDwm_7YDj-ogfd-7u26kUW7_AIe0BX-uC6SWLOzzC8F-Q__tVE1KSl09YlwsA4cEtSy5zKmECQ/s1600/poker.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1zSod7LO0HVbCiuuU9eTf7Bf9mI-2H2JcNaX8Cyex5YBiq6T4XATry8ttPAME-KRlgNDwm_7YDj-ogfd-7u26kUW7_AIe0BX-uC6SWLOzzC8F-Q__tVE1KSl09YlwsA4cEtSy5zKmECQ/s320/poker.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Rendered point size 8 the cards are still recognizable</td></tr>
</tbody></table><br />
This kind of graphical representation should be familiar to most people, either from television (before HDTV) or from mobile games, where space is at a premium.<br />
<br />
One thing to keep in mind is, that while the playing cards are depicted with French suits in the code charts, they are unified with <a href="http://en.wikipedia.org/wiki/Suit_%28cards%29">equivalent suits</a> in other cultures. So U+1F0AB <span style="font-variant: small-caps; text-transform: lowercase;">PLAYING CARD JACK OF SPADES</span> for instance could also be shown as page of swords of the Minor Arcana or Grün-Bube in German suits.<br />
<br />
The patch containing the card glyphs is more or less ready, they will be included in version 2.33 of DejaVu. <br />
<br />
References:<br />
<ul><li><a href="http://babelstone.blogspot.com/2009/11/whats-new-in-unicode-60.html">http://babelstone.blogspot.com/2009/11/whats-new-in-unicode-60.html</a></li>
<li><a href="http://www.unicode.org/Public/6.0.0/charts/blocks/U1F0A0.pdf">http://www.unicode.org/Public/6.0.0/charts/blocks/U1F0A0.pdf</a></li>
<li><a href="http://en.wikipedia.org/wiki/Playing_card">http://en.wikipedia.org/wiki/Playing_card</a></li>
</ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-321099925931234656.post-45445435156101195292010-08-22T21:02:00.000+02:002010-08-22T21:02:59.085+02:00Joining behavior in N'Ko (or ߒߞߏ)<a href="http://en.wikipedia.org/wiki/N%27Ko_script">N'Ko</a> is an alphabetic right-to-left writing system for the <a href="http://en.wikipedia.org/wiki/Mande_languages" title="Mande languages">Mande languages</a> in West Africa. It is relatively modern, as it was invented in 1949 by <a href="http://en.wikipedia.org/wiki/Solomana_Kante" title="Solomana Kante">Solomana Kante</a>.<br />
<br />
The letters usually connect on the baseline, a feature reminiscent of the <a href="http://en.wikipedia.org/wiki/Arabic_alphabet">Arabic script</a>. It should be noted though, that in contrast to Arabic, joining behavior is not mandatory but rather a design choice.<br />
<br />
DejaVu Sans has been one of the first Unicode fonts to include the N'Ko range along with the characteristic joining behavior, both added by <a href="http://dejavu-fonts.org/wiki/%D0%84%D0%B2%D0%B3%D0%B5%D0%BD%D1%96%D0%B9_%D0%9C%D0%B5%D1%89%D0%B5%D1%80%D1%8F%D0%BA%D0%BE%D0%B2" title="Євгеній Мещеряков">Євгеній Мещеряков</a> in version 2.18. To get the letters render correctly, two things are needed. First, you need to have appropriate OpenType tables, i.e. ‘<a href="http://www.microsoft.com/typography/otspec/features_fj.htm#init">init</a>’ for initial forms, ‘<a href="http://www.microsoft.com/typography/otspec/features_ko.htm#medi">medi</a>’ for medial and ‘<a href="http://www.microsoft.com/typography/otspec/features_fj.htm#fina">fina</a>’ for terminal or final forms. Second, the rendering engine has to recognize those and apply them.<br />
<br />
And that's where the problem starts. Windows 7 comes with a font that includes N'Ko, but its rendering engine Uniscribe does not know what to do with the N'Ko tables. As a workaround, I have added a ‘␣RQD’ (= required feature) table which specifies when to apply which of the three aforementioned tables.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggs0VLuultdb3fatgD3x7Z_mVt7xFABO9eJPYlVNQ-LFv_QVfc3JJYbpLXoo1yeWnIT-XOkS5xug8Ol8UAxSM8tjX1O3TcQ4pU4JeN4Qwa5vXsj_HWah6zfKAX_NRKGtygqMKMZmUST6w/s1600/N'Ko.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggs0VLuultdb3fatgD3x7Z_mVt7xFABO9eJPYlVNQ-LFv_QVfc3JJYbpLXoo1yeWnIT-XOkS5xug8Ol8UAxSM8tjX1O3TcQ4pU4JeN4Qwa5vXsj_HWah6zfKAX_NRKGtygqMKMZmUST6w/s320/N'Ko.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Rendered with Firefox 4.0b3 in Windows 7</td></tr>
</tbody></table>This fix is included in version 2.32 of DejaVu (just released while I was writing this post), see sidebar for download link.<br />
<br />
Unfortunately this does not work in every application in Windows, as some do not make use of all Uniscribe features or rely on alternative renderers.<br />
<br />
Additionally this workaround seems to have no effect on XeTeX as of version 0.9997.<br />
<br />
References:<br />
<ul><li><a href="http://en.wikipedia.org/wiki/N%27Ko_script">http://en.wikipedia.org/wiki/N%27Ko_script</a></li>
<li><a href="http://www.omniglot.com/writing/nko.htm">http://www.omniglot.com/writing/nko.htm </a></li>
<li><i>The Unicode Standard, Version 5.2.0</i>, <a href="http://www.unicode.org/versions/Unicode5.2.0/ch13.pdf">chapter 13</a> (.pdf)</li>
</ul>Unknownnoreply@blogger.com0