[futurebasic] Re: [FB] Unicode Text Proc

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2004 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Fri, 13 Aug 2004 17:03:25 -0400
On Friday, August 13, 2004, at 08:17  AM, Robert Purves wrote:

>
> Robert Covington wrote:
>
>> Is there a way  using a UnicodeTextProc control  (912) to turn off 
>> the anti-aliasing  (and to turn it back on)?
>> Have a need for showing an anti-a free preview or not (according to 
>> the current pref)
>
> The _kControlEditUnicodeTextProc control is built around TXN 
> (TeXteNsion, also known as MLTE, also known as MacTextEditor). The 
> text, along with many ATSUI attributes, is presumably contained in an 
> underlying TXNObject. Unfortunately there is no way to access the 
> TXNObject to play tricks on it, such as turning off antialiasing.

That makes good sense and thanks. That also explains all the underlying 
unicodeTextProc edit field problems too (TXN) :), doesn't it, given our 
experiences with MLTE bugs during Editor X days, if TXN is involved? :)


What I'll do is this...if Anti-A is off, I'll use the EditTextProc 
(which is ok for that), and otherwise use the Unicode for the preview. 
However that will lie if the font size is beneath the current system 
setting for anti-aliased point size minimum...So Can You Know The 
System's "Don't Anti-A" minimum point size? Then I can use the regular 
once below the threshold even if anti-a is on. (The "turn off font 
smoothing" setting, in System Preferences : General Pane)

r
c

>
> For those unfamiliar with the control, here's a minimal demo:
>
> '-----------------
> '~'A
> '                             Runtime : Rntm Appearance.Incl
> '                                 CPU : Carbon
> '~'B
> _kControlEditUnicodeTextProc = 912
> dim as Rect       r
> if ( system( _sysVers ) < 1000 ) then ¬
>     shutdown "Requires OS X"
> window 1
> SetRect( r, 100, 100, 350, 115 )
> appearance button 1,,,,,, @r, _kControlEditUnicodeTextProc
> def SetButtonTextString( 1, "_kControlEditUnicodeTextProc" )
> def SetButtonFocus( 1 )
>
> do
> HandleEvents
> until 0
> '-----------------
>
>
> Robert P.
>
> --
>