text tracking

text tracking

Forum member · Feb 20, 2008
Is there a way to adjust the text tracking? Like, if I have a line of text that doesn't quite fill the width of a FormattedTextArea I might like to adjust the spacing between letters to make the line a little wider.

Re: text tracking

Support · Feb 20, 2008
Hello, There is a GetTextWidth() method on the Font object that will give you the required width for a line of text before creating the FormattedTextArea. You pass it a string which is the text your FormattedTextArea will display and the font size and it will return the width of the text: Dim MyFont As Font = Font.Helvetica Dim MyWidth As Single = MyFont.GetTextWidth( "My String", 12 ) Now set the width for FormattedTextArea equal to the width returned. Thanks, ceTe Software Support Team

Re: text tracking

Forum member · Feb 20, 2008
So, if I understand correctly, MyFont.GetTextWidth( "My String", 12 ) will return the width of that string in that font and size. However, that is for a single line of text. If I have multiple lines of text such as is normal in a FormattedTextArea, I might want to make the lines look like they are the same length. For example: this is a paragraph with lots of text and each line gets broken in a different place. Might become t h i s i s a paragraph with lots of t e xt and each lin e gets broken in a dif f e rent place. Of course, I have simply substituted spaces instead of a uniform tracking adjustment. I think newspapers usually do this to make it look better. Just wondering if it might be possible in this or a future release. I was happy to see the Style.Line.Leading variable :) Mike

Re: text tracking

Forum member · Feb 20, 2008
whoops - the box that I'm typing in has a different font than the box that it gets posted in. Well, hopefully the idea is still clear!

Re: text tracking

Support · Feb 20, 2008
Hello Mike, We are adding support for Kerning, which will allow character spacing if the font you are using supports it, in v5.0 of our product. If you would be interested in beta testing v5.0, please send an email to our [^a|mailto:support@cete.com|Support Team^] and they can send you the beta DLL files for v5.0. Thanks, ceTe Software Support Team

Re: text tracking

Support · Feb 21, 2008
Hello Mike, We looked into this further and I turns out that using Kerning would not be the solution to your requirement. Basically kerning is spacing between specific combination of characters and in your scenario the same combination of characters can be there on several lines, each requiring different amount of spacing. You can change the spacing for any character combination, but it will apply for all similar character combinations that exist in the paragraph. Thanks, ceTe Software Support Team