generic: change default font families to DejaVu Sans and DejaVu Sans Mono

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-01-17 07:36:44 +02:00
parent 70001acb2c
commit 2308ca50cc
4 changed files with 13 additions and 21 deletions

View file

@ -23,19 +23,17 @@
#include "fonthelpers_p.h"
#include "klocale.h"
#include "kglobalsettings.h"
#ifdef NEVERDEFINE // never true
// Font names up for translation, listed for extraction.
// i18n: Generic sans serif font presented in font choosers. When selected,
// i18n: Generic non-fixed font presented in font choosers. When selected,
// the system will choose a real font, mandated by distro settings.
I18N_NOOP2("@item Font name", "Sans Serif")
// i18n: Generic serif font presented in font choosers. When selected,
I18N_NOOP2("@item Font name", KDE_DEFAULT_FONT)
// i18n: Generic fixed font presented in font choosers. When selected,
// the system will choose a real font, mandated by distro settings.
I18N_NOOP2("@item Font name", "Serif")
// i18n: Generic monospace font presented in font choosers. When selected,
// the system will choose a real font, mandated by distro settings.
I18N_NOOP2("@item Font name", "Monospace")
I18N_NOOP2("@item Font name", KDE_DEFAULT_FIXED_FONT)
#endif
@ -98,9 +96,8 @@ QStringList translateFontNameList (const QStringList &names,
{
// Generic fonts, in the inverse of desired order.
QStringList genericNames;
genericNames.append("Monospace");
genericNames.append("Serif");
genericNames.append("Sans Serif");
genericNames.append(KDE_DEFAULT_FIXED_FONT);
genericNames.append(KDE_DEFAULT_FONT);
// Translate fonts, but do not add generics to the list right away.
QStringList trNames;

View file

@ -423,14 +423,9 @@ QFont KGlobalSettingsData::largeFont( const QString& text )
// most preferred last
static const char* const PreferredFontNames[] =
{
"Arial",
"Sans Serif",
"Verdana",
"Tahoma",
"Lucida Sans",
"Lucidux Sans",
"Nimbus Sans",
"Gothic I"
"DejaVu Sans",
"FreeSans",
"Liberation Sans",
};
static const unsigned int PreferredFontNamesCount = sizeof(PreferredFontNames)/sizeof(const char*);
for( unsigned int i=0; i<PreferredFontNamesCount; ++i )

View file

@ -42,8 +42,8 @@
#define KDE_DEFAULT_SHADE_SORT_COLUMN true
#define KDE_DEFAULT_ALLOW_DEFAULT_BACKGROUND_IMAGES true
#define KDE_DEFAULT_NATURAL_SORTING true
#define KDE_DEFAULT_FONT "Sans Serif"
#define KDE_DEFAULT_FIXED_FONT "Monospace"
#define KDE_DEFAULT_FONT "DejaVu Sans"
#define KDE_DEFAULT_FIXED_FONT "DejaVu Sans Mono"
// misc overrides
#define BUG_REPORT_URL "https://github.com/fluxer/katana/issues"

View file

@ -21,7 +21,7 @@
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:x-large; font-weight:600;">Client for KDE 4 Offline Mode&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >