Gui: Fix #12199 missing font family Courier on MacOS
This commit is contained in:
committed by
Benjamin Nauck
parent
2da7c9ff17
commit
fcd1b923b3
@@ -200,7 +200,7 @@
|
||||
<g
|
||||
id="path1">
|
||||
<path
|
||||
style="color:#000000;-inkscape-font-specification:'Latin Modern Mono';fill:#2e3436;stroke-linecap:round;-inkscape-stroke:none;paint-order:markers stroke fill"
|
||||
style="color:#000000;fill:#2e3436;stroke-linecap:round;-inkscape-stroke:none;paint-order:markers stroke fill"
|
||||
d="m 44.904297,11.738281 c -0.854526,-0.01652 -2.011504,0.02136 -3.367188,0.833985 -1.355683,0.812622 -2.523437,2.808615 -2.523437,4.61914 0,2.101331 1.674838,3.84977 2.8125,4.408203 1.137662,0.558434 1.665884,0.628907 2.626953,0.628907 h 0.04102 0.03906 c 0.489855,-0.01093 0.312432,-0.02748 0.285156,-0.03516 v 9.111328 c 0,0.709512 0.08365,1.663977 0.736328,3.091797 0.18144,0.396921 0.537139,0.824473 0.820313,1.244141 -0.283174,0.419668 -0.638873,0.84722 -0.820313,1.244141 -0.652681,1.427819 -0.736328,2.382282 -0.736328,3.091796 v 9.111329 c 0.02727,-0.0077 0.2047,-0.02423 -0.285156,-0.03516 h -0.03906 -0.04102 c -0.961066,0 -1.48929,0.07047 -2.626953,0.628907 -1.137663,0.558433 -2.8125,2.306872 -2.8125,4.408203 0,1.810525 1.167756,3.80652 2.523437,4.61914 1.355682,0.812621 2.512673,0.8505 3.367188,0.833985 0.765073,-0.01478 2.796318,-0.07051 5.095703,-1.080078 2.290144,-1.005507 4.979527,-3.486362 5.478516,-7.169922 0.104934,-0.67578 0.06454,-0.711778 0.07227,-1.035157 0.0083,-0.349614 0.01212,-0.766462 0.01563,-1.21875 0.007,-0.904575 0.0078,-1.940131 0.0078,-2.679687 v -4.748047 c 0,-0.452734 -0.01618,-0.31676 0,-0.476562 0.418109,-0.111436 0.676781,-0.160157 1.291015,-0.160157 1.101115,0 2.726967,-0.346376 3.847657,-1.585937 1.12069,-1.239561 1.296875,-2.66616 1.296875,-3.748047 0,-1.081887 -0.176186,-2.508486 -1.296875,-3.748047 -1.12069,-1.239561 -2.746541,-1.585937 -3.847657,-1.585937 -0.614234,0 -0.872905,-0.04872 -1.291015,-0.160157 -0.01618,-0.159802 0,-0.02383 0,-0.476562 v -4.748047 c 0,-0.739539 -8e-4,-1.775106 -0.0078,-2.679688 -0.0035,-0.45229 -0.0073,-0.871074 -0.01563,-1.220703 -0.0077,-0.323345 0.03268,-0.357496 -0.07227,-1.033203 C 54.979527,16.304721 52.290144,13.823866 50,12.818359 47.700615,11.808795 45.66937,11.753065 44.904297,11.738281 Z M 44.375,15.117188 h 0.07813 c 0.452656,0 0.341666,0.03236 0.355469,0.06836 -0.15003,-0.004 -0.282644,-0.07173 -0.433594,-0.06836 z m 0.490234,40.966796 c -0.06473,0.06387 0.112866,0.08008 -0.412109,0.08008 l -0.07813,-0.002 c 0.170713,0.0038 0.320735,-0.07256 0.490234,-0.07813 z"
|
||||
id="path2" />
|
||||
<path
|
||||
@@ -225,7 +225,7 @@
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:11.8523px;line-height:1.21;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';letter-spacing:0.0800033px;stroke-width:0.888926"
|
||||
style="font-size:11.8523px;line-height:1.21;letter-spacing:0.0800033px;stroke-width:0.888926"
|
||||
x="26.542322"
|
||||
y="0.86381811"
|
||||
id="text2"><tspan
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -425,7 +425,8 @@ PythonConsole::PythonConsole(QWidget *parent)
|
||||
|
||||
setVisibleLineNumbers(false);
|
||||
setEnabledHighlightCurrentLine(false);
|
||||
QFont serifFont(QLatin1String("Courier"), 10, QFont::Normal);
|
||||
QFont serifFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
serifFont.setPointSize(10);
|
||||
setFont(serifFont);
|
||||
|
||||
// set colors and font from settings
|
||||
|
||||
@@ -464,7 +464,7 @@ ReportOutput::~ReportOutput()
|
||||
|
||||
void ReportOutput::restoreFont()
|
||||
{
|
||||
QFont serifFont(QLatin1String("Courier"), 10, QFont::Normal);
|
||||
QFont serifFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
setFont(serifFont);
|
||||
}
|
||||
|
||||
@@ -854,9 +854,8 @@ void ReportOutput::OnChange(Base::Subject<const char*> &rCaller, const char * sR
|
||||
}
|
||||
else if (strcmp(sReason, "FontSize") == 0 || strcmp(sReason, "Font") == 0) {
|
||||
int fontSize = rclGrp.GetInt("FontSize", 10);
|
||||
QString fontFamily = QString::fromLatin1(rclGrp.GetASCII("Font", "Courier").c_str());
|
||||
|
||||
QFont font(fontFamily, fontSize);
|
||||
QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
font.setPointSize(fontSize);
|
||||
setFont(font);
|
||||
QFontMetrics metric(font);
|
||||
int width = QtTools::horizontalAdvance(metric, QLatin1String("0000"));
|
||||
|
||||
@@ -281,7 +281,8 @@ TextEditor::TextEditor(QWidget* parent)
|
||||
d = new TextEditorP();
|
||||
lineNumberArea = new LineMarker(this);
|
||||
|
||||
QFont serifFont(QLatin1String("Courier"), 10, QFont::Normal);
|
||||
QFont serifFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
serifFont.setPointSize(10);
|
||||
setFont(serifFont);
|
||||
|
||||
ParameterGrp::handle hPrefGrp = getWindowParameter();
|
||||
@@ -447,9 +448,8 @@ void TextEditor::OnChange(Base::Subject<const char*> &rCaller,const char* sReaso
|
||||
#else
|
||||
int fontSize = hPrefGrp->GetInt("FontSize", 10);
|
||||
#endif
|
||||
QString fontFamily = QString::fromLatin1(hPrefGrp->GetASCII( "Font", "Courier" ).c_str());
|
||||
|
||||
QFont font(fontFamily, fontSize);
|
||||
QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
font.setPointSize(fontSize);
|
||||
setFont(font);
|
||||
lineNumberArea->setFont(font);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user