diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index a9c8b2fa..2c784e35 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -1549,7 +1549,7 @@ void Settings::Editor::doLoad() mFontName = stringValue("font_name",DEFAULT_MONO_FONT); QString defaultCjkFontName = DEFAULT_MONO_FONT; QString defaultLocaleName = QLocale::system().name(); - bool isZhJa = + bool isCNJP = defaultLocaleName.startsWith("zh_") || defaultLocaleName.startsWith("ja_") || defaultLocaleName==("zh") @@ -1571,7 +1571,7 @@ void Settings::Editor::doLoad() mFontSize = intValue("font_size",12); mFontOnlyMonospaced = boolValue("font_only_monospaced",true); mLineSpacing = doubleValue("line_spacing",1.1); - mForceFixedFontWidth = boolValue("force_fixed_font_width", isZhJa); + mForceFixedFontWidth = boolValue("force_fixed_font_width", isCNJP); // if (mForceFixedFontWidth) // mEnableLigaturesSupport = false; // else diff --git a/libs/qsynedit/qsynedit/constants.cpp b/libs/qsynedit/qsynedit/constants.cpp index 1a2ed5df..e6201287 100644 --- a/libs/qsynedit/qsynedit/constants.cpp +++ b/libs/qsynedit/qsynedit/constants.cpp @@ -22,6 +22,6 @@ const QSet WordBreakChars{'.', ',', ';', ':', '-', '*', '/', '\\', '|'}; const QChar TabGlyph(0x2192); const QChar SpaceGlyph('.'); -const QChar LineBreakGlyph(0x2193); +const QChar LineBreakGlyph(0x21A9); const QChar SoftBreakGlyph(0x2193); } diff --git a/libs/qsynedit/qsynedit/painter.cpp b/libs/qsynedit/qsynedit/painter.cpp index a0ab4cf0..1c92e69e 100644 --- a/libs/qsynedit/qsynedit/painter.cpp +++ b/libs/qsynedit/qsynedit/painter.cpp @@ -426,7 +426,7 @@ void QSynEditPainter::paintToken( switch(glyph.front().unicode()) { case '\t': textToPaint=TabGlyph; - padding=(glyphWidth-1)/2*mEdit->mCharWidth; + padding=(glyphWidth-mPainter->fontMetrics().horizontalAdvance(TabGlyph))/2; break; case ' ': textToPaint=SpaceGlyph;