diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-12-08 16:59:58 -0800 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-12-08 16:59:58 -0800 |
commit | 423b943b4107993e87acf79ddf53bd6a649c4b3e (patch) | |
tree | 0bf1f20d26aed33873b030c32203a2c393757c78 /indra/llrender/llfontgl.cpp | |
parent | be49b8bed5fbd6cde63d8c5b6de432dc1f4b123d (diff) | |
parent | 27da9502d4f10311d12af7a0b129d46bdf94925e (diff) |
Merge
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-rw-r--r-- | indra/llrender/llfontgl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 9ba0cfc6b8..a28ffbfdc0 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -446,7 +446,9 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars // for the last character we want to measure the greater of its width and xadvance values // so keep track of the difference between these values for the each character we measure // so we can fix things up at the end - width_padding = llmax(0.f, (F32)fgi->mWidth - advance); + width_padding = llmax( 0.f, // always use positive padding amount + width_padding - advance, // previous padding left over after advance of current character + (F32)(fgi->mWidth + fgi->mXBearing) - advance); // difference between width of this character and advance to next character cur_x += advance; llwchar next_char = wchars[i+1]; |