• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Symbol font
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Symbol font


  • Subject: Re: Symbol font
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 2 Jan 2003 09:26:31 -0800

Well, actually what was happening in this case is that the developer was explicitly specifying the Symbol font, but using a character ("k") that can't be rendered in the Symbol font. If he just specifies the correct Unicode character for kappa, then the Symbol font will be used to render it. So it doesn't matter how many other fonts you have that can display Greek characters, as long as the font that is specified can.

It would matter in the opposite case, in which the character specified was kappa but the font specified didn't have a kappa--for example, if Helvetica were specified, or if no font were specified. In that case, the text system would have to pick a font that could render kappa, and there would be some arbitrariness in the result. Font fixing came into play in this case for the opposite reason, because the character was an ordinary ASCII character, but the font specified didn't cover the ASCII range. So a fallback font was picked that could render ASCII--in this case, probably Helvetica.

If you want to avoid font fixing, all you have to do is use an appropriate font yourself for each character. If you want to modify font fixing, you can override the appropriate method on a custom NSTextStorage subclass. If you don't do either of those things, then the system will pick a font--really, a font family, since the more specific traits will, as Mike says, be taken from the original font--based on its own notions.

Douglas Davidson

On Thursday, January 2, 2003, at 08:45 AM, Mike Ferris wrote:

The Cocoa text system's "font fixing" will look for a font that has visual properties similar to the font assigned to a character if it has to find a different font. It takes into account such things as weight, italics, serif/sans-serif, etc... Obviously this is a slightly fuzzy process. So if you have 5 fonts with the Kappa character, you should get the one that is closest in appearance to the font that was assigned to the character.

Mike


Begin forwarded message:

From: Chris Ridd <email@hidden>
Date: Wed Jan 1, 2003 12:49:13 AM US/Pacific
To: Andreas Mayer <email@hidden>, <email@hidden>
Subject: Re: Symbol font

On 31/12/02 11:41 pm, Andreas Mayer <email@hidden> wrote:
Am Dienstag, 31.12.02 um 21:57 Uhr schrieb Charles Brokaw:

What do I need to do to draw a character with Symbol font ?

You need to use the right character.

"Greek Small Letter Kappa" is 0x03BA

Use the Character Palette or any Unicode table to find the codes you
need.

This is because under the hood, OS X switches fonts for you when it needs to
display a Unicode character that doesn't exist in the current font. So you
just use Unicode everywhere and let the OS worry about it for you :-)

What would happen however if you had multiple fonts that supplied Greek
Small Letter Kappas (or whatever)? Which font would the OS choose?

Cheers,

Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Symbol font (From: Mike Ferris <email@hidden>)

  • Prev by Date: Re: Framework Classes in IB
  • Next by Date: Re: Symbol font
  • Previous by thread: Re: Symbol font
  • Next by thread: Re: Symbol font
  • Index(es):
    • Date
    • Thread