add more fall back fonts
This commit is contained in:
parent
174808d416
commit
dfd7075dfb
|
@ -677,6 +677,28 @@ void Settings::Editor::setFallbackFontName(const QString &newFontName)
|
|||
mFallbackFontName = newFontName;
|
||||
}
|
||||
|
||||
const QString &Settings::Editor::fallbackFontName2() const
|
||||
{
|
||||
return mFallbackFontName2;
|
||||
}
|
||||
|
||||
void Settings::Editor::setFallbackFontName2(const QString &newFontName)
|
||||
{
|
||||
mFallbackFontName2 = newFontName;
|
||||
}
|
||||
|
||||
const QString &Settings::Editor::fallbackFontName3() const
|
||||
{
|
||||
return mFallbackFontName3;
|
||||
}
|
||||
|
||||
void Settings::Editor::setFallbackFontName3(const QString &newFontName)
|
||||
{
|
||||
mFallbackFontName3 = newFontName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int Settings::Editor::mouseSelectionScrollSpeed() const
|
||||
{
|
||||
return mMouseSelectionScrollSpeed;
|
||||
|
@ -1349,6 +1371,8 @@ void Settings::Editor::doSave()
|
|||
//font
|
||||
saveValue("font_name", mFontName);
|
||||
saveValue("fallback_font_name", mFallbackFontName);
|
||||
saveValue("fallback_font_name2", mFallbackFontName2);
|
||||
saveValue("fallback_font_name3", mFallbackFontName3);
|
||||
saveValue("font_size", mFontSize);
|
||||
saveValue("font_only_monospaced", mFontOnlyMonospaced);
|
||||
saveValue("line_spacing",mLineSpacing);
|
||||
|
@ -1492,6 +1516,8 @@ void Settings::Editor::doLoad()
|
|||
else if (defaultLocaleName == "zh_CN")
|
||||
defaultCjkFontName = CJK_MONO_FONT_SC;
|
||||
mFallbackFontName = stringValue("fallback_font_name",defaultCjkFontName);
|
||||
mFallbackFontName2 = stringValue("fallback_font_name2",DEFAULT_MONO_FONT);
|
||||
mFallbackFontName3 = stringValue("fallback_font_name3",DEFAULT_MONO_FONT);
|
||||
mFontSize = intValue("font_size",12);
|
||||
mFontOnlyMonospaced = boolValue("font_only_monospaced",true);
|
||||
mLineSpacing = doubleValue("line_spacing",1.1);
|
||||
|
|
|
@ -356,7 +356,13 @@ public:
|
|||
void setEnableLigaturesSupport(bool newEnableLigaturesSupport);
|
||||
|
||||
const QString &fallbackFontName() const;
|
||||
void setFallbackFontName(const QString &newNonAsciiFontName);
|
||||
void setFallbackFontName(const QString &newFontName);
|
||||
|
||||
const QString &fallbackFontName2() const;
|
||||
void setFallbackFontName2(const QString &newFontName);
|
||||
|
||||
const QString &fallbackFontName3() const;
|
||||
void setFallbackFontName3(const QString &newFontName);
|
||||
|
||||
int mouseSelectionScrollSpeed() const;
|
||||
void setMouseSelectionScrollSpeed(int newMouseSelectionScrollSpeed);
|
||||
|
@ -448,6 +454,8 @@ public:
|
|||
//font
|
||||
QString mFontName;
|
||||
QString mFallbackFontName;
|
||||
QString mFallbackFontName2;
|
||||
QString mFallbackFontName3;
|
||||
int mFontSize;
|
||||
bool mFontOnlyMonospaced;
|
||||
double mLineSpacing;
|
||||
|
|
|
@ -57,6 +57,8 @@ void EditorFontWidget::doLoad()
|
|||
ui->chkOnlyMonospacedFonts->setChecked(pSettings->editor().fontOnlyMonospaced());
|
||||
ui->cbFont->setCurrentFont(QFont(pSettings->editor().fontName()));
|
||||
ui->cbFallbackFont->setCurrentFont(QFont(pSettings->editor().fallbackFontName()));
|
||||
ui->cbFallbackFont2->setCurrentFont(QFont(pSettings->editor().fallbackFontName2()));
|
||||
ui->cbFallbackFont3->setCurrentFont(QFont(pSettings->editor().fallbackFontName3()));
|
||||
ui->spinFontSize->setValue(pSettings->editor().fontSize());
|
||||
ui->spinLineSpacing->setValue(pSettings->editor().lineSpacing());
|
||||
ui->chkLigature->setChecked(pSettings->editor().enableLigaturesSupport());
|
||||
|
@ -85,6 +87,8 @@ void EditorFontWidget::doSave()
|
|||
pSettings->editor().setFontOnlyMonospaced(ui->chkOnlyMonospacedFonts->isChecked());
|
||||
pSettings->editor().setFontName(ui->cbFont->currentFont().family());
|
||||
pSettings->editor().setFallbackFontName(ui->cbFallbackFont->currentFont().family());
|
||||
pSettings->editor().setFallbackFontName2(ui->cbFallbackFont2->currentFont().family());
|
||||
pSettings->editor().setFallbackFontName3(ui->cbFallbackFont3->currentFont().family());
|
||||
pSettings->editor().setFontSize(ui->spinFontSize->value());
|
||||
pSettings->editor().setLineSpacing(ui->spinLineSpacing->value());
|
||||
|
||||
|
|
|
@ -23,160 +23,20 @@
|
|||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QWidget" name="widget_9" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFontComboBox" name="cbFallbackFont">
|
||||
<property name="editable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>*Needs restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QWidget" name="widget_10" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinLineSpacing">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>3.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>563</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Size:</string>
|
||||
<string>Font:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="chkLigature">
|
||||
<property name="text">
|
||||
<string>Enable ligatures support</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Line Spacing:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinFontSize">
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
|
@ -228,6 +88,67 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QWidget" name="widget_10" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinLineSpacing">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>3.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>563</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Line Spacing:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
|
@ -235,13 +156,188 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Font:</string>
|
||||
<string>Fallback Font 2:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QWidget" name="widget_9" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFontComboBox" name="cbFallbackFont">
|
||||
<property name="editable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>*Needs restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinFontSize">
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Fallback Font 3:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QWidget" name="widget_11" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFontComboBox" name="cbFallbackFont2"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>*Needs restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QWidget" name="widget_12" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFontComboBox" name="cbFallbackFont3"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>*Needs restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -1561,6 +1561,14 @@
|
|||
<source>*Needs restart</source>
|
||||
<translation type="unfinished">*Necessário reiniciar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fallback Font 2:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fallback Font 3:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditorGeneralWidget</name>
|
||||
|
|
|
@ -2059,25 +2059,27 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>表单</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="54"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="194"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="280"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="321"/>
|
||||
<source>*Needs restart</source>
|
||||
<translation>*需要重启之后生效</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="124"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="508"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="94"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="604"/>
|
||||
<source>Size:</source>
|
||||
<translation>大小:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="241"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="501"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="29"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="597"/>
|
||||
<source>Font:</source>
|
||||
<translation>字体:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="211"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="596"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="71"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="692"/>
|
||||
<source>Show only monospaced fonts</source>
|
||||
<translation>只显示等宽字体</translation>
|
||||
</message>
|
||||
|
@ -2094,92 +2096,102 @@ p, li { white-space: pre-wrap; }
|
|||
<translation type="vanished">显示特殊字符</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="131"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="36"/>
|
||||
<source>Enable ligatures support</source>
|
||||
<translation>启用连字(ligratures)功能</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="138"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="148"/>
|
||||
<source>Line Spacing:</source>
|
||||
<translation>行高:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="234"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="155"/>
|
||||
<source>Fallback Font:</source>
|
||||
<translation>备选字体:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="251"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="162"/>
|
||||
<source>Fallback Font 2:</source>
|
||||
<translation>备选字体2:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="255"/>
|
||||
<source>Fallback Font 3:</source>
|
||||
<translation>备选字体3:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="347"/>
|
||||
<source>Show whitespaces</source>
|
||||
<translation>显示空白字符</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="257"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="353"/>
|
||||
<source>Leading</source>
|
||||
<translation>行首</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="264"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="360"/>
|
||||
<source>Inner</source>
|
||||
<translation>中间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="271"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="367"/>
|
||||
<source>Trailing</source>
|
||||
<translation>行尾</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="278"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="374"/>
|
||||
<source>Line break</source>
|
||||
<translation>换行符</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="288"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="384"/>
|
||||
<source>Gutter</source>
|
||||
<translation>装订线</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="309"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="405"/>
|
||||
<source>Gutter is visible</source>
|
||||
<translation>显示装订线区域</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="331"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="427"/>
|
||||
<source>Left Offset</source>
|
||||
<translation>左侧留白</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="348"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="444"/>
|
||||
<source>Right Offset</source>
|
||||
<translation>右侧留白</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="381"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="477"/>
|
||||
<source>Show Line Numbers</source>
|
||||
<translation>显示行号</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="405"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="501"/>
|
||||
<source>Add leading zeros to line numbers</source>
|
||||
<translation>在行号前补齐前导0</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="412"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="508"/>
|
||||
<source>Line numbers starts at zero</source>
|
||||
<translation>第一行从0开始编号</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="419"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="515"/>
|
||||
<source>Auto calculate the digit count of line number</source>
|
||||
<translation>自动计算行号位数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="441"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="537"/>
|
||||
<source>Digit count</source>
|
||||
<translation>行号位数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="477"/>
|
||||
<location filename="../settingsdialog/editorfontwidget.ui" line="573"/>
|
||||
<source>Use Custom Font</source>
|
||||
<translation>使用自定义字体</translation>
|
||||
</message>
|
||||
|
@ -9059,7 +9071,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>生成调试信息(-g3)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings.cpp" line="3440"/>
|
||||
<location filename="../settings.cpp" line="3466"/>
|
||||
<source>Would you like Red Panda C++ to search for compilers in PATH?</source>
|
||||
<translation>您同意小熊猫C++在PATH路径中寻找gcc编译器吗?</translation>
|
||||
</message>
|
||||
|
@ -9270,7 +9282,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation type="vanished">只生成汇编代码(-S)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings.cpp" line="3442"/>
|
||||
<location filename="../settings.cpp" line="3468"/>
|
||||
<source>Confirm</source>
|
||||
<translation>确认</translation>
|
||||
</message>
|
||||
|
@ -9291,13 +9303,13 @@ p, li { white-space: pre-wrap; }
|
|||
<translation type="vanished">如果仍然保留这些设置,可能会导致编译错误。<br /><br />请选择“是”,除非您清楚的知道选择“否”的后果,</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings.cpp" line="3432"/>
|
||||
<location filename="../settings.cpp" line="3438"/>
|
||||
<location filename="../settings.cpp" line="3458"/>
|
||||
<location filename="../settings.cpp" line="3464"/>
|
||||
<source>Compiler set not configuared.</source>
|
||||
<translation>未配置编译器设置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings.cpp" line="3434"/>
|
||||
<location filename="../settings.cpp" line="3460"/>
|
||||
<source>Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? </source>
|
||||
<translation>您需要小熊猫C++在下列位置搜索编译器吗:<br />%1<br />%2</translation>
|
||||
</message>
|
||||
|
@ -9666,7 +9678,7 @@ p, li { white-space: pre-wrap; }
|
|||
<location filename="../autolinkmanager.cpp" line="54"/>
|
||||
<location filename="../autolinkmanager.cpp" line="70"/>
|
||||
<location filename="../autolinkmanager.cpp" line="89"/>
|
||||
<location filename="../settings.cpp" line="4055"/>
|
||||
<location filename="../settings.cpp" line="4081"/>
|
||||
<location filename="../widgets/ojproblemsetmodel.cpp" line="168"/>
|
||||
<location filename="../widgets/ojproblemsetmodel.cpp" line="229"/>
|
||||
<source>Can't open file '%1' for read.</source>
|
||||
|
@ -9721,7 +9733,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>无法检测适用于 “%1” 的终端参数模式。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings.cpp" line="3300"/>
|
||||
<location filename="../settings.cpp" line="3326"/>
|
||||
<source>Error executing platform compiler hint add-on</source>
|
||||
<translation>执行平台编译器提示附加组件错误</translation>
|
||||
</message>
|
||||
|
@ -10685,12 +10697,12 @@ p, li { white-space: pre-wrap; }
|
|||
<context>
|
||||
<name>Settings</name>
|
||||
<message>
|
||||
<location filename="../settings.cpp" line="4042"/>
|
||||
<location filename="../settings.cpp" line="4068"/>
|
||||
<source>Error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings.cpp" line="4043"/>
|
||||
<location filename="../settings.cpp" line="4069"/>
|
||||
<source>Can't find terminal program!</source>
|
||||
<translation>找不到合适的终端程序!</translation>
|
||||
</message>
|
||||
|
|
|
@ -1394,6 +1394,14 @@
|
|||
<source>*Needs restart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fallback Font 2:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fallback Font 3:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditorGeneralWidget</name>
|
||||
|
|
|
@ -147,7 +147,10 @@ void CPUDialog::resetEditorFont(float dpi)
|
|||
f.setFamilies(
|
||||
QStringList{
|
||||
pSettings->editor().fontName(),
|
||||
pSettings->editor().fallbackFontName()});
|
||||
pSettings->editor().fallbackFontName(),
|
||||
pSettings->editor().fallbackFontName2(),
|
||||
pSettings->editor().fallbackFontName3(),
|
||||
});
|
||||
f.setPixelSize(pointToPixel(pSettings->editor().fontSize(),dpi));
|
||||
f.setStyleStrategy(QFont::PreferAntialias);
|
||||
ui->txtCode->setFont(f);
|
||||
|
|
|
@ -1750,7 +1750,7 @@ int Document::glyphWidth(const QString &glyph, int left, const QFontMetrics &fon
|
|||
if (ch == '\t') {
|
||||
glyphWidth = tabWidth() - left % tabWidth();
|
||||
} else {
|
||||
glyphWidth = fontMetrics.horizontalAdvance(ch);
|
||||
glyphWidth = fontMetrics.horizontalAdvance(glyph);
|
||||
//qDebug()<<glyph<<glyphCols<<width<<mCharWidth;
|
||||
}
|
||||
return glyphWidth;
|
||||
|
|
Loading…
Reference in New Issue