Some experiences on the font of the openerp Client

Source: Internet
Author: User

When the client runs by default, it is of course difficult to see, because the normal Chinese font is not used for display.Because the UI of the openerp client is based on GTK, modifying the font of the openerp client is actually modifying the display of Chinese Characters in GTK.

One of the two configuration files under GTK is etc \ gtk-2.0 \ gtkrc, and the other is etc \ pango. aliases.
In a Chinese operating system, you can create a new file named gtkrc. zh_cn instead of modifying gtkrc directly.The content is roughly as follows:

GTK-theme-name = "  MS-Windows  "  GTK -Icon-theme-name = "  Tango  "  GTK -Fallback-icon-theme = "  Hicolor "  GTK -Alternative-button-order = 1 GTK -Alternative-sort-arrows = 1 GTK -Auto-mnemonics = 1 GTK -Show-input-method-menu = 0gtk -Show-Unicode-menu = 0 Style  "  User-font  "  {Font_name = "  Serif 10  " } Widget_class  "  *  " Style "  User-font  "  Widget  "  *  " Style "  User-font  "  GTK -Font-name = " Simsun 10  " 

 

The Custom font style is not popular on the Internet, that is, similar to the following:

 
Style"User-font"{Font_name="Simsun 10"}

Why is this so that the system will not receive a warning like this when displaying italics:

Pangowarning: couldn'T load font "simsun italic not-rotated 10", falling back to "sans italic not-rotated 10", CT ugly output.

 

How can serif be used in Chinese?This depends on the definition of the font set in pango. aliases.In pango. aliases, find the serif font set and modify it to the following content:

 
Serif ="Times New Roman, angsana new, Microsoft yahei, simsun, mingliu, gulimche, MS Gothic, Kartika, latha, Mangal, raavi"

In this way, the English or italic fonts are used, and the Chinese characters are used in the order of ",,.

One thing to note is that the default pango. in aliases, mingliu is all in front of simsun, which makes many Chinese characters in the openerp client look traditional, so you can put all simsun in front of mingliu.

Refer:

Some experiences on the font of the openerp Client

GTK Chinese display in Windows

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.