Re: Using NSSmallCapsFontMask?
Re: Using NSSmallCapsFontMask?
- Subject: Re: Using NSSmallCapsFontMask?
- From: Mark Douma <email@hidden>
- Date: Sun, 12 Sep 2004 00:46:21 -0400
On Apr 06, 2004, at 3:25 PM, Douglas Davidson wrote:
On Apr 6, 2004, at 2:01 AM, Matt Gough wrote:
I am trying to get an NSFont with the NSSmallCapsFontMask trait, but
whenever I do so, my text doesn't get drawn as small caps (via an
AttributedString). I know things are generally right in my app, as
using NSBoldFontMask and or NSItalicFontMask behave as expected.
Bold and italic work as you expect because you are using them with
fonts that have bold and italic variants installed on your system--if
you take a look you probably will discover that this is not the case
with all fonts. Most of the fonts on your system probably have bold
and italic variants available, but not small caps variants. If the
font does not have such a variant, Cocoa will not synthesize one for
you. In the case of small caps, you can simulate the effect by
uppercasing and reducing the font size, although that may not be the
precise typographic equivalent of a true small caps font.
Douglas Davidson
Okay, that's one thing that I don't quite understand. The
Helvetica.dfont (version 4.1d2, 217,250 bytes, Panther) only includes
two faces/variants: regular "Helvetica", and then "Helvetica Bold".
The 'sfnt' resource contains two 'sfnt' entries, one for Helvetica, and
the other for Helvetica Bold. Viewing this font within Font Book shows
what you'd expect, that there are only 2 styles, normal Helvetica, and
Helvetica Bold. Opening the font in FontLab shows the same thing.
Converting the OS X .dfont to a regular Mac TrueType font (by flipping
the fork and setting the proper file type and creator code), copy the
font to an OS 9 machine, and double-click on it to open it, again,
there's Helvetica and Helvetica (bold).
Yet, when the font is installed, in Cocoa applications like TextEdit,
not 2 but 4 variants are available in the font panel: Helvetica
Regular, Helvetica Oblique, Helvetica Bold, and Helvetica Bold Oblique.
What's the source of the Oblique variations?
------------------------------------------------------------------------
---
Mark Douma
Grand Rapids, MI, USA
email@hidden
http://homepage.mac.com/mdouma46/
------------------------------------------------------------------------
---
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden