Uli's Web Site
[ Zathras.de - Uli's Web Site ]
Other Sites: Stories
Abi 2000
Stargate: Resurgence
Lost? Site Map!
     home | blog | moose | programming | articles >> blog

 Blog Topics

15 Most Recent [RSS]

 Less work through Xcode and shell scripts
2011-12-16 @600
 iTunesCantComplain released
2011-10-28 @954
 Dennis Ritchie deceased
2011-10-13 @359
 Thank you, Steve.
2011-10-06 @374
 Cocoa Text System everywhere...
2011-03-27 @788
 Blog migration
2011-01-29 @520
 All you need to know about the Mac keyboard
2010-08-09 @488
 Review: Sherlock
2010-07-31 @978
 Playing with Objective C on Debian
2010-05-08 @456
 Fruit vs. Obst
2010-05-08 @439
 Mixed-language ambiguity
2010-04-15 @994
 Uli's 12:07 AM Law
2010-04-12 @881
 Uli's 1:24 AM Law
2010-04-12 @874
 Uli's 6:28 AM Law
2010-04-12 @869
 Uli's 3:57 PM Law
2010-04-12 @867


How Mac OS X saves disk names...

Okay, so to reproduce a bug, I had to replace Helvetica with another font. My friend Flo grabbed a font with a name of the same length and just did a search-and-replace, and I dropped that in ~/Library/Fonts and I started testing.

A while later I restarted my Mac to boot into another OS version, and the following sight greeted me (sorry, quick cell phone snapshot):

An OS X startup drive selector with two different fonts used for the disk names

Interesting. The startup selector somehow uses the font on the partition. Or, more likely, the (installed) OS renders the disk name into an image file somewhere, using its own font, and that's what the OS X startup selector uses to actually display it, because I don't think anyone would bother adding a whole TrueType rendering engine to EFI, plus make it look up the Helvetica font from each startup drive separately.

Anyone know how this actually works?

Reader Comments: (RSS Feed)
Drew Thaler writes:
The OS renders the disk name into an image. /usr/sbin/bless --label is one way to change it. The code to do it is even available in Darwin: http://www.opensource.apple.com/darwinsource/10.5.2/bless-63/libbless/Misc/BLGenerateOFLabel.c
Qwerty Denzel writes:
I too have wondered how this works, since it not only has to draw the text, images, and the transparent graphics, but it also has retrieve the icons and names somehow for the volumes. Surely what's even stranger is that it is using a font that you put it your user library, not the system or 'local' ones.
Or E-Mail Uli privately.

Created: 2008-03-07 @862 Last change: 2023-12-06 @797 | Home | Admin | Edit
© Copyright 2003-2023 by M. Uli Kusterer, all rights reserved.