By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

adjusting tracking or letter spacing of text?

P: n/a
Letters appear too close together in sans serif default font
when displayed in a JTextComponent. I see that there is
a field called advance in one of the classes in java.awt.font,
which is described as controlling letter spacing (or tracking),
but it is extremely unclear how this field can be set or
how it then can be made to affect a JTextComponent. Ideally
it seems as if there should be a way to call some
method in the relevant Font object in order to produce an
adjustment of this property of how the font is rendered
(as well as related properties such as space between lines
of text and so on). Perhaps there is a way to do this
with TextLayout, though it seems like the amount of effort
required to manipulate TextLayout objects is far out of
proportion to the seemingly simple task I am trying to do.
Any assistance would be greatly appreciated.
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.