Fixed a potential issue where globally disabling text shaping could cause space detection to fail

This commit is contained in:
Leon Styhre 2024-08-22 00:19:10 +02:00
parent b0a7e76974
commit ce3d50d2b3

View file

@ -346,7 +346,11 @@ TextCache* Font::buildTextCache(const std::string& text,
bool spaceMatch {false};
if (needGlyphsPos && segmentIndex > 0) {
unsigned int spaceChar {0};
#if (DISABLE_SHAPING)
if (true)
#else
if (!mShapeText)
#endif
spaceChar = 32;
else if (segmentsHB[segmentIndex - 1].fontHB == mFontHB)
spaceChar = mSpaceGlyph;