diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-09-04 23:09:56 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-09-04 23:25:54 +0800 |
| commit | 7f8684301a716d23343cd6e85a4759f3a11546d4 (patch) | |
| tree | 989df6258c0399431aba03da5805d93542db5317 /indra/llrender/llfontfreetype.cpp | |
| parent | 0400b6693648c58f901c2b492a78e332815bcaa2 (diff) | |
| parent | a4aa5233cad1fb66555e7768750af1b57bc1da7c (diff) | |
Merge tag 'Second_Life_Release#a4aa523-26.4' into 26.4
Diffstat (limited to 'indra/llrender/llfontfreetype.cpp')
| -rw-r--r-- | indra/llrender/llfontfreetype.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 73540200c9..ab3089a269 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -115,7 +115,7 @@ LLFontGlyphInfo::LLFontGlyphInfo(U32 index, EFontGlyphType glyph_type) mChar(0), mWidth(0), // In pixels mHeight(0), // In pixels - mXAdvance(0.f), // In pixels + mXAdvanceRaw(0.f), // In pixels mYAdvance(0.f), // In pixels mXBitmapOffset(0), // Offset to the origin in the bitmap mYBitmapOffset(0), // Offset to the origin in the bitmap @@ -133,7 +133,7 @@ LLFontGlyphInfo::LLFontGlyphInfo(const LLFontGlyphInfo& fgi) , mChar(fgi.mChar) , mWidth(fgi.mWidth) , mHeight(fgi.mHeight) - , mXAdvance(fgi.mXAdvance) + , mXAdvanceRaw(fgi.mXAdvanceRaw) , mYAdvance(fgi.mYAdvance) , mXBitmapOffset(fgi.mXBitmapOffset) , mYBitmapOffset(fgi.mYBitmapOffset) @@ -356,14 +356,14 @@ F32 LLFontFreetype::getXAdvance(llwchar wch) const { return mMaxDigitWidth; } - return gi->mXAdvance; + return gi->mXAdvanceRaw; } else { char_glyph_info_map_t::iterator found_it = mCharGlyphInfoMap.find((llwchar)0); if (found_it != mCharGlyphInfoMap.end()) { - return found_it->second->mXAdvance; + return found_it->second->mXAdvanceRaw; } } @@ -382,7 +382,7 @@ F32 LLFontFreetype::getXAdvance(const LLFontGlyphInfo* glyph) const return mMaxDigitWidth; } - return glyph->mXAdvance; + return glyph->mXAdvanceRaw; } F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const @@ -637,15 +637,15 @@ LLFontGlyphInfo* LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, l gi->mLsbDelta = (S32)fontp->mFTFace->glyph->lsb_delta; gi->mRsbDelta = (S32)fontp->mFTFace->glyph->rsb_delta; // Convert these from 26.6 units to float pixels. - gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f; + gi->mXAdvanceRaw = fontp->mFTFace->glyph->advance.x / 64.f; gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f; if (mWeight > 0 && wch >= '0' && wch <= '9') { // Digits are supposed to be preloaded, and buffers - // refresh when new chars get added, so this lazy load - // should not cause any issues. - mMaxDigitWidth = llmax(mMaxDigitWidth, gi->mXAdvance); + // refresh when new chars get added (mGeneration), + // so this lazy load should not cause any issues. + mMaxDigitWidth = llmax(mMaxDigitWidth, gi->mXAdvanceRaw); } insertGlyphInfo(wch, gi); |
