mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-24 07:05:34 -07:00
Finish LUS bump, including SoH-side fix for font free crash.
This commit is contained in:
parent
dafc9cff7e
commit
dabd23a5ee
2 changed files with 4 additions and 2 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 5e33d3e7cd0396f847923cd6c471eaf324e90351
|
Subproject commit 7f737f8be9580980f5a1fe7784d6e1045f0309da
|
|
@ -1678,7 +1678,9 @@ ImFont* OTRGlobals::CreateFontWithSize(float size, std::string fontPath) {
|
||||||
initData->Path = fontPath;
|
initData->Path = fontPath;
|
||||||
std::shared_ptr<Ship::Font> fontData = std::static_pointer_cast<Ship::Font>(
|
std::shared_ptr<Ship::Font> fontData = std::static_pointer_cast<Ship::Font>(
|
||||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource(fontPath, false, initData));
|
Ship::Context::GetInstance()->GetResourceManager()->LoadResource(fontPath, false, initData));
|
||||||
font = mImGuiIo->Fonts->AddFontFromMemoryTTF(fontData->Data, fontData->DataSize, size);
|
ImFontConfig fontConf;
|
||||||
|
fontConf.FontDataOwnedByAtlas = false;
|
||||||
|
font = mImGuiIo->Fonts->AddFontFromMemoryTTF(fontData->Data, fontData->DataSize, size, &fontConf);
|
||||||
}
|
}
|
||||||
// FontAwesome fonts need to have their sizes reduced by 2.0f/3.0f in order to align correctly
|
// FontAwesome fonts need to have their sizes reduced by 2.0f/3.0f in order to align correctly
|
||||||
float iconFontSize = size * 2.0f / 3.0f;
|
float iconFontSize = size * 2.0f / 3.0f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue