diff --git a/graf3d/gl/src/TGLFontManager.cxx b/graf3d/gl/src/TGLFontManager.cxx index 7142e7568489f..7ffcff5ae8da7 100644 --- a/graf3d/gl/src/TGLFontManager.cxx +++ b/graf3d/gl/src/TGLFontManager.cxx @@ -188,6 +188,15 @@ void TGLFont::RenderHelper(const Char *txt, Double_t x, Double_t y, Double_t ang glPushMatrix(); //glLoadIdentity(); + #ifndef BUILTIN_FTGL + // https://github.com/root-project/root/issues/22076#issuecomment-4342764706 + char* vtxt = (char*)txt; // cast away const + const auto len = strlen(vtxt); + for(auto i = 0UL; i < len; ++i) + if (static_cast(vtxt[i]) > static_cast('\277')) + vtxt[i] = '\277'; + #endif + // FTGL is not const correct. Float_t llx = 0.f, lly = 0.f, llz = 0.f, urx = 0.f, ury = 0.f, urz = 0.f; BBox(txt, llx, lly, llz, urx, ury, urz);