1
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on Today at 06:10:35 pm »Oh, thanks for the help. I looked at my local commits, and this is the only change I made to PlatWX.cpp, which I try to enable the font smooth. I don't have other changes to scintilla related code.Codediff --git a/src/sdk/wxscintilla/src/PlatWX.cpp b/src/sdk/wxscintilla/src/PlatWX.cpp
index 247b558c..66d64375 100644
--- a/src/sdk/wxscintilla/src/PlatWX.cpp
+++ b/src/sdk/wxscintilla/src/PlatWX.cpp
@@ -198,7 +198,30 @@ void Font::Create(const FontParameters &fp) {
false,
sci2wx(fp.faceName),
encoding);
+
+#ifdef __WXMSW__
+ // enable the smooth font on Windows by default
+ // font rendering issue when using C::B under windows remote desktop
+ // https://forums.codeblocks.org/index.php/topic,25146.msg171484.html#msg171484
+
+ wxString nativeDesc = font.GetNativeFontInfoDesc();
+ int index = 0;
+ for (size_t pos = 0, start = 0; pos <= nativeDesc.length(); )
+ {
+ pos = nativeDesc.find(";", start);
+ index++;
+ if (index == 14) // the index 14 for wx 3.2.1
+ {
+ // enable the cleartype option of the font
+ nativeDesc.replace(start, pos - start, "5");
+ bool result = font.SetNativeFontInfo(nativeDesc);
+ break;
+ }
+ start = pos+1;
+ }
+#endif // __WXMSW__
wxFontWithAscent* newFont = new wxFontWithAscent(font);
+
fid = newFont;
#ifdef HAVE_DIRECTWRITE_TECHNOLOGY
@ollydbg
After many hours, I cannot re-create the error.
Then the only action left is to run both CodeBlocks and clangd_client in "-g" mode in order to catch the assert/crash.
Just copy the devel32_64 versions of them to your release folder after running update32_64.bat.
When the assert happens, click continue and you should get a .RPT with all the line numbers in the backtrace.