How to Create a QPF font library in an embedded Linux environment

Source: Internet
Author: User
Article Title: How to Create a QPF font library in an embedded Linux environment. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

QT is the underlying library of the most widely used graphic user interfaces on the Linux operating system platform. QT/Embedded derived from QT/Embedded is widely used in the development and development of Embedded systems. In fact, QT/Embedded provides users with fewer Non-ASCII character libraries, in the embedded Linux system used in our development process, there is only one Chinese Character Library and one Japanese character library (not a different rotation angle), and the font size is different, therefore, in the actual development process, when we are dealing with Chinese font display, users who finally use the software developed by these tools often complain that the font is ugly and the font size is sometimes inconsistent, therefore, you can customize your own font so that end users can see the beautiful Chinese display. This is an urgent problem to be solved when using QT/Embedded to develop various programs. Here, we will first introduce how to create a QPF font library in and under embedded Linux:

First, you need to modify two files to customize your font library. One is FONTDIR, which is the index of the font most suitable for your current system. The other is the font file, there can be one or more font files. The font file is the bitmap or vector of the final displayed words. They must all be placed in the directory/usr/qt/lib/fonts (based on our platform QT/Embedded, other platforms may be different, the same below ).

Secondly, the content of the specific FONTDIR file is as follows:

        
         fixed fixed_120_50.qpf QPF n 50 120helvetica helvetica_80_50.qpf QPF n 50 80helvetica helvetica_120_50.qpf QPF n 50 120 uhelvetica helvetica_120_75.qpf QPF n 75 120 uhelvetica helvetica_140_75.qpf QPF n 75 140helvetica helvetica_180_75.qpf QPF n 75 180
        

Each line in the file identifies a specific font. The meaning of each segment is: the first column is name, the second column is file, and the third column is renderer, which is equivalent to the font format. Therefore, BDF, TTT, QPF and other options. Column n indicates iitalic and whether it is italic. The fifth column indicates weight, where 50 indicates Normal and 75 indicates Bold. The sixth column indicates the size, for example, 120 indicates 12pt. The seventh column is flags. There are three options: s = smooth (anti-aliased) u = unicode range when saving (default is Latin 1 a = ASCII range when saving (default is Latin 1 ))

Such a QPF font is generated in an embedded Linux environment.

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.