Thursday, April 12, 2007

That free lunch that you were talking about....

Reading on BBC:

From his office in Nevada, entrepreneur Dennis Hope has spawned a multi-million-dollar property business selling plots of lunar real estate at $20 (£10) an acre.


This guy has made $9m till now.

Buyers include Hollywood stars, large corporations - including the Hilton and Marriot hotel chains - and even former US presidents Ronald Reagan and Jimmy Carter. George W Bush is also said to be a stake holder.


What drives me nuts is:

day. He allocates land by simply closing his eyes and pointing to a map of the Moon.



So, uh, who said there was no free lunch? I mean, by the time this guy's claims are challenged in court, he would have enjoyed much of that $9m.

Technorati Tags:

Tuesday, April 10, 2007

Emacs and bitstream fonts

I use emacs on Ubuntu heavily and naturally want a nice font to use. I chose to use the "bitstream vera sans mono" font. Well, easy does it: Options->Customize Emacs->Specific Face: "default", and setting the value of "Font Family" to "bitstream-bitstream vera sans mono" and value of "Height" to "100" gave me the nice font that I wanted. "Custom" created the settings for me:


(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(default ((t (:inherit nil :stipple nil :background "gray12" :foreground "green" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 117 :width normal :family "bitstream vera sans mono")))))

I should mention that I am using the "color-scheme" package and using a nice looking color scheme. The color information probably comes from there.

But then I tried to create a new frame (C-x 5 2) and lo! the new frame had my old font. Reading the emacs faq gave the answer: I'd have to set the font again in the variable that determines the options for all new frames. So I set in my "~/.emacs":

(setq default-frame-alist
'((font . "-bitstream-bitstream vera sans mono-medium-r-normal--0-0-0-0-m-0-iso8859-1")))
and new frames would now have the specified font, which happens to be the same as the original. I wonder if it is a coincidence that the size of the font in new frames and initial matches, because I have not specified the height of the font in this variable.

This seems like a ugly way: why specify the font properties in two different places? So I commented out the face created by custom, and oops! new frames would have a background of white. So I had to undo the change and let the fonts be specified in two places. But at least the initial and new frames have the same good looking font.

Ubuntu Edgy and X11 font bogosity

Using Ubuntu Edgy recently. I'd installed the great bitstream vera fonts and could use them in gnome, but could not see them in X applications, in particular emacs.

Turned out that /etc/X11/xorg.conf had a wrong configuration for fonts. It originally said:

Section "Files"
FontPath "/usr/share/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts.Type1"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
FontPath "/usr/share/X11/fonts/misc"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Turns out that the directory "/usr/share/X11/fonts" is wrong and should be "/usr/share/fonts/X11", I changed the section to:

Section "Files"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/usr/share/fonts/X11/misc"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection
Then I restarted X. But no go. xlsfonts would still not list the bitstream fonts.
The bitstream fonts were linked to from "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType". I went into that directory, and ran
$ sudo ttmkfdir -o fonts.dir -d .
Then I restarted X again. And yes, this time xlsfonts could see the bitstream fonts. So the problems were the wrong font paths and the fact that the fonts.dir file had not been created in the defoma directory. It seems that this is a new bug in Edgy.