WINCE6 同时支持简繁体
最近兩星期在玩WINCE6,因產品需要,應用軟件需支持簡繁體,顯示其中一種很好辦,只需要加入相應的字庫。如加入簡體字庫:
CEBASE->International->Locale Specific Support->Chinese(Simplified),選擇字庫SimSun & NSimSun(Subset 2_50),通常情況選擇這個就夠了,而SimSun & NSimSun這個太大,有10M左右,并把GB18030 Data Converter及Monotype Imaging AC3 Font Compression(對字體進行壓縮,減小NK大小)勾上。編譯燒入,簡體字都能正常顯示,但繁體字就顯示為框框,原因是沒有添加繁體字庫。
添加繁體字庫:
CEBASE->International->Locale Specific Support->Chinese(Traditional),選擇MingLiU & PMingLiU(Subset 2_70),并把Monotype Imaging AC3 Font Compression勾上。編譯燒入,繁體字也能正常顯示。至此以為大功告成,問題出來了,發現簡體字又不能正常顯示,這就納悶了,明明將簡體字庫添加到系統了,為啥不能顯示呢?。。。。。
將繁體字庫去掉,簡體字又能顯示出來,初步認為是注冊表哪個地方有覆蓋,最后發現工程下的Common.reg有疑問:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]
????? "Tahoma"="\\Windows\\simsun.ac3,NSimSun"
????? "Courier New"="\\Windows\\simsun.ac3,NSimSun"
????? "Arial"="\\Windows\\simsun.ac3,NSimSun"
????? "Times New Roman"="\\Windows\\simsun.ac3,NSimSun"
????? "Symbol"="\\Windows\\simsun.ac3,NSimSun"
; @CESYSGEN ENDIF FONTS_AC3_VERSIONS
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SkipTable]
????? "Tahoma"="005c,00a5,007e,0391-03c9,2026,2116,221a,25a0-25ff"
????? "Arial"="005c"
????? "Courier New"="005c"
; @CESYSGEN ENDIF FONTS_SIMSUN
?
?
; @CESYSGEN IF FONTS_MINGLIU || FONTS_MINGLIU_2_70 || FONTS_MINGLIU_2_80 || FONTS_MINGLIU_2_90[HKEY_LOCAL_MACHINE\SYSTEM\GDI]
??????? "FontLinkMethods"=dword:1
; @CESYSGEN IF !FONTS_AC3_VERSIONS
; @CESYSGEN ENDIF !FONTS_AC3_VERSIONS
; @CESYSGEN IF FONTS_AC3_VERSIONS
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]
???? "Tahoma"="\\Windows\\mingliu.ac3,PMingLiU"
???? "Courier New"="\\Windows\\mingliu.ac3,PMingLiU"
???? "Arial"="\\Windows\\mingliu.ac3,PMingLiU"
???? "Times New Roman"="\\Windows\\mingliu.ac3,PMingLiU"
???? "Symbol"="\\Windows\\mingliu.ac3,PMingLiU"
; @CESYSGEN ENDIF FONTS_AC3_VERSIONS
注意紅色標出的兩個地方,[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]鍵名是相同的,前面是簡體字庫,后面是繁體字庫,這下就可以肯定后面的注冊表會將前面的覆蓋。汗……,難道是MS的BUG?
最后在PB幫助文檔上也看到
If? your? run-time? image? includes? more? than? one? East? Asian? locale,? you? must? modify? the? values? under? the? SystemLink? registry? key? in? common.reg? to? include? the? font files? for? all? of? your? targeted? locales.? You? must? list? all? of? the? font? files? by? using? a? semi-colon? separator? as? shown? in? the? following? example:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]
????? "Arial"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS? UI? Gothic"
"Times? New? Roman"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS? UI? Gothic"
??? "Tahoma"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS? UI? Gothic"
??? "Courier? New"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS? UI? Gothic"
??? "Symbol"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS? UI? Gothic"
?
清楚問題原因就好辦了,將注冊表改成
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]
????? "Tahoma"="\\Windows\\simsun.ac3,NSimSun;\\Windows\\mingliu.ac3,PMingLiU"
????? "Courier New"="\\Windows\\simsun.ac3,NSimSun;\\Windows\\mingliu.ac3,PMingLiU"
????? "Arial"="\\Windows\\simsun.ac3,NSimSun;\\Windows\\mingliu.ac3,PMingLiU"
????? "Times New Roman"="\\Windows\\simsun.ac3,NSimSun;\\Windows\\mingliu.ac3,PMingLiU"
????? "Symbol"="\\Windows\\simsun.ac3,NSimSun;\\Windows\\mingliu.ac3,PMingLiU"??
OK,沒問題,簡繁體都能正常顯示了
?
---------------------------------------------------------------------
尊重他人勞動成果,轉載請標明出處http://www.cnblogs.com/feishanm?
?
?
?
?
轉載于:https://www.cnblogs.com/feishanm/archive/2010/08/17/1801644.html
總結
以上是生活随笔為你收集整理的WINCE6 同时支持简繁体的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux查看cpu核数命令,Linux
- 下一篇: atmega8 例程:T1定时器 CTC