bug report: QsciScintilla::setStylesFont SCI_STYLESETWEIGHT exist error !
Phil Thompson
phil at riverbankcomputing.com
Wed Jul 12 16:49:38 BST 2023
On 12/07/2023 08:17, 409652570 wrote:
> // Set the font for a style.
> void QsciScintilla::setStylesFont(const QFont &f, int style)
> {
> //20220629这里是中文编码的一个bug
> SendScintilla(SCI_STYLESETFONT, style,
> f.family().toUtf8().data());
> SendScintilla(SCI_STYLESETSIZEFRACTIONAL, style,
> long(f.pointSizeF() * SC_FONT_SIZE_MULTIPLIER));
>
> // Pass the Qt weight via the back door.
> SendScintilla(SCI_STYLESETWEIGHT, style, -f.weight()); ------ >
> // It's quite strange here, there's a negative number.
> //This is not the main issue yet. The main bug is that after setting
> it like this, when modifying the style, it will result in no other
> styles and randomly become bold.
> For example, when I modify the content of Style 10 to bold, it may
> cause other styles of content to also become bold.
>
> //Use SCI_STYLESETBOLD After replacing by STYLESETBOLD, it was
> found that the problem was resolved.
> //SendScintilla(SCI_STYLESETBOLD, style, f.bold());
>
> btw:Can someone take my feedback seriously? I have provided feedback
> on at least three questions and have not responded to them. If this is
> an open source project and I don't see any code in Github, where can I
> submit the patch?
QScintilla is not an open source project. It is a commercial product
that is also distributed under an open source license. You can send a
patch to the mailing list or to me directly. However please include a
full explanation of the bug it fixes and include a short, complete test
that demonstrates the problem so that I can reproduce it.
Phil
More information about the QScintilla
mailing list