PDA

View Full Version : Determine if a font can display a character



jrideout
19th October 2006, 01:30
Does Qt have a way to determine if a particular font is able to render a particular Unicode character. If not, does anybody know another way?

Also, what about multiple character glyphs, how can query whether Qt can display them correctly?

wysota
19th October 2006, 10:33
Does Qt have a way to determine if a particular font is able to render a particular Unicode character.
No.


If not, does anybody know another way?
I don't think there is an easy way. It all depends on what type the font is. You could probably access the font internals through freetype or a simmilar handler, but I guess it would be very slow. I know pretty nothing about freetype, but I guess fonts must have something like properties telling which groups of glyphs they can render. I doubt you'll be able to query for a particular glyph in a decent way, though.


Also, what about multiple character glyphs, how can query whether Qt can display them correctly?
Qt can display correctly any Unicode character.