WinCE kernel reduction (Chinese font) and separation of Font Library and Kernel

Source: Internet
Author: User

Each time you customize a Chinese system, NK is always about 10 MB larger than that of English. It also takes time to Copy the kernel to the memory during bootloader startup, and it also occupies a lot of memory, it's a waste of about 10 MB of memory left for the system and application! I have studied it and also referred to the online materials. The following is a summary of how to reduce the size of the Chinese font and place the font on the external storage. The core idea is to reduce the size of the selected Chinese font SimSun & NSimSun (SYSGEN_FONTS_SIMSUN) to SimSun & NSimSun (Subset 2_50) (SYSGEN_FONTS_SIMSUN_2_50. In the registry, [HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontPath] and [HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SystemLink] Change the storage location of simsun. ac3 or simsun. ttc.

 

I. Reduce the font size of Chinese Characters

1. open the target Project file and click "Project"> "properties... "->" Configuration Properties "->"-> "Local"-> "Clear All ",

Locales: tick "English (US)" "Chinese (China )"

Default roles are: Select "Chinese (China )"

After step 2 is completed, the default font of xinsong is used in the project.

2. Return to Catalog and select "Core OS"> "International"> "Locale Spectific Support"

-> "Chinese [Simplified]"

▲Agfa AC3 Font Compression.

▲Simsun & NSimSun (Subset 2_50): the font size is about 3 m. It is best to select Subset 2_50 for WINCE. Therefore, replace the original Chinese font with the (Subset 2_50) Chinese font, select SimSun & NSimSun (Subset 2_50) and right-click the component to add it. This will replace the original font. This has no effect on Chinese display and achieves kernel slimming. Optional;

Supplement: in the absence of compressed fonts, the default font size of the New Song Dynasty is more than 10 MB, and the file is simsun. if you select Subset 2_50 and the file is simsun_2_50.ttc, the font size is close to 3 MB, which is also the key to crop the WinCE volume. Of course, if you select AC3 to compress the font library, which size can be further reduced. The compressed file is simsun_2_50.ac3, And the size is less than 2 MB.

Directory of the font library: D:/WINCE500/PUBLIC/COMMON/OAK/FILES

▲Gb18030 Data Converter: Chinese character encoding standard set Converter, required

3. Run the Sysgen command again. In this way, the system can display Chinese characters normally without worrying about the huge NK volume.

 

2. Save the font to the external storage to reduce the kernel size.

There are a lot of introductions on the Internet to save the font to the SD card, Flash, and so on to reduce the size of the kernel, but note that before loading the display driver, you must load the driver of the storage device that saves the font, otherwise, the Chinese font cannot be loaded. The box is displayed after the system starts. Save the font to the storage device in the registry because the driver of the storage device has been loaded for a long time.

While I am using a hard disk, the Registry needs to be modified as follows

1. Add the following in platform. reg:

[HKEY_LOCAL_MACHINE/SYSTEM/GDI]

"FontLinkMethods" = dword: 1

[HKEY_LOCAL_MACHINE/software/Microsoft/fontpath]

"Fontpath" = "// NAND Flash"; directory of the font file

 

[HKEY_LOCAL_MACHINE/software/Microsoft/fontlink/systemlink]

"Tahoma" = "// NAND Flash // simsun. Ac3, nsimsun"; I use a compressed font, so it is simsun. ac3.

"Courier New" = "// NAND Flash // simsun. Ac3, nsimsun"

"Arial" = "// NAND Flash // simsun. Ac3, nsimsun"

"Times New Roman" = "// NAND Flash // simsun. Ac3, nsimsun"

"Symbol" = "// NAND Flash // simsun. Ac3, nsimsun"

2. Delete simsun. AC3 from the common. bib file in the project directory and confirm that the file will not be compiled into the kernel.

3. copy the file to hard disk and start the disk again.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.