Hi Everyone, Is there an API function that will draw justified text? Thanks, Xtreme
Posted on 2001-02-26 17:01:00 by xtreme
Justified text has a few meanings to me. The most antiquated of those refers to text which uses spaces to fill in gaps so that columns appear equal. However, since not all fonts in Windows are of a fixed width, justified text in this manner seems rather silly. :) So, with a variable width font, 'justified text' means something a little bit different. Instead of a fixed number of characters, each column will be a certain amount of pixels. In either case, the process is very simple. Simply calculate the width of each column (either before or during runtime), and use the DrawText function (not TextOut), and give the dimensions in the RECT structure needed. If you also need the text to be right aligned or anything else, check out DrawText in the API. Don't worry about clipping...DrawText will take care of that automatically. If there's yet another definition of justification that I don't know of yet, by all means tell me. I'm always interested in learning more. ;)
Posted on 2001-02-26 18:14:00 by Racso
Hi Racso, I was thinking about the CSS "text-align" property. You set this property on a paragraph of Verdana or Arial text and both the left and right sides of the paragraph are straight. Thanks... Xtreme
Posted on 2001-02-26 20:38:00 by xtreme