Problem with Fonts not displayed correctly

  • Thread starter Slobodan Brcin \(eMVP\)
  • Start date
S

Slobodan Brcin \(eMVP\)

HI PC,

Ü is 220 on my Windows XP Prof. Also you
154 is per old Extended ASCII table I think. You can rely only on position of ASCII values from 0..127.

Use Character Map on your XPe system to see character values.

Regards,
Slobodan
 
P

PC Proxy

I have a VB application running on my XPe machine that must support multiple
languages.
The application works correctly under XPPro, but under XPe many characters
are not shown correctly.
Even within the application, some types of objects show the characters
correctly and some don't.
These characters are part of the standard ASCII table (ie. Ü used in German
is code 154).
MSSanSerif is the font used almost entirely throughout the App.
Does anyone have a clue what could be causing this behavior?

Thanks,

Andrew
 
P

PC Proxy

I don't think this is the same "Old problem with wrong component" as you
suggest.
The correct font is shown. And it is shown correctly for many characters.
And some parts of the application show all of the characters correctly.
But other parts show incorrect characters (ie. Ü is replaced with U).
I tried changing the app to use Microsoft San Serif rather than MS San
Serif.
The problem only changed slightly (ie. Ü is replaced with O).

Andrew
 
K

KM

Andrew,

This sounds like you may have problems with a font codepage used.
How do you use (select) the font on your device context?
Look in to the LOGFONT structure, lfCharSet field. Populate it properly.
For some info functions, use APIs : EnumFontFamiliesEx, GetTextCharsetInfo/TranslateCharsetInfo.
MSDN will show you more details.
 
P

PC Proxy

The app is developed with VB6.
The font is selected at design time via object property pages.
The objects involved are MS or 3rd party provided.
The text comes from an Access database.

Btw, what is "Fonts:Font Mapper" component?
There is no description or help for this component.
Could it help to include this in my image?

Andrew
 
P

PC Proxy

OK, working with Character Map on the XPe system, I find that Ü does not
exist for MS San Serif. Instead, a block is shown for code 154 and code 220
does not exist.
Microsoft San Serif shows Ü for code 220 and code 154 does not exist.
My XPPro system shows the same for Microsoft San Serif and MS San Serif (220
= Ü).
I used the Font Tracker component to ensure I had the fonts included
correctly.
What's missing?
 
K

KM

Andrew,
The app is developed with VB6.
The font is selected at design time via object property pages.
The objects involved are MS or 3rd party provided.
The text comes from an Access database.

You still have access to Win32 API (just import/load related system Dlls).
You have to get the device context, though. Anyway, let try to change the registry defaults first (see below).
Btw, what is "Fonts:Font Mapper" component?

Font Mapping :) Well.. it sets the defaults I suggested you to change through the APIs.
There is no description or help for this component.
Could it help to include this in my image?

Yes, I think so. Just make sure that the follwoing values under the [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontMapper]
are set as:
Set "MS SANS SERIF"=dword:0x1000 and "MS SANF"=dword:0x5000.

KM
 

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