<div dir="ltr">Hi,<div><br></div><div>I have discovered an issue with osgText: under certain conditions, Text::getBoundingBox() returns different values with the same text, font, font resolution, etc.</div><div><br></div><div>You can reproduce the issue with this example:</div><div><br></div><div><div>int main() {</div><div>  const char *font_path = "museo500.ttf";</div><div><br></div><div>  osg::ref_ptr<osgText::Text> text0 = new osgText::Text;</div><div>  text0->setFont(font_path);</div><div>  text0->setFontResolution(128, 128);</div><div>  text0->setText("V");</div><div>  text0->setText("a");</div><div><br></div><div>  osg::ref_ptr<osgText::Text> text1 = new osgText::Text;</div><div>  text1->setFont(font_path);</div><div>  text1->setText("p");</div><div><br></div><div>  text0->setText("Va");</div><div>  float first_call = text0->getBoundingBox().xMax();</div><div><br></div><div>  text0->setText("c");</div><div><br></div><div>  text0->setText("Va");</div><div>  float second_call = text0->getBoundingBox().xMax();</div><div><br></div><div>  std::cout << first_call << std::endl;</div><div>  std::cout << second_call << std::endl;</div><div>  if (first_call != second_call) {</div><div>    std::cout << "Error!" << std::endl;</div><div>    return 1;</div><div>  }</div><div><br></div><div>  return 0;</div><div>}</div></div><div><br></div><div>Output:</div><div><div>36.4961</div><div>35.9961</div><div>Error!</div></div><div><br></div><div>The issue seems to be very specific, if I remove any of these lines the issue doesn't appear.<br></div><div><br></div><div>I've attached the font <span style="color:rgb(0,0,0);white-space:pre-wrap">if you want to reproduce it</span>.</div><div><br></div><div>Regards,</div><div>Romain Ouabdelkader.</div><div><br></div></div>