Asian Fonts

L

lakshmi

hi,
I have a iPAQ Model ID: hpiPAQ hw6510a, OS Version 4.21 .... Is it
possible to load Asian Fonts(Japanese, Chinese, Korean) in it ?
I'm working on an PocketPC appplication in Vb.Net and we need to allow
the
user to view text in the following Asian languages(japanese, Chinese,
Korean).
I tried downloading a few fonts but it didnt work.
Any help on this one?

Many Thanks,
 
L

lakshmi

Hi,
Thanks for the inputs regarding the Asian fonts.

1) I tried downloading the font SImSun.ttc and I copied it on my device
to the folder Windows/Fonts. But when I opened the Chinese text file
the characters did not show up in Chinese.
2) Then I tried using the function AddFontResource in my application to
include the font.
Dim a As Integer = AddFontResource("\Windows\Fonts\SImSun.ttc")
Label1.Font = New System.Drawing.Font(a, 8.0, FontStyle.Regular)

Actually, I want the text to show up in Chinese on the control Label1.
It still didn't work.... Now I guess I ve not used the function
AddFontResource in the correct way.
How to use this function AddFontResource? Thereafter, Is it required to
bind the control to this font ? If so how is it done?
You have also mentioned that I need to "import" and then call this
function. How is that done?
I really appreciate your help
Many Thanks,
 
P

Paul G. Tobey [eMVP]

The program is responsible for *choosing* a font to display text. No
application that I've ever seen chooses a font based on what kind of text is
in its document file, but the edit control certainly does not scan the text
and pick a font based on what's there! The font is available, so, if you
use that font to display the text, presumably it will appear correctly.
Assigning a font to the Label1.Font member is the right thing to do.

To see the documentation on AddFontResource, install the SDK for native code
development on Pocket PC or something like that. The parameter is the path
to the font file. The return value is the number of fonts added. Since
you've copied the font to the \Windows\Fonts folder, I don't think that you
need to call AddFontResource, anyway. It's used to register a new font file
for the system. Once it's done, the font name found inside that font file
should work when calling the Font( string, ... ) version of the Font
constructor.

Paul T.
 

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

Top