Re: disabling font smoothing...
Re: disabling font smoothing...
- Subject: Re: disabling font smoothing...
- From: Philip George <email@hidden>
- Date: Tue, 15 Jul 2003 02:30:52 -0500
Oops. Since I flipped the question around, I should also flip the booleans
in the code snippets to true:
CGContextSetShouldSmoothFonts([[NSGraphicsContext currentContext]
graphicsPort], 1);
CGContextSetShouldAntialias([[NSGraphicsContext currentContext]
graphicsPort], 1);
- Philip
On 7/15/03 2:27 AM, "Philip George" <email@hidden> wrote:
>
Here is the long story I was trying to avoid:
>
>
////(saved/unsent email)//
>
//////////////////////////
>
>
Okay, currently in OS X, the user can only asjust the threshold and style of
>
font smoothing in the System Preferences. They cannot turn it completely off
>
altogether. The threshold range is from 8 to 12 inclusively. My app uses
>
Helvetica and Helvetica-Bold 9 to 13 in various parts of the interface and it
>
looks like poop when the fonts aren't antialiased. So, in the end, what I
>
really want to do is the exact opposite of what I originally asked: in other
>
words, I want to ensure that not only is the threshold well below all my
>
interface's font sizes, but also that is definitely ENabled. Now you ask
>
yourself "Why? The user cannot completely DISable it." The answer is that
>
currently there is no mechanism for this, but in future releases of the OS,
>
who knows. I want to think as far ahead as possible so as to avoid having to
>
issue more updates than necessary. I already have code that properly sets the
>
threshold to a really low number (for my app only) at app launch, so that's
>
taken care of, but now I want to be positively 100% sure that font smoothing
>
is ON even in Mac OS X version 10.9.7 or whatever that may actually have a
>
user interace option for siabling font smoothing altogether. It's unlikely,
>
but still possible. So, how do I test if my call to the api that enables the
>
font works if it's alredy on all the time no matter what? I could have set
>
the system threshold really high, commented out my calls to set the threshold
>
to a low number at app launch, and asked "How do i ENable font smoothing?" but
>
it just sounds weird when all of you know that it's on all the time no matter
>
what.
>
>
Haha. Actually the question sounds equally weird however I word it I guess.
>
>
//////////////////////////
>
//////////////////////////
>
>
So now you know why I asked a sort of baited question and why I'm sorry now
>
that I chose to do so. All it did was confuse the issue and lead to "Why"
>
questions.
>
>
So, now that the cat is out of the bag, I guess I should restate the original
>
question:
>
>
Supposing that the user in some future release of the OS could disable font
>
smoothing entirely and globally, what API call can I use to ensure that it is
>
definitely ENabled in my app?
>
>
I know that the answer is obviously:
>
>
CGContextSetShouldSmoothFonts([[NSGraphicsContext currentContext]
>
graphicsPort], 0);
>
>
...and possibly also:
>
>
CGContextSetShouldAntialias([[NSGraphicsContext currentContext] graphicsPort],
>
0);
>
>
>
...but these calls are not working when I call them from main() or my primary
>
class' init() method.
>
>
Why?
>
>
I think the answer to this is that I need to do something with the graphics
>
context like push it or pop it or something after and maybe even before I make
>
those calls.
>
>
What do I need to do?
>
>
PLEASE ONLY RESPOND IF YOU KNOW THE ANSWER OR ARE AT LEAST TRYING TO TAKE A
>
STAB AT AN ANSWER.
>
>
>
- Philip
>
>
>
>
>
On 7/15/03 2:01 AM, "Jeff Harrell" <email@hidden> wrote:
>
>
> Actually, I was referring to globally disabling antialiased fonts for
>
> your application. As opposed to for a specific text field, or at a
>
> specific font and size, or something like that. Having your entire
>
> application use jaggy fonts would not, in my opinion, be a good thing.
>
> But as I said, it's entirely up to you. I just wanted to throw my two
>
> cents in there because I'm an opinionated bastard.
>
>
>
> There is at least one utility out there that will let you disable
>
> antialiased fonts for an entire login session, all applications,
>
> including the Finder. Not sure what it's called, though.
>
>
>
> On Tuesday, July 15, 2003, at 01:57 AM, Philip George wrote:
>
>
>
>> No, no, no. I'm sorry if I gave the impression that I wanted to
>
>> disable
>
>> them globally. Those api's only disable/enable this feature only for
>
>> the
>
>> running app.
>
>>
>
>> I agree, globally disabling would be very bad.
>
>>
>
>> - Philip
>
>>
>
>>
>
>>
>
>> On 7/15/03 1:27 AM, "Jeff Harrell" <email@hidden> wrote:
>
>>
>
>>> On Tuesday, July 15, 2003, at 12:46 AM, Philip George wrote:
>
>>>
>
>>>> I just tried writing a clear explanation of why, but it was really,
>
>>>> really
>
>>>> long. Let's just assume that I have a good reason and go from there.
>
>>>
>
>>> Okay. I'll just say this, and then I'll get out of your hair.
>
>>> High-quality antialiased fonts are a very important part of the Mac OS
>
>>> X user interface. If you're developing an application for wide
>
>>> release,
>
>>> disabling antialiased fonts globally would be, in my opinion, a very,
>
>>> very bad idea.
>
>>>
>
>>> Not that you asked or anything, but there it is. ;-)
>
>>>
>
>>> If, on the other hand, you're developing an in-house application for
>
>>> your own or some limited use, then never mind.
>
>>>
>
>>> --
>
>>> email@hidden
>
>>> http://homepage.mac.com/jharrell
>
>>
>
>>
>
>
>
> --
>
> email@hidden
>
> http://homepage.mac.com/jharrell
_______________________________________________
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.