Mac OS X Lucida Grande font support

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Mac OS X Lucida Grande font support

Steven Kelly
Native Mac OS X menus use the large Lucida Grande font, but VW sticks to
a smaller Helvetica, which looks rather feeble in comparison:

Lucida Grande:

I've published a package to the public repository that makes VW use
Lucida Grande:

Use Lucida Grande as system widget and menu font. For this to work, we
need more accurate font width information than the integers VW current
uses, otherwise texts of a few dozen characters are already visibly out.
Grab integer widths from a font 1000 times the requested size, and turn
them into Floats. This works in most places, but when editing text the
font still jumps by a sub-pixel amount, and the selection background has
occasional holes, so stick to Helvetica for editable texts.

A prerequisite package fixes two problems with fonts in Mac OS X Aqua:

1) With 7.7.1 image and 7.7.1-7.9 VM on Mac OS X, selecting a font name
containing a space gave a primitive failed error.
  - The problem on native Aqua Mac OS X VM is that the available fonts
are listed with spaces replaced with underscores; selecting them works,
but asking for a font like 'Lucida Grande' (e.g. hard-coded in the
LookPolicy) or 'Times New Roman' (e.g. chosen on Windows) will fail,
because it doesn't match Lucida_Grande / Times_New_Roman.
  - Fix is to undo the underscore<->space and hyphen<->tilde
translation, so fonts are shown and work with the names seen in other
Mac apps and on other platforms.
  - On a Mac X11 VM, this is still an open issue.
  - EuroTSC Case 435549

2) On native / Aqua Mac OS X, unfound fonts would more often give a font
missing error rather than finding an approximate match
  - MacOSX Aqua fails to set FontDescription pixelSize correctly.
Instance variable should be 0, meaning scalable, but was being left as
nil. (This caused an extra penalty of around 3 when matching fonts on
the Mac, i.e. for a minimal unfound font family around 8 rather than 5.
As the FontPolicy tolerance is only 9, any more exotic font request
easily broke that limit on Mac, but would be fine on other platforms.)
When creating a font from a concrete font to match a requested font, use
the requested font's size if the concrete font is scalable.
  - EuroTSC Case 435580

Share and enjoy,

vwnc mailing list
[hidden email]