none
Font problem - MS Sans Serif will not work

    Question

  • This is getting weird.

    MS Sans Serif fonts are "corrupted" and are somehow mapped to Arial font in my Windows Embedded run time.

    Using WES 2009, when I build and deploy my runtime image, at run time our MFC applications do no look correct. Many fonts are bold and the UIs are too big. I researched and found I needed the MS Sans Serif font (sserife.fon) to fix it. That fixed it, it worked correctly until...

    I then added all foreign languages to the run time image, built and deployed it. The problem came back. However the MS Sans Serif is installed and mapped correctly in the registry as far as I can tell. It is definately the correct version of sserife.fon file installed in the Windows\Fonts folder. English is the default language and the other installed languages are not active in the language bar. I removed all the foreign versions of sserife.fon file (language pack versions like sserifer.fon, sserifeg.fon etc.. ). I also manually un-installed and re-installed sserife.fon via Control Panel->Fonts to be sure.

    There is another odd behavior that I believe must be related: when I double click on sserife.fon, the Windows font viewer program opens it and displays the font as Arial (OpenType) !  It does this even if I uninstall & remove the font, and open a copy of the sserife.fon from another folder on the same system. It thinks its Arial !

    If I copy the sserife.fon file to a real Windows XP system, it is fine (it displays correctly as MS Sans Serif in the font viewer). So its not the file causing the problem, its some registry mapping or something like that.

    I have searched all through the registry to references to MS Sans Serif, Arial and sserife.fon. I looked through the registry entries for FontSubtitutes, Font etc... and I cannot see anything suspect.

    I have both the Fonts Application Compatibility and Codepage Application Compatibility macros in my Windows Embedded image.

    Another test I tried: In Notepad, I set the font to Arial, all the text in the document changes to Arial. I change the font to MS Sans Serif, the text appears identical to Arial (no noticable change). If I change to another font that is not "corrupted", all the text changes to that font.

    So what is going on here ? Anyone have a clue as to why MS Sans Serif font file (sserife.fon) is opening as Arial in the font viewer, and why our application using MS Sans Serif fonts appears with bold fonts and the UIs are too big ?
    Again, this happened after adding all the language packs.. so one or more of them must somehow be causing this - but how, why ?

    thanks for your attention

    Ian

    Wednesday, April 01, 2009 7:02 PM

Answers

  • EUREKA !

    I found and fixed the problem...mostly anyway.

    With the component "Fonts: Hebrew bitmap & TrueType fonts" included in the image, there is a Font Substiture entry that is not there otherwise.

    In the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes.

    There is an entry "MS Sans Serif,0"  with a value of "MS Sans Serif,177"

    So this must be a font mapping or substitution for MS Sans Serif. I would like to know what the "0" means in the MS Sans Serif,0 string.

    If I delete this entry and reboot the computer, both problems go away: MS Sans Serif being disaplayed as Arial in the Windows font viewer, and the fonts being all-bold in several applications making the UI larger.

    However one of our MFC applications still exhibits the all-bold font behavior even after deleting this entry. So we changed the font in the UI that is affected and we will not pursure this further .

    I am now wondering how safe it is to delete that entry "MS Sans Serif,0", what the impact could be... I imagine it will affect Hebrew text that uses MS Sans Serif font ? I think we can live that. It seems to have no impact in initial testing.

    thanks

    • Marked as answer by Ian_Miranda Wednesday, April 08, 2009 9:05 PM
    Wednesday, April 08, 2009 9:05 PM

