Backport fonts fixes to 0.48

backport_gl_clamp_removal
Andrei Kortunov 2 years ago committed by psi29a
parent c3980bebf8
commit d38454a125

@ -14,8 +14,8 @@ OpenMW also comes with OpenMW-CS, a replacement for Bethesda's Construction Set.
Font Licenses:
* DejaVuLGCSansMono.ttf: custom (see [files/data/fonts/DejaVuFontLicense.txt](https://gitlab.com/OpenMW/openmw/-/raw/master/files/data/fonts/DejaVuFontLicense.txt) for more information)
* OMWAyembedt.ttf: SIL Open Font License (see [files/data/fonts/OMWAyembedtFontLicense.txt](https://gitlab.com/OpenMW/openmw/-/raw/master/files/data/fonts/OMWAyembedtFontLicense.txt) for more information)
* Pelagiad.ttf: SIL Open Font License (see [files/data/fonts/PelagiadFontLicense.txt](https://gitlab.com/OpenMW/openmw/-/raw/master/files/data/fonts/PelagiadFontLicense.txt) for more information)
* DemonicLetters.ttf: SIL Open Font License (see [files/data/fonts/DemonicLettersFontLicense.txt](https://gitlab.com/OpenMW/openmw/-/raw/master/files/data/fonts/DemonicLettersFontLicense.txt) for more information)
* MysticCards.ttf: SIL Open Font License (see [files/data/fonts/MysticCardsFontLicense.txt](https://gitlab.com/OpenMW/openmw/-/raw/master/files/data/fonts/MysticCardsFontLicense.txt) for more information)
Current Status
--------------

@ -205,7 +205,6 @@ bool Launcher::AdvancedPage::loadSettings()
loadSettingBool(graphicHerbalismCheckBox, "graphic herbalism", "Game");
scalingSpinBox->setValue(Settings::Manager::getFloat("scaling factor", "GUI"));
fontSizeSpinBox->setValue(Settings::Manager::getInt("font size", "GUI"));
ttfResolutionSpinBox->setValue(Settings::Manager::getInt("ttf resolution", "GUI"));
}
// Bug fixes
@ -373,10 +372,6 @@ void Launcher::AdvancedPage::saveSettings()
int fontSize = fontSizeSpinBox->value();
if (fontSize != Settings::Manager::getInt("font size", "GUI"))
Settings::Manager::setInt("font size", "GUI", fontSize);
int ttfResolution = ttfResolutionSpinBox->value();
if (ttfResolution != Settings::Manager::getInt("ttf resolution", "GUI"))
Settings::Manager::setInt("ttf resolution", "GUI", ttfResolution);
}
// Bug fixes

@ -92,14 +92,14 @@ namespace MWGui
// - Shader editor
MyGUI::TabItem* itemLV = mTabControl->addItem("Log Viewer");
itemLV->setCaptionWithReplacing("#{DebugMenu:LogViewer}");
itemLV->setCaptionWithReplacing(" #{DebugMenu:LogViewer} ");
mLogView = itemLV->createWidgetReal<MyGUI::EditBox>
("LogEdit", MyGUI::FloatCoord(0,0,1,1), MyGUI::Align::Stretch);
mLogView->setEditReadOnly(true);
#ifndef BT_NO_PROFILE
MyGUI::TabItem* item = mTabControl->addItem("Physics Profiler");
item->setCaptionWithReplacing("#{DebugMenu:PhysicsProfiler}");
item->setCaptionWithReplacing(" #{DebugMenu:PhysicsProfiler} ");
mBulletProfilerEdit = item->createWidgetReal<MyGUI::EditBox>
("LogEdit", MyGUI::FloatCoord(0,0,1,1), MyGUI::Align::Stretch);
#else

@ -7,6 +7,7 @@
#include <MyGUI_Button.h>
#include <components/debug/debuglog.hpp>
#include <components/widgets/box.hpp>
#include <components/widgets/list.hpp>
#include <components/translation/translation.hpp>
@ -25,6 +26,7 @@
#include "bookpage.hpp"
#include "textcolours.hpp"
#include "tooltips.hpp"
#include "journalbooks.hpp" // to_utf8_span
@ -59,6 +61,8 @@ namespace MWGui
PersuasionDialog::PersuasionDialog(ResponseCallback* callback)
: WindowModal("openmw_persuasion_dialog.layout")
, mCallback(callback)
, mInitialGoldLabelWidth(0)
, mInitialMainWidgetWidth(0)
{
getWidget(mCancelButton, "CancelButton");
getWidget(mAdmireButton, "AdmireButton");
@ -68,6 +72,26 @@ namespace MWGui
getWidget(mBribe100Button, "Bribe100Button");
getWidget(mBribe1000Button, "Bribe1000Button");
getWidget(mGoldLabel, "GoldLabel");
getWidget(mActionsBox, "ActionsBox");
int totalHeight = 3;
adjustAction(mAdmireButton, totalHeight);
adjustAction(mIntimidateButton, totalHeight);
adjustAction(mTauntButton, totalHeight);
adjustAction(mBribe10Button, totalHeight);
adjustAction(mBribe100Button, totalHeight);
adjustAction(mBribe1000Button, totalHeight);
totalHeight += 3;
int diff = totalHeight - mActionsBox->getSize().height;
if (diff > 0)
{
auto mainWidgetSize = mMainWidget->getSize();
mMainWidget->setSize(mainWidgetSize.width, mainWidgetSize.height + diff);
}
mInitialGoldLabelWidth = mActionsBox->getSize().width - mCancelButton->getSize().width - 8;
mInitialMainWidgetWidth = mMainWidget->getSize().width;
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PersuasionDialog::onCancel);
mAdmireButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PersuasionDialog::onPersuade);
@ -78,6 +102,14 @@ namespace MWGui
mBribe1000Button->eventMouseButtonClick += MyGUI::newDelegate(this, &PersuasionDialog::onPersuade);
}
void PersuasionDialog::adjustAction(MyGUI::Widget* action, int& totalHeight)
{
const int lineHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2;
auto currentCoords = action->getCoord();
action->setCoord(currentCoords.left, totalHeight, currentCoords.width, lineHeight);
totalHeight += lineHeight;
}
void PersuasionDialog::onCancel(MyGUI::Widget *sender)
{
setVisible(false);
@ -114,6 +146,13 @@ namespace MWGui
mBribe1000Button->setEnabled (playerGold >= 1000);
mGoldLabel->setCaptionWithReplacing("#{sGold}: " + MyGUI::utility::toString(playerGold));
int diff = mGoldLabel->getRequestedSize().width - mInitialGoldLabelWidth;
if (diff > 0)
mMainWidget->setSize(mInitialMainWidgetWidth + diff, mMainWidget->getSize().height);
else
mMainWidget->setSize(mInitialMainWidgetWidth, mMainWidget->getSize().height);
WindowModal::onOpen();
}

@ -12,6 +12,7 @@
namespace Gui
{
class AutoSizedTextBox;
class MWList;
}
@ -31,6 +32,9 @@ namespace MWGui
private:
std::unique_ptr<ResponseCallback> mCallback;
int mInitialGoldLabelWidth;
int mInitialMainWidgetWidth;
MyGUI::Button* mCancelButton;
MyGUI::Button* mAdmireButton;
MyGUI::Button* mIntimidateButton;
@ -38,7 +42,10 @@ namespace MWGui
MyGUI::Button* mBribe10Button;
MyGUI::Button* mBribe100Button;
MyGUI::Button* mBribe1000Button;
MyGUI::TextBox* mGoldLabel;
MyGUI::Widget* mActionsBox;
Gui::AutoSizedTextBox* mGoldLabel;
void adjustAction(MyGUI::Widget* action, int& totalHeight);
void onCancel (MyGUI::Widget* sender);
void onPersuade (MyGUI::Widget* sender);

@ -25,14 +25,29 @@ namespace
if (count == 1)
return "";
// With small text size we can use up to 4 characters, while with large ones - only up to 3.
if (fontHeight > 16)
{
if (count > 999999999)
return MyGUI::utility::toString(count/1000000000) + "b";
else if (count > 9999999)
return ">9m";
else if (count > 999999)
return MyGUI::utility::toString(count/1000000) + "m";
else if (count > 9999)
return ">9k";
else if (count > 999)
return MyGUI::utility::toString(count/1000) + "k";
else
return MyGUI::utility::toString(count);
}
if (count > 999999999)
return MyGUI::utility::toString(count/1000000000) + "b";
else if (count > 999999)
return MyGUI::utility::toString(count/1000000) + "m";
else if (count > 9999)
return MyGUI::utility::toString(count/1000) + "k";
else if (fontHeight >= 18 && count > 999)
return MyGUI::utility::toString(count/1000) + "k";
else
return MyGUI::utility::toString(count);
}

@ -98,6 +98,8 @@ namespace MWGui
const MWWorld::Store<ESM::GameSetting> &gmst =
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
const int lineHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2;
for (int i=0; i<3; ++i)
{
int price = static_cast<int>(pcStats.getSkill (skills[i].first).getBase() * gmst.find("iTrainingMod")->mValue.getInteger());
@ -105,7 +107,7 @@ namespace MWGui
price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr, price, true);
MyGUI::Button* button = mTrainingOptions->createWidget<MyGUI::Button>(price <= playerGold ? "SandTextButton" : "SandTextButtonDisabled", // can't use setEnabled since that removes tooltip
MyGUI::IntCoord(5, 5+i*18, mTrainingOptions->getWidth()-10, 18), MyGUI::Align::Default);
MyGUI::IntCoord(5, 5+i*lineHeight, mTrainingOptions->getWidth()-10, lineHeight), MyGUI::Align::Default);
button->setUserData(skills[i].first);
button->eventMouseButtonClick += MyGUI::newDelegate(this, &TrainingWindow::onTrainingSelected);

@ -207,7 +207,6 @@ namespace MWGui
// Load fonts
mFontLoader = std::make_unique<Gui::FontLoader>(encoding, resourceSystem->getVFS(), mScalingFactor);
mFontLoader->loadFonts();
//Register own widgets with MyGUI
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWSkill>("Widget");

@ -25,11 +25,52 @@
#include <components/misc/stringops.hpp>
#include <components/myguiplatform/myguitexture.hpp>
#include <components/myguiplatform/scalinglayer.hpp>
#include <components/settings/settings.hpp>
namespace
{
MyGUI::xml::ElementPtr getProperty(MyGUI::xml::ElementPtr resourceNode, const std::string propertyName)
{
MyGUI::xml::ElementPtr propertyNode = nullptr;
MyGUI::xml::ElementEnumerator propertyIterator = resourceNode->getElementEnumerator();
while (propertyIterator.next("Property"))
{
std::string key = propertyIterator->findAttribute("key");
if (key == propertyName)
{
propertyNode = propertyIterator.current();
break;
}
}
return propertyNode;
}
MyGUI::IntSize getBookSize(MyGUI::IDataStream* layersStream)
{
MyGUI::xml::Document xmlDocument;
xmlDocument.open(layersStream);
MyGUI::xml::ElementPtr root = xmlDocument.getRoot();
MyGUI::xml::ElementEnumerator layersIterator = root->getElementEnumerator();
while (layersIterator.next("Layer"))
{
std::string name = layersIterator->findAttribute("name");
if (name == "JournalBooks")
{
MyGUI::xml::ElementPtr sizeProperty = getProperty(layersIterator.current(), "Size");
const std::string& sizeValue = sizeProperty != nullptr ? sizeProperty->findAttribute("value") : std::string();
if (!sizeValue.empty())
return MyGUI::IntSize::parse(sizeValue);
}
}
return MyGUI::RenderManager::getInstance().getViewSize();
}
unsigned long utf8ToUnicode(std::string_view utf8)
{
if (utf8.empty())
@ -155,7 +196,7 @@ namespace Gui
FontLoader::FontLoader(ToUTF8::FromType encoding, const VFS::Manager* vfs, float scalingFactor)
: mVFS(vfs)
, mFontHeight(std::clamp(Settings::Manager::getInt("font size", "GUI"), 12, 20))
, mFontHeight(std::clamp(Settings::Manager::getInt("font size", "GUI"), 12, 18))
, mScalingFactor(scalingFactor)
{
if (encoding == ToUTF8::WINDOWS_1252)
@ -165,6 +206,8 @@ namespace Gui
MyGUI::ResourceManager::getInstance().unregisterLoadXmlDelegate("Resource");
MyGUI::ResourceManager::getInstance().registerLoadXmlDelegate("Resource") = MyGUI::newDelegate(this, &FontLoader::overrideLineHeight);
loadFonts();
}
void FontLoader::loadFonts()
@ -176,10 +219,10 @@ namespace Gui
loadFont("DejaVuLGCSansMono", "MonoFont"); // We need to use a TrueType monospace font to display debug texts properly.
// Use our TrueType fonts as a fallback.
if (!MyGUI::ResourceManager::getInstance().isExist("DefaultFont") && !Misc::StringUtils::ciEqual(defaultFont, "Pelagiad"))
loadFont("Pelagiad", "DefaultFont");
if (!MyGUI::ResourceManager::getInstance().isExist("ScrollFont") && !Misc::StringUtils::ciEqual(scrollFont, "OMWAyembedt"))
loadFont("OMWAyembedt", "ScrollFont");
if (!MyGUI::ResourceManager::getInstance().isExist("DefaultFont") && !Misc::StringUtils::ciEqual(defaultFont, "MysticCards"))
loadFont("MysticCards", "DefaultFont");
if (!MyGUI::ResourceManager::getInstance().isExist("ScrollFont") && !Misc::StringUtils::ciEqual(scrollFont, "DemonicLetters"))
loadFont("DemonicLetters", "ScrollFont");
}
void FontLoader::loadFont(const std::string& fileName, const std::string& fontId)
@ -203,6 +246,11 @@ namespace Gui
return;
}
// TODO: it may be worth to take in account resolution change, but it is not safe to replace used assets
std::unique_ptr<MyGUI::IDataStream> layersStream(dataManager->getData("openmw_layers.xml"));
MyGUI::IntSize bookSize = getBookSize(layersStream.get());
float bookScale = osgMyGUI::ScalingLayer::getScaleFactor(bookSize);
std::string oldDataPath = dataManager->getDataPath("");
dataManager->setResourcePath("fonts");
std::unique_ptr<MyGUI::IDataStream> dataStream(dataManager->getData(fileName));
@ -226,15 +274,17 @@ namespace Gui
return;
}
// For TrueType fonts we should override Size and Resolution properties
// to allow to configure font size via config file, without need to edit XML files.
// Also we should take UI scaling factor in account.
int resolution = Settings::Manager::getInt("ttf resolution", "GUI");
resolution = std::clamp(resolution, 50, 125) * mScalingFactor;
int resolution = 70;
MyGUI::xml::ElementPtr resolutionNode = getProperty(resourceNode.current(), "Resolution");
if (resolutionNode == nullptr)
{
resolutionNode = resourceNode->createChild("Property");
resolutionNode->addAttribute("key", "Resolution");
}
else
resolution = MyGUI::utility::parseInt(resolutionNode->findAttribute("value"));
MyGUI::xml::ElementPtr resolutionNode = resourceNode->createChild("Property");
resolutionNode->addAttribute("key", "Resolution");
resolutionNode->addAttribute("value", std::to_string(resolution));
resolutionNode->setAttribute("value", MyGUI::utility::toString(resolution * std::ceil(mScalingFactor)));
MyGUI::xml::ElementPtr sizeNode = resourceNode->createChild("Property");
sizeNode->addAttribute("key", "Size");
@ -246,16 +296,7 @@ namespace Gui
font->setResourceName(fontId);
MyGUI::ResourceManager::getInstance().addResource(font);
float currentX = Settings::Manager::getInt("resolution x", "Video");
float currentY = Settings::Manager::getInt("resolution y", "Video");
// TODO: read size from openmw_layout.xml somehow
// TODO: it may be worth to take in account resolution change, but it is not safe to replace used assets
float heightScale = (currentY / 520);
float widthScale = (currentX / 600);
float uiScale = std::min(widthScale, heightScale);
resolution = Settings::Manager::getInt("ttf resolution", "GUI");
resolution = std::clamp(resolution, 50, 125) * uiScale;
resolutionNode->setAttribute("value", std::to_string(resolution));
resolutionNode->setAttribute("value", MyGUI::utility::toString(static_cast<int>(resolution * bookScale * mScalingFactor)));
MyGUI::ResourceTrueTypeFont* bookFont = static_cast<MyGUI::ResourceTrueTypeFont*>(
MyGUI::FactoryManager::getInstance().createObject("Resource", "ResourceTrueTypeFont"));
@ -553,12 +594,9 @@ namespace Gui
std::string FontLoader::getFontForFace(const std::string& face)
{
const std::string lowerFace = Misc::StringUtils::lowerCase(face);
if (lowerFace == "magic cards")
return "DefaultFont";
if (lowerFace == "daedric")
return "ScrollFont";
return face;
return "DefaultFont";
}
}

@ -27,8 +27,6 @@ namespace Gui
public:
FontLoader (ToUTF8::FromType encoding, const VFS::Manager* vfs, float scalingFactor);
void loadFonts();
void overrideLineHeight(MyGUI::xml::ElementPtr _node, const std::string& _file, MyGUI::Version _version);
int getFontHeight();
@ -41,6 +39,7 @@ namespace Gui
int mFontHeight;
float mScalingFactor;
void loadFonts();
void loadFont(const std::string& fontName, const std::string& fontId);
void loadBitmapFont (const std::string& fileName, const std::string& fontId);

@ -63,7 +63,7 @@ namespace osgMyGUI
void ScalingLayer::screenToLayerCoords(int& _left, int& _top) const
{
float scale = getScaleFactor();
float scale = getScaleFactor(mViewSize);
if (scale <= 0.f)
return;
@ -79,14 +79,14 @@ namespace osgMyGUI
_top += mViewSize.height/2;
}
float ScalingLayer::getScaleFactor() const
float ScalingLayer::getScaleFactor(const MyGUI::IntSize& _layerViewSize)
{
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
float w = static_cast<float>(viewSize.width);
float h = static_cast<float>(viewSize.height);
float heightScale = (h / mViewSize.height);
float widthScale = (w / mViewSize.width);
float heightScale = (h / _layerViewSize.height);
float widthScale = (w / _layerViewSize.width);
return std::min(widthScale, heightScale);
}
@ -100,12 +100,12 @@ namespace osgMyGUI
{
MyGUI::IntSize globalViewSize = MyGUI::RenderManager::getInstance().getViewSize();
MyGUI::IntSize viewSize = globalViewSize;
float scale = getScaleFactor();
float scale = getScaleFactor(mViewSize);
viewSize.width = static_cast<int>(viewSize.width / scale);
viewSize.height = static_cast<int>(viewSize.height / scale);
float hoffset = (globalViewSize.width - mViewSize.width*getScaleFactor())/2.f / static_cast<float>(globalViewSize.width);
float voffset = (globalViewSize.height - mViewSize.height*getScaleFactor())/2.f / static_cast<float>(globalViewSize.height);
float hoffset = (globalViewSize.width - mViewSize.width*getScaleFactor(mViewSize))/2.f / static_cast<float>(globalViewSize.width);
float voffset = (globalViewSize.height - mViewSize.height*getScaleFactor(mViewSize))/2.f / static_cast<float>(globalViewSize.height);
ProxyRenderTarget proxy(_target, viewSize, hoffset, voffset);

@ -21,9 +21,10 @@ namespace osgMyGUI
void resizeView(const MyGUI::IntSize& _viewSize) override;
static float getScaleFactor(const MyGUI::IntSize& _layerViewSize);
private:
void screenToLayerCoords(int& _left, int& _top) const;
float getScaleFactor() const;
};
}

@ -35,7 +35,7 @@ namespace Gui
std::string getFontSize()
{
// Note: we can not use the FontLoader here, so there is a code duplication a bit.
static const std::string fontSize = std::to_string(std::clamp(Settings::Manager::getInt("font size", "GUI"), 12, 20));
static const std::string fontSize = std::to_string(std::clamp(Settings::Manager::getInt("font size", "GUI"), 12, 18));
return fontSize;
}
};

