FROM : Douglas Davidson
DATE : Thu Jan 02 18:26:31 2003
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_removed>>
>> Date: Wed Jan 1, 2003 12:49:13 AM US/Pacific
>> To: Andreas Mayer <<email_removed>>, <<email_removed>>
>> Subject: Re: Symbol font
>>
>> On 31/12/02 11:41 pm, Andreas Mayer <<email_removed>> 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_removed>
>> 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_removed>
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Thu Jan 02 18:26:31 2003
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_removed>>
>> Date: Wed Jan 1, 2003 12:49:13 AM US/Pacific
>> To: Andreas Mayer <<email_removed>>, <<email_removed>>
>> Subject: Re: Symbol font
>>
>> On 31/12/02 11:41 pm, Andreas Mayer <<email_removed>> 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_removed>
>> 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_removed>
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Charles Brokaw | Dec 31, 21:57 | |
| Andreas Mayer | Jan 1, 00:41 | |
| Chris Ridd | Jan 1, 09:49 | |
| Mike Ferris | Jan 2, 17:45 | |
| Douglas Davidson | Jan 2, 18:26 | |
| Chris Ridd | Jan 2, 18:29 | |
| Douglas Davidson | Jan 2, 19:11 |






Cocoa mail archive