All replies

  • What MUI languages did you add?

    -Sean

    www.sjjmicro.com / www.seanliming.com, Book Author - XP Embedded Advanced, XPe Supplemental Toolkit
    Wednesday, April 01, 2009 8:42 PM
  • Hello

    I added all of them. In Target Designer I searched for "Language Support" and added each component that it found under Software\System\International\Infrastructure  (Arabic Language Support, Brazilian Language Support, French Language Support, Greek Language Support etc...). I also had to add some extra IME components in order for Chinese text input to work.

    Our product is sold worldwide so we need to install all languages, and I don't think we can install them at run time so we need to embed them in the image.

    I have not yet gone through and removed each language one-by-one, or several at time, to find the offending language pack that is causing this. This could take several days to build the image & test each variation of the image but I may have no choice.

    At one point, I had only added 18 or so of the 24 Language Support components and was NOT having the problem. Then I added the rest and the problem started.

    I also don't have every font in every language selected, I used the Select Minimum button for each non-English language.

    thanks
    Wednesday, April 01, 2009 10:40 PM

  • I have isolated the component that is causiung this font problem. It is the Hebrew Language Support component.

    Some progress.... when I include Hebrew Language Support in my image, it causes the font problems mentioned above where sserife.fon opens as "Arial (Open Type)", and some application UIs appear with all-bold fonts and larger UIs.

    I tried adding the components "Hebrew ER MUI" and "Fonts: Hebrew font substitute" because they were not automatically added when I ran a dependency check, but it did not change anything.

    Any ideas or suggestions ? What would cause this ? A font mapping somewhere ? A "bad" codepage entry somewhere ?

    Another thing I noticed is that the font file ssee1255.fon (the Hebrew version of the file sserife.fon) is installed in Windows\Fonts and when I double click on it, it displays correctly as MS Sans Serif. So I searched the registry for "1255" and found several references to "windows-1255" as "AliasForCharSet" for some entries. I am wondering if this is a hint to the cause of this problem ...

    FYI I am using the evaluation edition of WES 2009, I will be upgrading to the full retail version this week. Is there any reason to believe that this problem may be unique to the evaluation version and will not happen with the "full" version of the toolkit ?

    thanks

    Monday, April 06, 2009 10:41 PM
  • I have narrowed it further, it is the component "Fonts: Hebrew bitmap & TrueType fonts" which is causing this. This is a dependency of the Hebrew Language Support component, and is also an optional selection of the "Fonts Application Compatibility" macro.

    • Marked as answer by Ian_Miranda Wednesday, April 08, 2009 9:01 PM
    • Unmarked as answer by Ian_Miranda Wednesday, April 08, 2009 9:01 PM
    Tuesday, April 07, 2009 4:22 PM
  • EUREKA !

    I found and fixed the problem...mostly anyway.

    With the component "Fonts: Hebrew bitmap & TrueType fonts" included in the image, there is a Font Substiture entry that is not there otherwise.

    In the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes.

    There is an entry "MS Sans Serif,0"  with a value of "MS Sans Serif,177"

    So this must be a font mapping or substitution for MS Sans Serif. I would like to know what the "0" means in the MS Sans Serif,0 string.

    If I delete this entry and reboot the computer, both problems go away: MS Sans Serif being disaplayed as Arial in the Windows font viewer, and the fonts being all-bold in several applications making the UI larger.

    However one of our MFC applications still exhibits the all-bold font behavior even after deleting this entry. So we changed the font in the UI that is affected and we will not pursure this further .

    I am now wondering how safe it is to delete that entry "MS Sans Serif,0", what the impact could be... I imagine it will affect Hebrew text that uses MS Sans Serif font ? I think we can live that. It seems to have no impact in initial testing.

    thanks

    • Marked as answer by Ian_Miranda Wednesday, April 08, 2009 9:05 PM
    Wednesday, April 08, 2009 9:05 PM
  • Hi,

    Did you find out if removing this registry entry had any adverse side effects? I've got exactly the same issue you had after adding the Arabic MUI pack to my fully Licenced and up to date (april update from ECE net) WES build. I did not see this issue in the older EVAL version of WES. Did you find a component fix after or did you just remove the registry entry as a solution?

    Regards

    Greg
    Wednesday, June 10, 2009 10:14 PM
  • hi.have WES 2009 standard in my system with run time image builded and running up .WES 2009 works well. his look is great .Have same problem .A lot of executable tools i use to debugging while running they shows large Bold
    characters. now i've seen that Hebrew language component might be problem source.Happy to know now.i've collected this information.Enrico-Italy
    Sunday, February 14, 2010 10:31 PM