Font Issues



I have a richtextbox that gets the selectionfont from a combo box populated
from the InstalledFontCollection.
There are a number of fonts that the richtextbox will not update to
Amongst these are:
Raavi, Shruti and Tunga.
When I set the selectionfont to any of these fonts, unless I have 1 or more
characters selected, the font change has no effect and reverts back to the
previous font as soon as I type something in.
When I select a couple of characters and set the font to any of these, they
appear the same as Arial.

When I use a fontdialog there is a "script" combo which normally lists
"western"(Arial, Times etc..) or "symbol"(Symbol, Wingdings etc..).
When I select any of the above fonts, in the combo it lists "Other" as the

I would like to be able to not load these fonts into my font combo box but
can find no way to determine which fonts are which apart from hardcoding the
values to exclude.
It does not seem to be the GDICharset or the
lfCharSet from the LOGFONT structure. (which are the the same IIRC).

I also have small solution that demonstrates this behaviour if anyone is

Any help would be muchly appreciated.

Kevin Yu [MSFT]

Hi KG,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you change the SeletionFont to
Raavi, Shruti or Tunga, the font will be changed back to previous font as
soon as you type something. If there is any misunderstanding, please feel
free to let me know.

I have tried it on my machine, however, I cannot reproduce it. If you have
re-set the SelectionFont of the RichTextBox without a selection, we have to
put the cursor back to the original persition before the combo box is
clicked and continue typing, or the font will not be changed. Also, as far
as I know, Raavi, Shruti and Tunga looks like Arial. You can try to check
it in Word.

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
"This posting is provided "AS IS" with no warranties, and confers no

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question