diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index f11f68ce..1d08200e 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -5289,6 +5289,7 @@ void Editor::applySettings() pSettings->editor().fontName(), pSettings->editor().fallbackFontName() }; + QFont f=QFont(); f.setFamilies(fontFamilies); f.setPixelSize(pointToPixel(pSettings->editor().fontSize())); diff --git a/RedPandaIDE/settings.h b/RedPandaIDE/settings.h index 5ce9c481..32c46cb7 100644 --- a/RedPandaIDE/settings.h +++ b/RedPandaIDE/settings.h @@ -447,7 +447,7 @@ public: //Font //font QString mFontName; - QString mNonAsciiFontName; + QString mFallbackFontName; int mFontSize; bool mFontOnlyMonospaced; double mLineSpacing; diff --git a/RedPandaIDE/settingsdialog/editorfontwidget.ui b/RedPandaIDE/settingsdialog/editorfontwidget.ui index e1a61717..214f5684 100644 --- a/RedPandaIDE/settingsdialog/editorfontwidget.ui +++ b/RedPandaIDE/settingsdialog/editorfontwidget.ui @@ -48,6 +48,13 @@ + + + + *Needs restart + + + diff --git a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts index 8f1832ce..9e385f4f 100644 --- a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts +++ b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts @@ -1557,6 +1557,10 @@ Fallback Font: + + *Needs restart + *Necessário reiniciar + EditorGeneralWidget diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts index 01bcabd1..fa90d7b0 100644 --- a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts +++ b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts @@ -1653,7 +1653,7 @@ p, li { white-space: pre-wrap; } 输入当前断点的生效条件: - + Readonly 只读 @@ -2059,20 +2059,25 @@ p, li { white-space: pre-wrap; } 表单 - - + + *Needs restart + *需要重启之后生效 + + + + Size: 大小: - - + + Font: 字体: - - + + Show only monospaced fonts 只显示等宽字体 @@ -2089,92 +2094,92 @@ p, li { white-space: pre-wrap; } 显示特殊字符 - + Enable ligatures support 启用连字(ligratures)功能 - + Line Spacing: 行高: - + Fallback Font: 备选字体: - + Show whitespaces 显示空白字符 - + Leading 行首 - + Inner 中间 - + Trailing 行尾 - + Line break 换行符 - + Gutter 装订线 - + Gutter is visible 显示装订线区域 - + Left Offset 左侧留白 - + Right Offset 右侧留白 - + Show Line Numbers 显示行号 - + Add leading zeros to line numbers 在行号前补齐前导0 - + Line numbers starts at zero 第一行从0开始编号 - + Auto calculate the digit count of line number 自动计算行号位数 - + Digit count 行号位数 - + Use Custom Font 使用自定义字体 diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts index 19af9fbd..2ce3dcbd 100644 --- a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts +++ b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts @@ -1390,6 +1390,10 @@ Fallback Font: + + *Needs restart + + EditorGeneralWidget diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index bd57211d..93d80c37 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -6131,15 +6131,16 @@ bool QSynEdit::event(QEvent *event) } } break; - case QEvent::FontChange: - synFontChanged(); - if (mDocument) - mDocument->setFont(font()); - break; case QEvent::MouseMove: { updateMouseCursor(); break; } + case QEvent::FontChange: { + if (mDocument) + mDocument->setFont(font()); + synFontChanged(); + break; + } default: break; } diff --git a/libs/qsynedit/qsynedit/qsynedit.h b/libs/qsynedit/qsynedit/qsynedit.h index ee9d4176..fc17ed03 100644 --- a/libs/qsynedit/qsynedit/qsynedit.h +++ b/libs/qsynedit/qsynedit/qsynedit.h @@ -454,7 +454,6 @@ public: void setBackgroundColor(const QColor &newBackgroundColor); bool isEmpty(); - signals: void linesDeleted(int FirstLine, int Count); void linesInserted(int FirstLine, int Count); @@ -481,7 +480,6 @@ signals: void fontChanged(); void tabSizeChanged(); - protected: virtual bool onGetSpecialLineColors(int Line, QColor& foreground, QColor& backgroundColor) ;