RSyntaxTextArea
RSyntaxTextArea copied to clipboard
configurable line height
would it be possible to make the line spacing configurable? It seems to work when using a factor in RSyntaxTextArea.getLineHeight(), as in
class RSyntaxTextArea ... {
float lineSpacingFactor = ...
...
@Override public int getLineHeight() {
return (int)(lineHeight * lineSpacingFactor)
}
...
Is a multiplier, as you show, sufficient? Allowing the setting of an absolute value seems wrong, since the user may set it too small for the current font(s).
why not just check in the setter if the factor is >=1.0? I see little use for shrinking the line height.
On Jan 9, 2016, at 11:10 AM, Robert Futrell [email protected] wrote:
Is a multiplier, as you show, sufficient? Allowing the setting of an absolute value seems wrong, since the user may set it too small for the current font(s).
� Reply to this email directly or view it on GitHub.
Just thought I would comment here and +1 this feature.
I was surprised to see that RSyntaxTextArea has a getLineHeight method but no way to increase the line height. The line height is completely controlled by a private calculateLineHeight method. When editing large XML docs would be very nice if we could increase the line height by a factor of 1.0,1.25,1.75,or 2.0. A multiplier I think would be sufficient to handle this:
public void setLineSpacing(double lineSpacing) { ... }
We might limit it a range of 1.0 and some reasonable maximum.