Skip to content

Commit 8884150

Browse files
committed
Merge branch 'fontainofdreams' into 'master'
Allow bitmap font texture reading to end prematurely (#8378) See merge request OpenMW/openmw!4564
2 parents 1e0bdcc + 24468fd commit 8884150

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/fontloader/fontloader.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,8 @@ namespace Gui
425425
textureData.resize(width * height * 4);
426426
bitmapFile->read(textureData.data(), width * height * 4);
427427
if (!bitmapFile->good())
428-
fail(*bitmapFile, bitmapFilename, "File too small to be a valid bitmap");
428+
Log(Debug::Warning) << "Font bitmap " << bitmapFilename << " ended prematurely, using partial data ("
429+
<< bitmapFile->gcount() << "/" << (width * height * 4) << " bytes)";
429430
bitmapFile.reset();
430431

431432
MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture(bitmapFilename);

0 commit comments

Comments
 (0)