<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 20 Aug 2019, at 18:49, Phil Thompson <<a href="mailto:phil@riverbankcomputing.com" class="">phil@riverbankcomputing.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 20/08/2019 15:05, Colin McPhail wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On 18 Aug 2019, at 19:30, Barry Scott <<a href="mailto:barry@barrys-emacs.org" class="">barry@barrys-emacs.org</a>> wrote:<br class="">The attached code shows two problems with QScintilla.<br class="">1. SCI_STYLEGETFONT does not return the font.<br class="">2. Changing the size to 24pt makes line spacing be 24pt but the text is drawn in 11pt.<br class="">(1) looks likes a bug.<br class="">(2) may be that I do not understand something about how to drive the API.<br class="">What makes Scintilla use the changed settings.<br class="">(3) Changing the font does not seem to work either.<br class="">What am I misunderstanding?<br class="">Barry<br class=""></blockquote>I'm not a QScintilla expert but I imagine most people use the<br class="">convenience methods of QScintilla objects such as setFont() and<br class="">setText(). I've attached a version of your example code that uses<br class="">those methods.<br class=""></blockquote><br class="">Yes - the main purpose of the low-level API is to support the needs of the high-level API. It should only need to be used if there is some feature of Scintilla that hasn't got a higher level abstraction.<br class=""></div></div></blockquote><div><br class=""></div><div>Using setFont() has got my code working again. Original code is 3 years old and only broke recently.</div><div><br class=""></div><div>The reason I was using the low level API is that the high level API does not support my</div><div>use case, as far as I can tell.</div><div><br class=""></div><div>I'm using Qscintilla to make a side-by-side diff tool. I colour text to make it easy to see</div><div>inserted, deleted and modified text. This I do by using SCI_STYLESETFORE and</div><div>SCI_STYLESETBACK for 4 style numbers.</div><div><br class=""></div><div>I use STYLE_DEFAULT, STYLE_LASTPREDEFINED+1, STYLE_LASTPREDEFINED+2</div><div>and STYLE_LASTPREDEFINED+3.</div><div><br class=""></div><div>I'm also using INDIC and folding via the low level API.</div><div><br class=""></div><div>BTW the PyPi description page has a bad link to the docs of</div><div><a href="http://pyqt.sourceforge.net/Docs/QScintilla2/" class="">http://pyqt.sourceforge.net/Docs/QScintilla2/</a> I guess it should be</div><div><a href="https://www.riverbankcomputing.com/static/Docs/QScintilla/" class="">https://www.riverbankcomputing.com/static/Docs/QScintilla/</a></div><div><br class=""></div><div><br class=""></div><div>Barry</div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">Phil<br class="">_______________________________________________<br class="">PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" class="">PyQt@riverbankcomputing.com</a><br class=""><a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" class="">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br class=""></div></div></blockquote></div><br class=""></body></html>