[QScintilla] Weird Eric4 Editor Font Spacing and Highlighting

Larry Shaffer larrys at dakotacarto.com
Tue Feb 9 19:40:21 GMT 2010


Hi,

I submitted this to the eric list, but I think it is QScintilla/Qt related:

I am run Mac OS X 10.5.8 on an Intel Mac Pro.

<quote>
I've recently built eric4 on a Mac with:

Python 2.6.4 
Qt 4.6.1 
PyQt 4.7 
sip 4.10 
QScintilla 2.4.2 
eric4 4.4.1 (r3649)

But this time I installed everything except eric4 via MacPorts (took a long
time). I have another installation with the same version numbers, but
installed via Qt Framework (Carbon) package installer that works great.

This MacPorts version, and a version when I attempted to install using the
Mac Cocoa-Only Qt 4.6.1 package installer once, exhibit the same weird font
spacing issues (all styles are set to same font when testing this)...

qscintilla-fontspacing_001.jpg:
http://dl.dropbox.com/u/4058089/eric4/qscintilla-fontspacing_001.jpg

The only font on my Mac I could get to work 'normally' is Inconsolata 14 pt.
Text is selected properly and highlighting is registered over the correct,
found words. The indentation visual guides are incorrect, however. (Setting
both the default mono-spaced font and all of the styles to Inconsolata fixes
the guides, but makes all of the text bold.)

qscintilla-fontspacing_002.jpg (switched to Monaco 12 pt, highlighting on
word 'editor')
http://dl.dropbox.com/u/4058089/eric4/qscintilla-fontspacing_002.jpg

Any other assigned font, mono-spaced or variable width, causes the editor to
display the characters with variable spacing, but act as if it was being
displayed as mono-spaced, i.e. the highlighting is over the wrong words and
extra space exists to the right, but not for all syntax. Each type of syntax
that can be styled in the preferences has a different letter spacing issue.
Quote strings are the worst, while parentheses register correctly. When
selecting text, the characters move/jump around under the cursor and into
their correct positions if selected (the weird part).

qscintilla-fontspacing_003.jpg (selected versus unselected code)
http://dl.dropbox.com/u/4058089/eric4/qscintilla-fontspacing_003.jpg

The problem compounds with more text. There are no spaces in this code near
any parentheses. The apparent spaces and out-of-sync text positions get
worse on the right and pretty much make eric unusable as an editor.
(Excepting the one font noted above that luckily happens to be formatted
just right to work, though I think it is an annoying font to be stuck coding
with - could be worse, I guess.)

The same text issues happen in the eric's Shell, Terminal and Mini Editor,
so I think it is the QScintilla widget not liking the latest Qt for Mac
Cocoa only.

Installing Qscintilla via source did not change anything. Tried latest
QScintilla snapshot, but it didn't fix this either. All of the newest Qt
installs will probably be non-Carbon soon, so the problem is not going away.

Has anyone else seen this? Are there any settings to affect this in eric, or
its code?
</quote>

-- 
Larry




More information about the QScintilla mailing list