PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

localized text, ascii, unicode (ppc 2003)

Hello,
We are evaluating GD 301 and I've got into some troubles with national (french and czech) characters, perhaps someone will be able to help:

I've made png with ascii characters followed by national ones, I read some posts about unicode here but do not understand how to correctly create font with CreateFont() specialy I do not understand what Johan meant by 'unicode ASCII string' in 'Problem with german special characters' thread.
Does it means that i have to provide characters in UTF8 or in local codepage to CreateFont() ?

Is the font limited to 256 characters?

Does it all means that I have to use UTF8 or local codepage (say win1251) while using DrawText() even its parameter is wide (TCHAR) string?

example:
when i've add czech character 's with caron' (U+0161) at the very end of font and then tried to DrawText() string "a's with caron'" I got two 's with caron's on the screen
from this it seems to me (a reverse guess) that GD internal character table is a char array. so 0x161 (letter 's with caron') is truncated to 0x61 (letter 'a') so whenever i try to draw letter 0x61 or 0x161 it's the same bitmap letter. correct?
What steps should i take to get GD working with unicode strings?

best regards
- Zdenek Nemec - zero(at)mapfactor(dot)com
Hi,
I hope this will help you,
I already asked about font creating and how to use CreateFont.
Please check a previous thread with the subject "Font size" to see how I solved my problem.
But I must admit that I didn't try to add foreign characters...
Regards.
Vincent.
vince_mad wrote:Hi,
I hope this will help you,
I already asked about font creating and how to use CreateFont.
Please check a previous thread with the subject "Font size" to see how I solved my problem.
But I must admit that I didn't try to add foreign characters...
Regards.
Vincent.


nop that's not i have problems with, i have no problem to create say english custom fonts and scale them, i ve been just curious if there is possible to use them(custom fonts) without a need to convert everything into a local codepage.

anyway thanks for the reply

regards

- Zdenek Nemec
sasa · 21 Jul 2004, 13:50 UTC — Unicode font problem
Hi Zdenek,

have you found some solution for your problem?

I'm developing an application for symbian and smartphone and now I have to show some unicode charactes.

It's not a problem to me to create such a font (containing the signs I need) but I whant to know if it is possible to enter some unicode signs into "pString" and later use that unicode signs normaly as any other characters?

What is the "pString"'s max length and is it 256?

Thanx in advance,

Sasa