Font in widget question

Hi,

        I

am using symbol fonts for an application and am writing a symbol picker
for this purpose. There are ~10 fonts that the symbols can come from but not
all characters in each font is taken. So what I did is to enumerate all
character from ASCII 27 to 255 as one item in a ComboBox. There are other
controls to choose which font to use and I was very happy to find out that simply
changing the font of the character ComboBox is working out great. Because I use
a font of size 50 (to see the symbol in detail), the ComboBox may not be the
best option, but it’ll do for now.

        What

I am wondering about is whether there is a way for me to detect whether a
character is in a given font is present before adding it to the ComboBox. I’d
like to avoid adding these “rectangles” in the control. Making a
list of actual character for all fonts isn’t really an option that I want
to consider.

Thanks,

Christian

http://vibrio.cs.dal.ca/SandWiki/

Christian Blouin wrote:

            What I am wondering about is whether there is a way for me to detect whether a character is in a given font is present before adding it to the ComboBox. I’d like to avoid adding these “rectangles” in the control. Making a list of actual character for all fonts isn’t really an option that I want to consider.

Unfortunately I don't think that wxWidgets exposes any functionality like that. But you might be able to find some 3rd party library that can work directly with TTF font files and give you some info like that.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!