Hi,
Is there a way to change the line spacing? I use a rather small font and that makes the extra space pixel line(s) between lines more noticeable.
It also gives me fewer lines on the screen at once. For example on another scintilla based editor with the same font, I can get about 90 lines on the screen, while on codelite I can get around 70. The font characters are the same on the screen, but the space between lines is wider on codelite.
So, tips on how to change this would be cool. If there's no current way to change this, could you take this as a feature request?
Thanks
Line spacing in the main window
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Wed Jan 13, 2010 3:58 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Line spacing in the main window
Wow, and interesting bug
Try this: open the font dialog (settings -> syntax highlight and fonts) and select the language you are using.
Select the font you use, and click 'Apply' (not OK) -> you will see that you will be able to see more lines, now:
close the file and re-open it again, it will revert the "line spacing" back - so it seems like there is a different between the two.
I will look into this
Eran
Try this: open the font dialog (settings -> syntax highlight and fonts) and select the language you are using.
Select the font you use, and click 'Apply' (not OK) -> you will see that you will be able to see more lines, now:
close the file and re-open it again, it will revert the "line spacing" back - so it seems like there is a different between the two.
I will look into this
Eran
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Line spacing in the main window
This bug is now fixed in SVN trunk and will be part of the next release
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Wed Jan 13, 2010 3:58 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Line spacing in the main window
There's also this note in the scintilla docs:
Also, there's this stuff from the scintilla docs that might be involved:
Thanks again.
So I set the same font in all cases I could find, but I don't know if there's a hidden font in the mix that I don't have a gui for.All lines of text in Scintilla are the same height, and this height is calculated from the largest font in any current style. This restriction is for performance; if lines differed in height then calculations involving positioning of text would require the text to be styled first.
Also, there's this stuff from the scintilla docs that might be involved:
Not sure though. Just trying to help you, help meSCI_SETEXTRAASCENT(int extraAscent)
SCI_GETEXTRAASCENT
SCI_SETEXTRADESCENT(int extraDescent)
SCI_GETEXTRADESCENT
Text is drawn with the base of each character on a 'baseline'. The height of a line is found from the maximum that any style extends above the baseline (its 'ascent'), added to the maximum that any style extends below the baseline (its 'descent'). Space may be added to the maximum ascent (SCI_SETEXTRAASCENT) and the maximum descent (SCI_SETEXTRADESCENT) to allow for more space between lines. This may done to make the text easier to read or to accomodate underlines or highlights.
Thanks again.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Line spacing in the main window
Read my last post: I fixed this bug in trunk.
Btw, you can set the font to all styles by using the 'Global Font' button, it will set it to all the styles you got on that language.
Eran
Btw, you can set the font to all styles by using the 'Global Font' button, it will set it to all the styles you got on that language.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Wed Jan 13, 2010 3:58 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Line spacing in the main window
This was fixed, thanks; but it came back now that I've updated to v2.3.0.3833
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Line spacing in the main window
This is strange:ds_on_cl wrote:but it came back now that I've updated to v2.3.0.3833
It looks like it depends on the font. with "Bitstream" font, I get 60 lines per editor, while using Courier New, I get 54 (same font size)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Wed Jan 13, 2010 3:58 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Line spacing in the main window
In case it helps, I'm using the PROFONT.FON in Windows xp.
http://www.tobias-jung.de/seekingprofont/
http://www.tobias-jung.de/seekingprofont/
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Wed Jan 13, 2010 3:58 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Line spacing in the main window
I've noticed something else I think is related to this. With the same font (and the same file), if I use View as C++ I get extra whitespace between lines, if I View as Text the extra space goes away and I get more lines on the screen.