Discussion:
text overlap when using the Qt Wrapper for Scintilla
(too old to reply)
Mueller, Joe
2014-07-20 02:14:17 UTC
Permalink
Neil,

I'm setting the language and styles for the lexer before loading any text when I see this problem. If I simply comment out the call to setLexerLanguage then the text displays clearly. For grins I tried to load the text first, then set the language; but the problem presents itself in that case as well.

I've only found one font, "DEC Terminal", that doesn't display improperly. My other application that uses the Tk wrapper for Scintilla (using the same Scintilla code) displays fine regardless of the fonts chosen.

Joe
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-21 05:05:10 UTC
Permalink
Post by Mueller, Joe
I'm setting the language and styles for the lexer before loading any text when I see this problem. If I simply comment out the call to setLexerLanguage then the text displays clearly.
When the text is all one style then each line is drawn in one call. When it has been styled, there are multiple calls, one for each style run and the start position is the cumulative width up to that point. Something is going wrong with the layout information used for determining the width of each run.
Post by Mueller, Joe
I've only found one font, "DEC Terminal", that doesn't display improperly. My other application that uses the Tk wrapper for Scintilla (using the same Scintilla code) displays fine regardless of the fonts chosen.
There could be a naming issue here, since your request for Courier is not successful. Perhaps investigate capitalisation and spaces in the font name. As an example, asking for "Courier New" on OS X yields a warning but still works:

CoreText performance note: Client called CTFontCreateWithName() using name "Courier New" and got font with PostScript name "CourierNewPSMT".

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Loading...