Character styling with Unicode

Sunday 22 May 2005

I mentioned Quicksilver back in September. One of the unusual things about it is its attention to cosmetic detail. This even extends to its name. Even in the Finder, the name appears in small caps, with the version number in subscripts. How do they do that? How can the name of a file include styling information like that?

It can't. It's another Unicode trick. The filename isn't "QuicksilverB36", it's "Quıcĸsılⅴεʀᵦ₃₆". (The cosmetics of this will depend on your browser's support for some very unusual characters.) Some of these are the letters you think they are, others are not. They are actually:

0051 LATIN CAPITAL LETTER Q
0075 LATIN SMALL LETTER U
0131 LATIN SMALL LETTER DOTLESS I
0063 LATIN SMALL LETTER C
0138 LATIN SMALL LETTER KRA
0073 LATIN SMALL LETTER S
0131 LATIN SMALL LETTER DOTLESS I
006C LATIN SMALL LETTER L
2174 SMALL ROMAN NUMERAL FIVE
03B5 GREEK SMALL LETTER EPSILON
0280 LATIN LETTER SMALL CAPITAL R
1D66 GREEK SUBSCRIPT SMALL LETTER BETA
2083 SUBSCRIPT THREE
2086 SUBSCRIPT SIX

(I looked these up in UnicodeData.txt from the Unicode consortium.)

Why do some of these exist as subscript variants when their neighbors do not? Because they are parts of other "alphabets". For example, 0280, Latin Letter Small Capital R, does not follow a small Q, it is part of the International Phonetic Alphabet. And the K is actually a Kra, which is Greenlandic!

Quicksilver has cherry-picked characters that look right, and by using Unicode, have managed to sneak their styling into "plain text" that can be used as a filename.

Comments

[gravatar]
andrew 7:13 PM on 22 May 2005

Firefox actually did a better (but not perfect) job of rendering those unicode characters. IE basically gave up and just put up some tofu white flags.

[gravatar]
Todd Larason 6:41 AM on 23 May 2005

There's another level of trickiness going on here.

That isn't the filename at all; the filename is straight ASCII "Quicksilver.app". The fancy version comes from somewhere inside the package; I found it once, I thought in a plist file, but can't seem to find it now.

This leads to one bizarrity; if you have a version of Quicksilver in your Applications folder and you drag in another one, you get a Finder dialogue which claims that there's already a file with the name "QuicksilverB41" (appropriately styled & numbered, of course), when there really isn't.

Add a comment:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.