textFont inheritance bug on Windows

Alex Rice alrice at arcplanning.com
Fri Aug 29 01:53:00 EDT 2003


On Thursday, August 28, 2003, at 06:17  PM, Dar Scott wrote:
>
>> On Rev 2.1 on Windows, putting "0" for the textFont property in the 
>> inspector causes it to ignore the textSize property- it will revert 
>> to 10 or 11 pt. On OS X with Rev 2.1 a "0" textFont with a textSize 
>> properties behaves as expected: the system font of the specified >> size.
>
> I think a similar bug concerning size and font had been reported and 
> it turned out to be a feature.  You might want to look for that.  
> Memory fading...

Dar you are perhaps thinking of #66, "emptying the textFont also 
empties textSize and textStyle". It was closed as a feature. What Raney 
said in bug #66 makes sense. To paraphrase: setting the textFont to 
empty causes a reset of textFont, textSize and textStyle which are then 
inherited from the parent object. So don't set textFont to empty unless 
that's what you want to happen.

--

Here is a new bug I just opened on the issue I'm seeing (bug #469):

If you set an nonexistent, non empty textFont name then different 
things happen on OS X vs.
Windows. e.g. textFont "0" as in Richard Gaskin's suggestion on use-rev 
for
effectively getting the system's font.

1) Create a stack and set it's textSize to 9 pt

2) Create a field on card 1 and set it's textSize to 24 pt
On both Windows and Mac OS X you now have a 24 pt system font showing 
in the field.

3) Set the textFont of the field to 0 (a nonexistent, not empty font 
name)
On OS X you still see a 24 pt system font in the field.
On Windows you see a 9 pt system font with *32 pt textHeight leading*
(32 pt leading is appropriate for a 24 pt font.)
Changing the textSize of the field subsequently doesn't help except for 
changing
the textHeight leading again.

So you are looking at a 9pt font with 32 pt leading when you should be 
seeing a
24 pt font with 32 pt leading.

The nonexistent textFont name seems to muck up the font rendering on 
Windows but
not on OS X.
--

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
http://ARCplanning.com




More information about the use-livecode mailing list