Add Chinese character library to Ucgui

Source: Internet
Author: User

In the STM32 transplanted uCGUI3.9, but Ugui not with Chinese character library, so I looked for information online, many did not understand, but later still found a user to provide the Ucgui Chinese character Library generator, directly generated. c file, the operation is very simple, here and have the same needs of peers to share.

Here is the address of the Ucgui Kanji Generation Library:

http://download.csdn.net/detail/chunchui1987/7753621

Font software specific operation a look to understand

The need to display the Chinese characters added to the Chinese character generator, set the font height, width, font size, and then point to start the conversion, conversion good after the point copy to the Clipboard, the copied code to the new font C file, I use the hz16x16.c, Add the hz16x16.c file to the Ucgui project, open the GUI.H file, define the extern gui_const_storage Gui_font gui_fonthz16x16 in the inside; Go back to the hz16x16.c file and pull it to the end of the file. An array:

Gui_font gui_fonthz16x16 = {
Gui_fonttype_prop_sjis,
16,
16,
1,
1,
&gui_fonthz_16x16_prop1
};

Precede the array with Gui_const_storage, which is:

Gui_const_storage Gui_font gui_fonthz16x16 = {
Gui_fonttype_prop_sjis,
16,
16,
1,
1,
&gui_fonthz_16x16_prop1
};

You can then call the following function in the application file

Gui_setfont (&gui_fonthz16x16);
Gui_gotoxy (5,150);
Gui_dispstring ("Add Chinese character library");

If you add too many Chinese characters will cause the compilation connection is not successful, the report space is not enough, then you need to put the font in external flash.

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.