Is style a kind of font ?

André.Bisseret Andre.Bisseret at inria.fr
Sun Mar 5 07:55:10 EST 2006


Le Saturday, 4 Mar 2006, à 21:25 Europe/Paris, Jerry Muelver a écrit :

>
> Klaus Major wrote:
>> I, personally, consider this a bug!
>>
>> From the docs about "textfont":
>> If the chunk contains more than one font, the chunk's textFont 
>> property reports "mixed".
>>
>> But even if the textfont is identical and only the styles are "mixed" 
>> I get
>> put the textfont of line 1 of fld 1 -> "mixed
>>
>> Or am I missing something obvious?

Thank you Klaus for your attention and your kind answer.

> Technically, every size, style, and weight of a typeface is different 
> "font". Arial Bold is a different font from just plain Arial. In CSS, 
> note that the font selection is for font-family (like, all the the 
> Arials), font-size, font-stretch, font-style, font-variant, and 
> font-weight. So, if you have the same family (Arial), but several 
> styles (bold for a few characters, bold-italic for the rest), you will 
> have a "mixed" property report.
>
> ---- Jerry Muelver
Thanks a lot Jerry for this clear explanation. Like Klaus, I better 
understand now.

Anyway, I’m not sure that Rev takes this precise definition fullly into 
account. I keep needing to be able in REV to get the name of the « font 
family » for some such part of text, regardless of styles, size, 
stretch etc.

In Rev, assume that I have a text, say, « My taylor is rich » in « 
courier », with « My » and « is » in plain, « taylor » in  italic and 
rich underlined :
I can set the textFont of this text to « Times », the differents words  
keeping their differents styles. So with « set » the textFont exists 
independently of the styles.
But, then, with « get the textFont » it reports « mixed ». So with « 
get » the textFont does not exist independently of the styles.
I am not a linguist, but would it not seem to be somehow a bit 
inconsistent ;-)))

POSSIBLE SOLUTION :
In the current state of Rev (2.6.1), to get the textFont (family) of a 
line,  I understand that we have to get the textFont of one single word 
in this line, or, may be better, of one single char in the line (in 
case the choosen word would have several things like « styles » in it).

Best regards from Grenoble
André





More information about the use-livecode mailing list