Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: text-fit function?

From: gabriele:colellachiara at: 14-Aug-2004 11:50

Hi Maxim, On Saturday, August 14, 2004, 7:28:32 AM, you wrote: MOA> does anyone know if there is a complement to the MOA> text-size function which tells you how many chars fit inside MOA> a specific area or width? You can't know, fonts can be proportional. If your font is fixed width, then you can just calculate the size of one character and do a division. MOA> I was expecting the area style to store this info in MOA> its lines field... but upon inspecting an allocated on, its MOA> lines attribute was still set to none... Have a look at:
>> help textinfo
USAGE: TEXTINFO face line-info line DESCRIPTION: Sets the line text information in an object for a face. TEXTINFO is a native value. ARGUMENTS: face -- The face for which the information is defined. (Type: object) line-info -- The object where the information will be set. (Type: object) line -- The line to get information for. (Type: number any-string) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/