Hello,
CPFont is lacking some things which are quite vital since we are on
the web and thus multiple platforms.
First of all, multiple font families:
All platforms don't have the same fonts or they are named a bit
differently (such as Lucida Grande on OS X vs Lucida Sans Unicode on
Windows), which you solve in CSS by specifying multiple font-families,
for example:
"font-family: Helvetica, sans-serif"; which gives Helvetica for
everyone that's got access to it but gracefully degrades to a sans-
serif font rather than the default font, which usually is a serif
font.
I've got a local version of Cappuccino which extends CPFont a tiny bit
by to handle multiple fonts just by comma separating them: [CPFont
fontWithName:@"Lucida Grande, Lucida Sans Unicode"]; - which currently
isn't possible with the way some small parts of CPFont works.
I've also added so that there's a fallback to _CPFontSystemFontFace at
the end of the css string - so that you don't get any unexpected
browser-default serif fonts which in most cases makes your app quite
ugly and seem quite amateurish.
---
Now, I'd love to hear what everyone thinks about this - and there's
probably a better way of doing it - both API wise & the actual code,
but I felt I needed to get the ball rolling on this since I'm more of
a designer at heart than a coder, and this is quite important for me
(I can't stand using only Arial!).
View the diff of CPFont at github:
http://github.com/luddep/cappuccino/commit/0126418a11bc1b278ea0433ffe46b818ff619c87
.. and now I'd love to get some feedback :)
Thanks!