I am trying to check whether the font contains a glyph for a given character. To achieve this, I have loaded the font by readFontFile() and get a glyph of the character. Then, I wanted to check whether the glyph texture is available. I tried the next code
osg::ref_ptr<osgText::Font> font = osgText::readFontFile("path_to_fft_font_file");
auto glyph = font->getGlyph(std::make_pair(32.0f, 32.0f), charcode);
auto texture_info = glyph->getTextureInfo(osgText::ShaderTechnique::GREYSCALE);
For all char codes (that are really supported by the font and that are not) the texture_info is nullptr.
I also tried to check glyph->getTotalDataSize(). It gives not a zero value if the character is not supported by the font but the font contains a glyph for none Unicode (usually looks like ▯).
Is there a way to check if the osgText::Font object contains a non-none glyph for the given character?