mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-12 12:36:43 +00:00
Allow users to decide if they need to import bitmap fonts
This commit is contained in:
parent
5b4e2ab843
commit
43f552f48f
7 changed files with 48 additions and 1 deletions
|
@ -129,6 +129,9 @@ void Launcher::SettingsPage::on_importerButton_clicked()
|
||||||
if (addonsCheckBox->isChecked())
|
if (addonsCheckBox->isChecked())
|
||||||
arguments.append(QString("--game-files"));
|
arguments.append(QString("--game-files"));
|
||||||
|
|
||||||
|
if (fontsCheckBox->isChecked())
|
||||||
|
arguments.append(QString("--fonts"));
|
||||||
|
|
||||||
arguments.append(QString("--encoding"));
|
arguments.append(QString("--encoding"));
|
||||||
arguments.append(mGameSettings.value(QString("encoding"), QString("win1252")));
|
arguments.append(mGameSettings.value(QString("encoding"), QString("win1252")));
|
||||||
arguments.append(QString("--ini"));
|
arguments.append(QString("--ini"));
|
||||||
|
|
|
@ -66,6 +66,7 @@ int wmain(int argc, wchar_t *wargv[]) {
|
||||||
("cfg,c", bpo::value<std::string>(), "openmw.cfg file")
|
("cfg,c", bpo::value<std::string>(), "openmw.cfg file")
|
||||||
("output,o", bpo::value<std::string>()->default_value(""), "openmw.cfg file")
|
("output,o", bpo::value<std::string>()->default_value(""), "openmw.cfg file")
|
||||||
("game-files,g", "import esm and esp files")
|
("game-files,g", "import esm and esp files")
|
||||||
|
("fonts,f", "import bitmap fonts")
|
||||||
("no-archives,A", "disable bsa archives import")
|
("no-archives,A", "disable bsa archives import")
|
||||||
("encoding,e", bpo::value<std::string>()-> default_value("win1252"),
|
("encoding,e", bpo::value<std::string>()-> default_value("win1252"),
|
||||||
"Character encoding used in OpenMW game messages:\n"
|
"Character encoding used in OpenMW game messages:\n"
|
||||||
|
@ -117,6 +118,13 @@ int wmain(int argc, wchar_t *wargv[]) {
|
||||||
MwIniImporter::multistrmap ini = importer.loadIniFile(iniFile);
|
MwIniImporter::multistrmap ini = importer.loadIniFile(iniFile);
|
||||||
MwIniImporter::multistrmap cfg = importer.loadCfgFile(cfgFile);
|
MwIniImporter::multistrmap cfg = importer.loadCfgFile(cfgFile);
|
||||||
|
|
||||||
|
if (!vm.count("fonts"))
|
||||||
|
{
|
||||||
|
ini.erase("Fonts:Font 0");
|
||||||
|
ini.erase("Fonts:Font 1");
|
||||||
|
ini.erase("Fonts:Font 2");
|
||||||
|
}
|
||||||
|
|
||||||
importer.merge(cfg, ini);
|
importer.merge(cfg, ini);
|
||||||
importer.mergeFallback(cfg, ini);
|
importer.mergeFallback(cfg, ini);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ Wizard::ImportPage::ImportPage(QWidget *parent) :
|
||||||
|
|
||||||
registerField(QLatin1String("installation.import-settings"), importCheckBox);
|
registerField(QLatin1String("installation.import-settings"), importCheckBox);
|
||||||
registerField(QLatin1String("installation.import-addons"), addonsCheckBox);
|
registerField(QLatin1String("installation.import-addons"), addonsCheckBox);
|
||||||
|
registerField(QLatin1String("installation.import-fonts"), fontsCheckBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Wizard::ImportPage::nextId() const
|
int Wizard::ImportPage::nextId() const
|
||||||
|
|
|
@ -270,6 +270,10 @@ void Wizard::MainWizard::runSettingsImporter()
|
||||||
arguments.append(QLatin1String("win1252"));
|
arguments.append(QLatin1String("win1252"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Import fonts
|
||||||
|
if (field(QLatin1String("installation.import-fonts")).toBool() == true)
|
||||||
|
arguments.append(QLatin1String("--fonts"));
|
||||||
|
|
||||||
// Now the paths
|
// Now the paths
|
||||||
arguments.append(QLatin1String("--ini"));
|
arguments.append(QLatin1String("--ini"));
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,8 @@ Default UI font and font used in magic scrolls are defined in ``openmw.cfg``:
|
||||||
fallback=Fonts_Font_0,pelagiad
|
fallback=Fonts_Font_0,pelagiad
|
||||||
fallback=Fonts_Font_2,ayembedt
|
fallback=Fonts_Font_2,ayembedt
|
||||||
|
|
||||||
By default, built-in TrueType fonts are used. Font used by console and another debug windows is not configurable (so ``Fonts_Font_1`` is unused).
|
When there are no ``Fonts_Font_*`` lines in user's ``openmw.cfg``, built-in TrueType fonts are used.
|
||||||
|
Font used by console and another debug windows is not configurable (so ``Fonts_Font_1`` is unused).
|
||||||
|
|
||||||
Morrowind .fnt fonts
|
Morrowind .fnt fonts
|
||||||
--------------------
|
--------------------
|
||||||
|
|
|
@ -112,6 +112,21 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fontsCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Import bitmap fonts setup</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Fonts shipped with the original engine are blurry with UI scaling and support only a small amount of characters,
|
||||||
|
so OpenMW provides another set of fonts to avoid these issues. These fonts use TrueType technology and are quite similar
|
||||||
|
to default Morrowind fonts. Check this box if you still prefer original fonts over OpenMW ones or if you use custom bitmap fonts.</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,1">
|
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,1">
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
|
|
|
@ -50,6 +50,21 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fontsCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Import bitmap fonts setup from Morrowind.ini</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Fonts shipped with the original engine are blurry with UI scaling and support only a small amount of characters,
|
||||||
|
so OpenMW provides another set of fonts to avoid these issues. These fonts use TrueType technology and are quite similar
|
||||||
|
to default Morrowind fonts. Check this box if you still prefer original fonts over OpenMW ones or if you use custom bitmap fonts.</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
Loading…
Reference in a new issue