[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Thu Aug 19 02:46:22 CEST 2004
CVS commit by arwalker:
The "helvetica" is not present by default on RedHat 9 systems. We now define a Kst default font, which (if present) is helvetica.
CCMAIL: 87474-done at bugs.kde.org
M +9 -0 kst.cpp 1.215
M +3 -1 kst.h 1.101
M +4 -4 kstlabel.cpp 1.43
M +7 -2 kstlegend.cpp 1.15
--- kdeextragear-2/kst/kst/kst.cpp #1.214:1.215
@@ -171,4 +171,8 @@ KstApp::KstApp(QWidget *parent, const ch
checkFontPresent("Symbol");
+ checkFontPresent("Helvetica");
+
+ QFontInfo info(QFont("Helvetica"));
+ _defaultFont = info.family();
if (!isFakingSDIApplication()) {
@@ -201,4 +205,9 @@ void KstApp::addNewWindowMenu() {
+const QString& KstApp::defaultFont( ) {
+ return _defaultFont;
+}
+
+
void KstApp::checkFontPresent(const QString& font) {
QFont f(font);
--- kdeextragear-2/kst/kst/kst.h #1.100:1.101
@@ -75,4 +75,5 @@ class KstApp : public KMdiMainFrm {
void checkFontPresent( const QString& strFont );
+ const QString& defaultFont( );
/** add a file to the recent file list */
@@ -448,4 +449,5 @@ class KstApp : public KMdiMainFrm {
Kst2DPlotMap _plotHolderWhileOpeningDocument;
QTimer _memTimer;
+ QString _defaultFont;
};
--- kdeextragear-2/kst/kst/kstlabel.cpp #1.42:1.43
@@ -26,4 +26,5 @@
// application specific includes
+#include "kst.h"
#include "kstdatacollection.h"
#include "kstdebug.h"
@@ -41,5 +42,5 @@ KstLabel::KstLabel() {
_usePlotColor = true;
_color.setRgb(0, 0, 0);
- FontName = "helvetica";
+ FontName = KstApp::inst()->defaultFont();
SymbolFontName = "Symbol";
Size = 0;
@@ -64,5 +65,5 @@ KstLabel::KstLabel(const QString &in_tex
_usePlotColor = true;
_color.setRgb(0, 0, 0);
- FontName = "helvetica";
+ FontName = KstApp::inst()->defaultFont();
SymbolFontName = "Symbol";
Size = 0;
@@ -648,6 +649,5 @@ void KstLabel::read(QDomElement &e) {
_x = _y = 0.0;
SymbolFontName = "Symbol";
-
- FontName = "helvetica";
+ FontName = KstApp::inst()->defaultFont();
Size = 0;
--- kdeextragear-2/kst/kst/kstlegend.cpp #1.14:1.15
@@ -18,6 +18,11 @@
#include <math.h>
+// include files for Qt
+
+// include files for KDE
#include <kdebug.h>
+// application specific includes
+#include "kst.h"
#include "kstlegend.h"
#include "kstsettings.h"
@@ -35,5 +40,5 @@ KstLegend::KstLegend(
v_offset = 0;
- FontName = "helvetica";
+ FontName = KstApp::inst()->defaultFont();
Size = 0;
bFront = false;
@@ -218,5 +223,5 @@ void KstLegend::read(QDomElement &e) {
Justify = CxBy;
_x = _y = 0.0;
- FontName = "helvetica";
+ FontName = KstApp::inst()->defaultFont();
Size = 0;
More information about the Kst
mailing list