Not many people know this.
Mark Waddingham
mark at livecode.com
Thu Aug 16 11:11:45 EDT 2018
On 2018-08-16 11:32, Richmond Mathewson via use-livecode wrote:
> Possibly I am reinventing the wheel here:
>
> set the textFont of word 3 to "Charcoal"
>
> This IS incredibly useful when one is typing to Mum in Sanskrit (as
> one does) and wants to
> use a variant glyph (as one does continuously) as it allows one to
> have 2 congruent fonts
> side-by-side featuring differing variants of standard glyphs.
Indeed!
All characters in a field can have a distinct textFont, textStyle and
textSize (and a number of other properties - they are called 'char level
styles' - in the docs you can see the ones which are which show an
example which is 'the ... of char of field' IIRC).
If such a char level property is empty for a given char, then it
inherits from the field.
This has 'always been the case' - the only difference to it in the last
10 years is when we made it so textFont/textSize and textStyle
independent. Previously, if you set one at the char level - all three
would be set.
Warmest Regards,
Mark.
P.S. The engine doesn't actually store things per-char - but in runs -
i.e. if the complete set of properties for char N ... N+M are identical,
then it stores that information. This reduces the overhead of the
per-char styles to when they are used, rather than universally.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list