Change line height.

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Change line height.

Re: Change line spacing.

Post by iKlsR » Sun Jun 23, 2013 11:26 pm

This behaves a bit wonky at first but works.. thanks.

Re: Change line spacing.

Post by robert » Sun Jun 23, 2013 8:48 pm

There's no direct way to artificially set the line height, but since it's based on the height of the font used for the largest token style, you should be able to do something like this:

java code:

Style whitespaceStyle = new Style(Color.gray, null, new Font("Monospaced", 24, Font.PLAIN));
textArea.getSyntaxScheme().setStyle(TokenTypes.WHITESPACE, whitespaceStyle);


This will force the line height to accommodate a 24-point font, and make whitespace characters rendered gray (which is the default). Though note the whitespace foreground color is only important if you call setWhitespaceVisible(true).

Change line height.

Post by iKlsR » Sun Jun 23, 2013 7:50 pm

How would I go about changing the spacing between lines or the line height. I have a custom monospaced font and it looks really clumsy and packed together. I haven't been able to find anything for this in the docs.

Currently what I have..

Image

What I want..

Image

Thanks.

Top