summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Wolf <alex.v.wolf@gmail.com>2022-11-24 20:43:44 +0700
committerAlexander V. Wolf <alex.v.wolf@gmail.com>2022-11-24 20:43:44 +0700
commit492de0dbef4217d197b0c8a39fdba1fe77fccfb2 (patch)
tree45afa2a2bd1de786e0f547b08fd6905f9fb35c1d
parentc0486ee94d8b8757dad9e54bd17b5402559bbb28 (diff)
[publish] Replace DejaVu fonts by Noto fontsui/noto-fonts
-rw-r--r--cmake/default_cfg.ini.cmake6
-rw-r--r--data/CMakeLists.txt8
-rw-r--r--data/DejaVuSans.ttfbin757076 -> 0 bytes
-rw-r--r--data/DejaVuSansMono.ttfbin340712 -> 0 bytes
-rw-r--r--data/NotoSans-Regular.ttfbin0 -> 556216 bytes
-rw-r--r--data/NotoSansCJK-Regular.ttcbin0 -> 19981104 bytes
-rw-r--r--data/NotoSansMono-Regular.ttfbin0 -> 383844 bytes
-rw-r--r--src/gui/ConfigurationDialog.cpp2
-rw-r--r--src/main.cpp18
9 files changed, 20 insertions, 14 deletions
diff --git a/cmake/default_cfg.ini.cmake b/cmake/default_cfg.ini.cmake
index 42f0c35df5..bcd42ae123 100644
--- a/cmake/default_cfg.ini.cmake
+++ b/cmake/default_cfg.ini.cmake
@@ -108,9 +108,9 @@ screen_font_size = 13
gui_font_size = 13
#Name of custom font file for some languages, like Thai.
#This file should be stored into data/ folder.
-#base_font_file = DejaVuSans.ttf
-#base_font_name = DejaVu Sans
-flag_font_selection = false
+#base_font_file = NotoSans-Regular.ttf
+#base_font_name = Noto Sans
+flag_font_selection = true
mouse_cursor_timeout = 10
flag_mouse_cursor_timeout = false
selected_object_info = all
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index ad6ff53342..1364439d31 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,7 +1,11 @@
########### install files ###############
-INSTALL(FILES ssystem_major.ini ssystem_minor.ini ssystem_1000comets.ini base_locations.bin.gz default_cfg.ini DejaVuSans.ttf DejaVuSansMono.ttf languages.tab iso3166.tab regions-geoscheme.tab
- constellation_boundaries.dat constellations_spans.dat nomenclature.dat DESTINATION ${SDATALOC}/data)
+INSTALL(FILES ssystem_major.ini ssystem_minor.ini ssystem_1000comets.ini base_locations.bin.gz default_cfg.ini
+ languages.tab iso3166.tab regions-geoscheme.tab constellation_boundaries.dat constellations_spans.dat
+ nomenclature.dat DESTINATION ${SDATALOC}/data)
+# install fonts
+INSTALL(FILES NotoSans-Regular.ttf NotoSansMono-Regular.ttf NotoSansCJK-Regular.ttc DESTINATION ${SDATALOC}/data)
+# install shaders
INSTALL(DIRECTORY shaders/ DESTINATION ${SDATALOC}/data/shaders FILES_MATCHING
PATTERN "planet*"
)
diff --git a/data/DejaVuSans.ttf b/data/DejaVuSans.ttf
deleted file mode 100644
index e5f7eecce4..0000000000
--- a/data/DejaVuSans.ttf
+++ /dev/null
Binary files differ
diff --git a/data/DejaVuSansMono.ttf b/data/DejaVuSansMono.ttf
deleted file mode 100644
index f5786022f1..0000000000
--- a/data/DejaVuSansMono.ttf
+++ /dev/null
Binary files differ
diff --git a/data/NotoSans-Regular.ttf b/data/NotoSans-Regular.ttf
new file mode 100644
index 0000000000..973bc2ed3a
--- /dev/null
+++ b/data/NotoSans-Regular.ttf
Binary files differ
diff --git a/data/NotoSansCJK-Regular.ttc b/data/NotoSansCJK-Regular.ttc
new file mode 100644
index 0000000000..31f1915e1b
--- /dev/null
+++ b/data/NotoSansCJK-Regular.ttc
Binary files differ
diff --git a/data/NotoSansMono-Regular.ttf b/data/NotoSansMono-Regular.ttf
new file mode 100644
index 0000000000..ff9389ae41
--- /dev/null
+++ b/data/NotoSansMono-Regular.ttf
Binary files differ
diff --git a/src/gui/ConfigurationDialog.cpp b/src/gui/ConfigurationDialog.cpp
index e4702e5230..a18d4a376e 100644
--- a/src/gui/ConfigurationDialog.cpp
+++ b/src/gui/ConfigurationDialog.cpp
@@ -346,7 +346,7 @@ void ConfigurationDialog::createDialogContent()
// Font selection. We use a hidden, but documented entry in config.ini to optionally show a font selection option.
connectIntProperty(ui->screenFontSizeSpinBox, "StelApp.screenFontSize");
connectIntProperty(ui->guiFontSizeSpinBox, "StelApp.guiFontSize");
- if (StelApp::getInstance().getSettings()->value("gui/flag_font_selection", false).toBool())
+ if (StelApp::getInstance().getSettings()->value("gui/flag_font_selection", true).toBool())
{
populateFontWritingSystemCombo();
connect(ui->fontWritingSystemComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(handleFontBoxWritingSystem(int)));
diff --git a/src/main.cpp b/src/main.cpp
index 44f2e62bc0..40f6004872 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -354,13 +354,15 @@ int main(int argc, char **argv)
// Override config file values from CLI.
CLIProcessor::parseCLIArgsPostConfig(argList, confSettings);
- // Add the DejaVu fonts that we use everywhere in the program
- const QString& dejaVuSansFont = StelFileMgr::findFile("data/DejaVuSans.ttf");
- if (!dejaVuSansFont.isEmpty())
- QFontDatabase::addApplicationFont(dejaVuSansFont);
- const QString& dejaVuSansMonoFont = StelFileMgr::findFile("data/DejaVuSansMono.ttf");
- if (!dejaVuSansMonoFont.isEmpty())
- QFontDatabase::addApplicationFont(dejaVuSansMonoFont);
+ // Add the Noto fonts that we use everywhere in the program
+ const QStringList notoFonts = { "NotoSans-Regular.ttf", "NotoSansMono-Regular.ttf", "NotoSansCJK-Regular.ttc" };
+ QString notoFont;
+ for (auto font: qAsConst(notoFonts))
+ {
+ notoFont = StelFileMgr::findFile(QString("data/%1").arg(font));
+ if (!notoFont.isEmpty())
+ QFontDatabase::addApplicationFont(notoFont);
+ }
QString fileFont = confSettings->value("gui/base_font_file", "").toString();
if (!fileFont.isEmpty())
@@ -374,7 +376,7 @@ int main(int argc, char **argv)
// Set the default application font and font size.
// Note that style sheet will possibly override this setting.
- QString baseFont = confSettings->value("gui/base_font_name", "DejaVu Sans").toString();
+ QString baseFont = confSettings->value("gui/base_font_name", "Noto Sans").toString();
QFont tmpFont(baseFont);
tmpFont.setPixelSize(confSettings->value("gui/gui_font_size", 13).toInt());
QGuiApplication::setFont(tmpFont);