@ -3,8 +3,8 @@ Fonts
Default UI font and font used in magic scrolls are defined in ``openmw.cfg``:
fallback=Fonts_Font_0,Pelagiad
fallback=Fonts_Font_2,OMWAyembedt
fallback=Fonts_Font_0,MysticCards
fallback=Fonts_Font_2,DemonicLetters
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).
@ -30,23 +30,22 @@ TrueType fonts
--------------
Unlike vanilla Morrowind, OpenMW directly supports TrueType (``.ttf``) fonts. This is the recommended fonts format.
OpenMW has build-in TrueType fonts: Pelagiad, OMWAyembedt and DejaVuLGCSansMono, which are used by default.
OpenMW has build-in TrueType fonts: MysticCards, DemonicLetters and DejaVuLGCSansMono, which are used by default.
TrueType fonts are configured via ``openmw.cfg`` too:
fallback=Fonts_Font_0,Pelagiad
fallback=Fonts_Font_2,OMWAyembedt
fallback=Fonts_Font_0,MysticCards
fallback=Fonts_Font_2,DemonicLetters
In this example, OpenMW will scan ``Fonts`` folder in data directories for ``.omwfont`` files.
These files are XML files with schema provided by MyGUI. OpenMW uses ``.omwfont`` files which name (without extension) matches ``openmw.cfg`` entries.
It is also possible to adjust the font size and resolution via ``settings.cfg`` file::
It is also possible to adjust the font size via ``settings.cfg`` file::
[GUI]
font size = 16
ttf resolution = 75
The ``font size`` setting accepts clamped values in range from 12 to 20 while ``ttf resolution`` setting accepts values from 50 to 125.
The ``font size`` setting accepts clamped values in range from 12 to 18.
Any Resolution or Size properties in the ``.omwfont`` file have no effect because the engine settings override them.
Any Size property in the ``.omwfont`` file has no effect because the engine overrides it.
The engine automatically takes UI scaling factor into account, so don't account for it when tweaking the settings.

