1. 程式人生 > >解決Wince6.0介面顯示亂碼

解決Wince6.0介面顯示亂碼

在CE5上如下新增就可以顯示中文的介面,然而在CE6上卻沒有。
1.先開啟目標的工程檔案,單擊“Project”選單,再單擊“Properties->Configuration Properties-> Locale 先執行 “Clear All”,
Locales:將 “中文(中國)”打勾
Default languare:選擇“中文(中國)”
 
2.在Catalog View新增Core OS-->CEBASE-->International-->Locale Specific support-->Chinese (Simplified)-->Fonts-->SimSun & NSimSum(choose 1)--> SimSun & NSimSun (Subset 2_50):字型大小是3M左右,不用預設的,預設的字型太大了。

3.在Catalog View新增
Core OS-->CEBASE-->International-->Locale Specific support-->Chinese (Simplified)-->GB18030 Data Vonverter 和"Monotype Imaging AC3 Font Compression"
前者為漢字編碼標準集轉換器,後者為使用AC3對字型檔進行壓縮。

4. 在Catalog View新增
Core OS->CEBASE->International->Local Services(Choose 1)-> National Language Support (NLS)
 
仔細查詢原因,最終發現是添加了
Core OS -->CEBASE -->Graphics and Multimedia Technologies -->Graphics -->Raster Fonts Support
去掉就可以正常顯示中文的介面了。即加入點陣字型支援後,就會遮蔽掉幾乎所有的TrueType字型。

微軟的說明如下

SYSGEN_GDI_RASTERFONT

When this variable is set, support for raster fonts is enabled. A raster font glyph is a tiny bitmap that represents a single character size. Because the bitmaps for each glyph in a raster font are designed for a specific resolution on a particular device, raster fonts are generally considered device-dependent.

Windows Embedded CE supports TrueType and raster font technologies, but only one font technology can be used on a specified OS design. Generally, Windows Embedded CE uses Tahoma as the default system font. There is no default font for Korean, Japanese, Simplified Chinese or Traditional Chinese, so you must load at least one font so that your application can have text output.

After you choose TrueType or raster font technology during OS design, you cannot change technologies with an application.TrueType is the default in Windows Embedded CE, but you can implement raster technology in your OS design by adding the Raster Fonts Support Catalog item from the Platform Builder Catalog to your OS design.