470,848 Members | 1,290 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

adjusting tracking or letter spacing of text?

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
0 1734

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Sven Rudolph | last post: by
14 posts views Thread by David C. Stone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.