@ -17,7 +17,7 @@ font size
---------
:Type: integer
:Range: 12 to 20
:Range: 12 to 18
:Default: 16
Allows to specify glyph size for in-game fonts.
@ -26,18 +26,6 @@ TrueType fonts do not have this issue.
This setting can be configured in the Interface section of Advanced tab of the launcher.
ttf resolution
--------------
:Type: integer
:Range: 50 to 125
:Default: 75
Allows to specify resolution for in-game TrueType fonts.
Note: actual resolution depends on "scaling factor" setting value, this value is for 1.0 scaling factor.
This setting can be configured in the Interface section of Advanced tab of the launcher.
menu transparency
-----------------

@ -13,12 +13,12 @@ set(BUILTIN_DATA_FILES
fonts/DejaVuFontLicense.txt
fonts/DejaVuLGCSansMono.ttf
fonts/DejaVuLGCSansMono.omwfont
fonts/OMWAyembedt.ttf
fonts/OMWAyembedt.omwfont
fonts/OMWAyembedtFontLicense.txt
fonts/Pelagiad.ttf
fonts/Pelagiad.omwfont
fonts/PelagiadFontLicense.txt
fonts/DemonicLetters.ttf
fonts/DemonicLetters.omwfont
fonts/DemonicLettersFontLicense.txt
fonts/MysticCards.ttf
fonts/MysticCards.omwfont
fonts/MysticCardsFontLicense.txt
l10n/BuiltInShaders/de.yaml
l10n/BuiltInShaders/en.yaml

@ -4,6 +4,7 @@
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="8"/>
<Property key="OffsetHeight" value="0"/>
<Property key="Resolution" value="58"/>
<Codes>
<Code range="33 126"/>
<Code range="192 382"/>

@ -1,11 +1,15 @@
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceTrueTypeFont">
<Property key="Source" value="OMWAyembedt.ttf"/>
<Property key="Source" value="DemonicLetters.ttf"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="8"/>
<Property key="SubstituteCode" value="0"/>
<Property key="OffsetHeight" value="0"/>
<Property key="Resolution" value="70"/>
<Codes>
<Code range="32 126"/>
<Code range="0"/>
<Code range="65 90"/>
<Code range="97 122"/>
</Codes>
</Resource>
</MyGUI>

@ -1,3 +1,6 @@
Copyright (c) 2022, OpenMW Team (https://gitlab.com/OpenMW),
with Reserved Font Name "DemonicLetters.ttf".
Copyright (c) 2014, Georg Duffner (https://github.com/georgd/OpenMW-Fonts),
with Reserved Font Name "OMWAyembedt.ttf".

@ -1,42 +1,43 @@
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceTrueTypeFont">
<Property key="Source" value="Pelagiad.ttf"/>
<Property key="Source" value="MysticCards.ttf"/>
<Property key="Antialias" value="false"/>
<Property key="SubstituteCode" value="63"/>
<Property key="TabWidth" value="8"/>
<Property key="OffsetHeight" value="0"/>
<Property key="Resolution" value="70"/>
<Codes>
<Code range="33 126"/>
<Code range="161"/>
<Code range="173"/>
<Code range="180"/>
<Code range="191 255"/>
<Code range="191 253"/>
<Code range="255"/>
<Code range="260 263"/>
<Code range="268 271"/>
<Code range="280 283"/>
<Code range="305"/>
<Code range="321 324"/>
<Code range="327 328"/>
<Code range="339"/>
<Code range="330"/>
<Code range="338 339"/>
<Code range="344 347"/>
<Code range="352 353"/>
<Code range="356 357"/>
<Code range="366 367"/>
<Code range="377 382"/>
<Code range="376 382"/>
<Code range="711"/>
<Code range="1025"/>
<Code range="1040 1103"/>
<Code range="1105"/>
<Code range="8208 8212"/>
<Code range="7838"/>
<Code range="8208 8212"/>
<Code range="8216 8217"/>
<Code range="8220 8221"/>
<Code range="8228 8230"/>
<Code hide="198"/>
<Code hide="208"/>
<Code hide="215 216"/>
<Code hide="222"/>
<Code hide="230"/>
<Code hide="222"/>
<Code hide="240"/>
<Code hide="247 248"/>
<Code hide="254"/>
</Codes>
</Resource>
</MyGUI>

Binary file not shown.

@ -1,3 +1,6 @@
Copyright (c) 2022, OpenMW Team (https://gitlab.com/OpenMW),
with Reserved Font Name "MysticCards.ttf".
Copyright (c) 2015, Isak Larborn (isaskar.github.io/Pelagiad|Isaskar@users.noreply.github.com),
with Reserved Font Name "Pelagiad.ttf".

Binary file not shown.

Binary file not shown.

@ -13,7 +13,7 @@ LanguageNote: "Примечание: эти настройки не затраг
LightingMethod: "Способ освещения"
LightingMethodLegacy: "Устаревший"
LightingMethodShaders: "Шейдеры"
LightingMethodShadersCompatibility: "Шейдеры (режим совместимости)"
LightingMethodShadersCompatibility: "Шейдеры (режим совм-ти)"
LightingResetToDefaults: "Обнулить настройки освещения? Смена метода освещения вступит в силу только после перезапуска приложения."
Lights: "Освещение"
LightsBoundingSphereMultiplier: "Множитель размера ограничивающей сферы"

@ -18,7 +18,7 @@
<!-- The disposition bar-->
<Widget type="ProgressBar" skin="MW_Progress_Blue" position="398 8 166 18"
align="Right Top" name="Disposition">
<Widget type="TextBox" skin="ProgressText" position="0 0 166 14" name="DispositionText" align="Right VCenter">
<Widget type="TextBox" skin="ProgressText" position="0 0 166 12" name="DispositionText" align="Right VCenter">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>

@ -3,12 +3,12 @@
<MyGUI type="Layout">
<Widget type="Window" skin="MW_DialogNoTransp" layer="Modal" position="0 0 220 192" align="Center" name="_Main">
<Widget type="TextBox" skin="NormalText" position="0 4 220 24">
<Widget type="TextBox" skin="NormalText" position="0 4 220 24" align="HCenter Top">
<Property key="Caption" value="#{sPersuasionMenuTitle}"/>
<Property key="TextAlign" value="Center"/>
</Widget>
<Widget type="Widget" skin="MW_Box" position="8 32 196 115">
<Widget type="Widget" skin="MW_Box" position="8 32 196 114" align="Stretch Top" name="ActionsBox">
<Widget type="AutoSizedButton" skin="SandTextButton" position="4 0 0 18" name="AdmireButton">
<Property key="Caption" value="#{sAdmire}"/>
<Property key="TextAlign" value="Left"/>
@ -35,11 +35,11 @@
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="8 152 208 24" name="GoldLabel">
<Widget type="AutoSizedTextBox" skin="SandText" position="8 158 102 24" align="Left Bottom" name="GoldLabel">
<Property key="TextAlign" value="Left VCenter"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="204 154 0 24" name="CancelButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="204 154 0 24" align="Right Bottom" name="CancelButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sCancel}"/>
</Widget>

@ -41,13 +41,13 @@
</Resource>
<Resource type="ResourceLayout" name="TabControl" version="3.2.0">
<Widget type="Widget" skin="" position="5 5 89 60" name="Root">
<Widget type="Widget" skin="" position="5 5 89 64" name="Root">
<UserString key="ButtonSkin" value="MW_Button_RightPadding"/>
<Widget type="Widget" skin="MW_Box" position="0 28 89 32" align="Left Top Stretch">
<Widget type="Widget" skin="MW_Box" position="0 30 89 32" align="Left Top Stretch">
<Widget type="Widget" skin="" position="4 4 81 28" align="Left Top Stretch" name="TabItem"/>
</Widget>
<Widget type="Widget" skin="" position="0 0 89 23" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="" position="0 0 60 23" name="Controls">
<Widget type="Widget" skin="" position="0 0 89 24" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="" position="0 0 60 28" name="Controls">
<Widget type="Widget" skin="MW_Box" position="10 0 15 14" align="Left VCenter">
<Widget type="Button" skin="MW_ArrowLeft" position="2 2 10 10" align="Left VStretch" name="Left" />
</Widget>
@ -63,8 +63,8 @@
<Widget type="Widget" skin="" position="5 5 89 60" name="Root">
<UserString key="ButtonSkin" value="MW_Button_RightPadding"/>
<Widget type="Widget" skin="" position="0 28 89 32" align="Left Top Stretch" name="TabItem"/>
<Widget type="Widget" skin="" position="0 0 89 23" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="" position="52 0 37 23" name="Controls">
<Widget type="Widget" skin="" position="0 0 89 24" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="" position="52 0 37 28" name="Controls">
</Widget>
</Widget>
</Widget>
@ -75,8 +75,8 @@
<UserString key="ButtonSkin" value="MW_Button_RightPadding"/>
<Widget type="Widget" skin="" position="0 28 89 32" align="Left Top Stretch" name="TabItem"/>
<Widget type="Widget" skin="" position="0 0 89 23" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="" position="52 0 37 23" name="Controls">
<Widget type="Widget" skin="" position="0 0 89 24" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="" position="52 0 37 28" name="Controls">
</Widget>
</Widget>
</Widget>

@ -5,7 +5,7 @@
<Widget type="TabControl" skin="TabControl" position="8 8 368 405" align="Stretch" name="SettingsTab">
<Property key="ButtonAutoWidth" value="true"/>
<Widget type="TabItem">
<Property key="Caption" value=" #{sPrefs} "/>
<Property key="Caption" value=" #{sPrefs} "/>
<Widget type="Widget" position="4 4 352 54" align="Left Top HStretch">
<Widget type="TextBox" skin="NormalText" position="0 0 352 16" align="Left Top">
<Property key="Caption" value="#{sTransparency_Menu}"/>
@ -98,7 +98,7 @@
<Property key="TextAlign" value="Right"/>
</Widget>
</Widget>
<Widget type="HBox" position="4 250 260 24">
<Widget type="HBox" position="4 250 260 28">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top">
<UserString key="SettingCategory" value="Saves"/>
<UserString key="SettingName" value="autosave"/>
@ -108,7 +108,7 @@
<Property key="Caption" value="#{sQuick_Save}"/>
</Widget>
</Widget>
<Widget type="HBox" position="4 280 260 24">
<Widget type="HBox" position="4 280 260 28">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top">
<UserString key="SettingCategory" value="Game"/>
<UserString key="SettingName" value="best attack"/>
@ -118,7 +118,7 @@
<Property key="Caption" value="#{sBestAttack}"/>
</Widget>
</Widget>
<Widget type="HBox" position="4 310 260 24">
<Widget type="HBox" position="4 310 260 28">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top">
<UserString key="SettingCategory" value="GUI"/>
<UserString key="SettingName" value="subtitles"/>
@ -128,7 +128,7 @@
<Property key="Caption" value="#{sSubtitles}"/>
</Widget>
</Widget>
<Widget type="HBox" position="4 340 260 24">
<Widget type="HBox" position="4 340 260 28">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top">
<UserString key="SettingCategory" value="HUD"/>
<UserString key="SettingName" value="crosshair"/>
@ -140,7 +140,7 @@
</Widget>
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{sAudio} "/>
<Property key="Caption" value=" #{sAudio} "/>
<Widget type="TextBox" skin="NormalText" position="4 4 352 18" align="Left Top">
<Property key="Caption" value="#{sMaster}"/>
</Widget>
@ -198,9 +198,9 @@
</Widget>
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{sControls} "/>
<Property key="Caption" value=" #{sControls} "/>
<Widget type="HBox" position="4 4 360 24">
<Widget type="HBox" position="4 4 360 28">
<Property key="Padding" value="0"/>
<Property key="Spacing" value="4"/>
<Widget type="AutoSizedButton" skin="MW_Button" name="KeyboardButton">
@ -211,15 +211,15 @@
</Widget>
</Widget>
<Widget type="Widget" skin="MW_Box" position="4 34 352 154" align="Stretch">
<Widget type="Widget" skin="MW_Box" position="4 38 352 154" align="Stretch">
<Widget type="ScrollView" skin="MW_ScrollView" position="4 4 344 146" align="Stretch" name="ControlsBox">
<Property key="CanvasAlign" value="Left Top"/>
</Widget>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="4 194 137 24" align="Left Bottom" name="ResetControlsButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="4 198 137 24" align="Left Bottom" name="ResetControlsButton">
<Property key="Caption" value="#{sControlsMenu1}"/>
</Widget>
<Widget type="HBox" position="4 224 600 24" align="Left Bottom">
<Widget type="HBox" position="4 228 600 28" align="Left Bottom">
<Widget type="AutoSizedButton" skin="MW_Button">
<UserString key="SettingCategory" value="Input"/>
<UserString key="SettingName" value="invert x axis"/>
@ -237,10 +237,10 @@
<Property key="Caption" value="#{sMouseFlip}"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="NormalText" position="4 254 352 18" align="Left Bottom">
<Widget type="TextBox" skin="NormalText" position="4 258 352 18" align="Left Bottom">
<Property key="Caption" value="#{SettingsMenu:CameraSensitivity}"/>
</Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 278 352 18" align="HStretch Bottom">
<Widget type="ScrollBar" skin="MW_HScroll" position="4 282 352 18" align="HStretch Bottom">
<Property key="Range" value="10000"/>
<Property key="Page" value="300"/>
<UserString key="SettingType" value="Slider"/>
@ -250,15 +250,15 @@
<UserString key="SettingMin" value="0.2"/>
<UserString key="SettingMax" value="5.0"/>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 302 352 18" align="Left Bottom">
<Widget type="TextBox" skin="SandText" position="4 306 352 18" align="Left Bottom">
<Property key="Caption" value="#{sLow}"/>
<Property key="TextAlign" value="Left"/>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 302 352 18" align="Right Bottom">
<Widget type="TextBox" skin="SandText" position="4 306 352 18" align="Right Bottom">
<Property key="Caption" value="#{sHigh}"/>
<Property key="TextAlign" value="Right"/>
</Widget>
<Widget type="HBox" position="4 324 352 24" align="Left Bottom">
<Widget type="HBox" position="4 328 352 28" align="Left Bottom">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Bottom">
<UserString key="SettingCategory" value="Input"/>
<UserString key="SettingName" value="enable controller"/>
@ -270,11 +270,11 @@
</Widget>
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{sVideo} "/>
<Property key="Caption" value=" #{sVideo} "/>
<Widget type="TabControl" skin="TabControlInner" position="4 4 352 390" align="Stretch">
<Property key="ButtonAutoWidth" value="true"/>
<Widget type="TabItem">
<Property key="Caption" value=" #{sVideo} "/>
<Property key="Caption" value=" #{sVideo} "/>
<Widget type="ListBox" skin="MW_List" position="0 4 185 215" align="Left Top" name="ResolutionList"/>
<Widget type="TextBox" skin="NormalText" position="197 4 185 18" align="Left Top">
<Property key="Caption" value="#{SettingsMenu:WindowMode}"/>
@ -286,7 +286,7 @@
<Property key="AddItem" value="#{SettingsMenu:WindowModeWindowed}"/>
</Widget>
</Widget>
<Widget type="HBox" position="197 64 400 24">
<Widget type="HBox" position="197 58 400 28">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="VSyncButton">
<UserString key="SettingCategory" value="Video"/>
<UserString key="SettingName" value="vsync"/>
@ -296,7 +296,7 @@
<Property key="Caption" value="#{SettingsMenu:VSync}"/>
</Widget>
</Widget>
<Widget type="HBox" position="197 94 300 24">
<Widget type="HBox" position="197 88 300 28">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="WindowBorderButton">
<UserString key="SettingCategory" value="Video"/>
<UserString key="SettingName" value="window border"/>
@ -306,7 +306,7 @@
<Property key="Caption" value="#{SettingsMenu:WindowBorder}"/>
</Widget>
</Widget>
<Widget type="HBox" position="197 124 300 24">
<Widget type="HBox" position="197 118 300 28">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="WindowBorderButton">
<UserString key="SettingCategory" value="Post Processing"/>
<UserString key="SettingName" value="enabled"/>
@ -369,7 +369,7 @@
</Widget>
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{sDetail_Level} "/>
<Property key="Caption" value=" #{sDetail_Level} "/>
<Widget type="AutoSizedTextBox" skin="NormalText" align="Left Top">
<Property key="Caption" value="#{SettingsMenu:TextureFiltering}"/>
@ -432,7 +432,7 @@
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{SettingsMenu:Water} "/>
<Property key="Caption" value=" #{SettingsMenu:Water} "/>
<Widget type="VBox" position_real="0 0 1 1" align="Stretch">
@ -529,7 +529,7 @@
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{SettingsMenu:Lights} "/>
<Property key="Caption" value=" #{SettingsMenu:Lights} "/>
<!-- Lighting Method -->
<Widget type="TextBox" skin="NormalText" position="0 4 250 18" align="Left Top">
<Property key="Caption" value="#{SettingsMenu:LightingMethod}"/>
@ -637,7 +637,7 @@
</Widget>
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{SettingsMenu:Scripts} "/>
<Property key="Caption" value=" #{SettingsMenu:Scripts} "/>
<Widget name="ScriptDisabled" type="EditBox" skin="SandText" position_real="0 0 1 1" align="HStretch Top">
<Property key="Caption" value="#{SettingsMenu:ScriptsDisabled}"/>
@ -678,7 +678,7 @@
</Widget>
<Widget type="TabItem">
<Property key="Caption" value=" #{SettingsMenu:Language} "/>
<Property key="Caption" value=" #{SettingsMenu:Language} "/>
<Widget type="AutoSizedTextBox" skin="SandText" position="4 4 300 32" align="Left Top">
<Property key="Caption" value="#{SettingsMenu:LanguageNote}"/>
</Widget>

@ -21,7 +21,7 @@
</Widget>
<Widget type="ProgressBar" skin="MW_Progress_Red" position="74 0 130 18" name="HBar" align="Right Top">
<Property key="NeedMouse" value="false"/>
<Widget type="TextBox" skin="ProgressText" position="0 0 130 14" name="HBarT" align="Right VCenter">
<Widget type="TextBox" skin="ProgressText" position="0 0 130 12" name="HBarT" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
@ -41,7 +41,7 @@
<Widget type="ProgressBar" skin="MW_Progress_Blue" position="74 0 130 18" name="MBar" align="Right Top">
<Property key="NeedMouse" value="false"/>
<Widget type="TextBox" skin="ProgressText" position="0 0 130 14" name="MBarT" align="Right VCenter">
<Widget type="TextBox" skin="ProgressText" position="0 0 130 12" name="MBarT" align="Right VCenter">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
@ -61,7 +61,7 @@
<Widget type="ProgressBar" skin="MW_Progress_Green" position="74 0 130 18" name="FBar" align="Right Top">
<Property key="NeedMouse" value="false"/>
<Widget type="TextBox" skin="ProgressText" position="0 0 130 14" name="FBarT" align="Right VCenter">
<Widget type="TextBox" skin="ProgressText" position="0 0 130 12" name="FBarT" align="Right VCenter">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>

@ -149,18 +149,18 @@ color_misc=0,205,205 # ????
<Resource type="ResourceSkin" name="MW_DynamicStat_Red" size="204 18">
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
<Child type="ProgressBar" skin="MW_Progress_Red" offset="74 0 130 18" align="Right Top" name="Bar"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 12" align="Right Top" name="BarText"/>
</Resource>
<Resource type="ResourceSkin" name="MW_DynamicStat_Blue" size="204 18">
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
<Child type="ProgressBar" skin="MW_Progress_Blue" offset="74 0 130 18" align="Right Top" name="Bar"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 12" align="Right Top" name="BarText"/>
</Resource>
<Resource type="ResourceSkin" name="MW_DynamicStat_Green" size="204 18">
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
<Child type="ProgressBar" skin="MW_Progress_Green" offset="74 0 130 18" align="Right Top" name="Bar"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 12" align="Right Top" name="BarText"/>
</Resource>
</MyGUI>

@ -4,7 +4,7 @@
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 219 40" align="Center" name="_Main">
<Widget type="ProgressBar" skin="MW_Progress_Blue" position="5 6 199 20" name="ProgressBar">
<Widget type="TextBox" skin="ProgressText" position="0 0 199 16" name="ProgressText" align="Right VCenter">
<Widget type="TextBox" skin="ProgressText" position="0 0 199 14" name="ProgressText" align="Right VCenter">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>

@ -71,9 +71,9 @@ fallback=Water_UnderwaterColor,012,030,037
fallback=Water_UnderwaterColorWeight,0.85
# fonts
fallback=Fonts_Font_0,Pelagiad
fallback=Fonts_Font_0,MysticCards
fallback=Fonts_Font_1,DejaVuLGCSansMono
fallback=Fonts_Font_2,OMWAyembedt
fallback=Fonts_Font_2,DemonicLetters
fallback=FontColor_color_normal,202,165,96
fallback=FontColor_color_normal_over,223,201,159
fallback=FontColor_color_normal_pressed,243,237,221

@ -71,9 +71,9 @@ fallback=Water_UnderwaterColor,012,030,037
fallback=Water_UnderwaterColorWeight,0.85
# fonts
fallback=Fonts_Font_0,Pelagiad
fallback=Fonts_Font_0,MysticCards
fallback=Fonts_Font_1,DejaVuLGCSansMono
fallback=Fonts_Font_2,OMWAyembedt
fallback=Fonts_Font_2,DemonicLetters
fallback=FontColor_color_normal,202,165,96
fallback=FontColor_color_normal_over,223,201,159
fallback=FontColor_color_normal_pressed,243,237,221

@ -192,9 +192,6 @@ scaling factor = 1.0
# Size of in-game fonts
font size = 16
# Resolution of TrueType fonts glyphs
ttf resolution = 75
# Transparency of GUI windows (0.0 to 1.0, transparent to opaque).
menu transparency = 0.84

@ -946,7 +946,7 @@
<number>12</number>
</property>
<property name="maximum">
<number>20</number>
<number>18</number>
</property>
<property name="singleStep">
<number>1</number>
@ -1063,33 +1063,6 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="ttfResolutionLabel">
<property name="toolTip">
<string>Resolution of TrueType fonts glyphs. Automatically takes in account UI scaling factor.
Lower values make text more blurry, higher ones - more pixelated.</string>
</property>
<property name="text">
<string>TTF texture resolution</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="ttfResolutionSpinBox">
<property name="minimum">
<number>50</number>
</property>
<property name="maximum">
<number>125</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>75</number>
</property>
</widget>
</item>
</layout>
</item>
<item>

Loading…
Cancel
Save