Linux fix Firefox Chinese page garbled problem

Source: Internet
Author: User
Tags call back

1. Since Firefox defaults to allow Web pages to choose their own fonts, there will be some Web site garbled on Linux. So you can remove the option to allow the page to choose its own font to solve some garbled situation.

  

2. If there are garbled characters, and other applications garbled, try the following solution.

The simple brute force method is to remove the default profile directly.

1 sudo mv /etc/fonts/conf.d/-sansserif.conf  /etc/fonts/conf.d/-sansserif.conf.bak

In addition, 49-sansserif.conf is Flashplayer font, in fact, you can modify it.

1 <?XML version= "1.0"?>2 <!DOCTYPE fontconfig SYSTEM "Fonts.dtd">3 <Fontconfig>4 <!--5 If The font still has no generic name, add Sans-serif6  -7     <MatchTarget= "pattern">8      <Testqual= "All"name= "Family"Compare= "Not_eq">9         <string>Sans-serif</string>Ten         </Test> One         <Testqual= "All"name= "Family"Compare= "Not_eq"> A             <string>Serif</string> -         </Test> -         <Testqual= "All"name= "Family"Compare= "Not_eq"> the             <string>Monospace</string> -         </Test> -         <Editname= "Family"Mode= "Append_last"> -   <string>Font</string># Change the font to the font you like . +         </Edit> -     </Match> + </Fontconfig>
View Code

Garbled Reason:

Sans, serif Two fonts are "virtual" fonts. Actually they don't exist.
is composed of multiple font unions.
This file should be a multi-font file binding for these two virtual fonts of the settings file.

If you encounter garbled characters, you should have nothing to do with this configuration. I think it may be that your program has a non-Chinese font set. This will cause the system to call the default font because of the font is not complete, sans serif Two is the usual default font. The result is a problem with the default font bindings (after all, this is something Westerners, font settings also favor the West). Causes text to appear garbled. Or previously set the sans serif font, this post-complement content will affect the font settings. The configuration order here is sorted by file name, and 48 starts with a configuration that takes precedence over the 49 start.

You can try to modify this font manually, which is an XML-style text configuration. You can find a Chinese font you like, copy to the computer's font directory (usually a directory inside the/usr/share/fonts, note the need for root permission).
After modifying this profile for your favorite combination (first English, then Chinese, font support program will be called sequentially, if you put the font you do not like in the beginning, even if you can support the back, but still call the beginning of the font, English fonts because there is no Chinese part, so the font program will automatically call back).
After setting the font to Sans, serif, restart X will be available (no restart, only valid on the latest running program).

This file must be a plain text compiler, and the content should be UTF8 encoding (Chinese font name must be used UTF8)! In addition, the bound font must be the font in your system, or your system will ignore the font continue to the next, if you choose the Chinese font system is not inside, will call failed to display Chinese.

Linux fix Firefox Chinese page garbled problem

Related Article

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.