Linux's Chinese beautification problem

xiaoxiao2021-03-06  77

Take a day, I originally intended to go to the book later, I will go back to check it later, I accidentally wrote so long, so I decided to share it with you. If you find any mistakes, please point out, grateful! In addition, If you think this thing is worth sharing with your friends, then keep the above file header when forwarding, it is a small support for my code a day! Beautiful and good operating system is not our purpose. Hope this The articles can help at least one of two friends from this Linux's Chinese beautification problem, and truly invest in the use of Linux to serve us, use Linux to develop a substantive thing. The following content includes: 1. For RedHat Two pencils Add Font 2. Let EnLightenment Chinese Problems in Chinese 3. Java: - JBuilder's Chinese Issues - J2SDK Chinese Issues - J2RE's Chinese Question How everyone picks yourself. Take it. Add New font [Note] The following process is tested on Redhat 9.0. Prepare fonts to be installed, such as: Simsun.ttc, Tahoma.ttf ... According to the core X-letter subsystem and Fontconfig font, respectively, according to the issuance System Add Font: Adding Fonts for Core X-Body Subsystem [Note] The following sections should also apply to the version before Redhat 9.0, because the core X-letter subsystem exists in the version so far. "If you want to give you Red Hat The Linux 9 system adds a new font, depending on the font subsystem using the new font, you must clarify the steps required.

For the core X-letter subsystem, you must: 1. Create / usr / share / fonts / local / directory (if it does not exist): mkdir / usr / share / fonts / local / "- This step is no problem." If you You must create / usr / share / fonts / local /, you must add it to the path to the X font server: ChkFontPath --Add / usr / share / fonts / local / "- If it is created / usr / Share / fonts / local /, then executing this line command will prompt error Because the system can't find the fonts.dir file in this directory, then not add .. but it doesn't matter, this step is skipped, and it is done after the third step. "2. Copy the new font file to / usr / share / fonts / local /" - "3." 3. Use the following command to update the font information: TTMKFDIR -D / USR / Share / Fonts / Local / -O / USR / Share / Fonts / Local / Fonts.Scale "- Sample. Then: 1) Copy the Fonts.Scale. 2) ChkFontPath --Add / USR / Share / Fonts / Local /" 4. Use the following command to restart the XFS Font Server: Service XFS Reload "- I didn't succeed in this step, because I found that there is no service this command in RedHat 9. So use a stupid solution: Exit X, then startX. These steps are completed. In all GTK 1.2 programs, all the fonts (such as XMMS font settings) come out to our new fonts, like Simsun, Tahoma. You can use it directly in the program. For example, we let the song list Use Simsum, English using Tahoma, you can do this: 1) First in XMMS Fonts to hook option "use fontsets" - Let XMMS support double-bytes of Chinese fonts; 2) Browse the font in the playlist section, choose to use SIMSUM : -misc-simsun-medium-r-normal - * - * - 120 - * - * - C - * - KOI8-R (no copying this, choose SIMSUN it yourself) For English fonts, TAHOMA That's it Come, a little tip: this "-Misc-SIMSUN-MEDIUM-R-NORMAL - * - * - 120- * - * - C - * - KOI8-R" ^ X is cut down, then select the font TAHOMA, this appears: -microsoft-tahoma-medium-r-normal - * - * - 120 - * - * - p - * - Viscii1.1-1 is ok, add a comma in the back, put the same she cut Du Dongdong ^ V Paste behind: -microsoft-tahoma-medium-r-Normal - * - * - 120 - * - * - P - * - VISCII1.1-1, / -MISC-SIMSUN-Medium-R-Normal - * - * - 120 - * - * - C - * - KOI8-R This line, save it, then the song list will use Simsum in Chinese, in English. Let this line to copy the line of main window ( To hook "Use X font"), then the font in the XMMS main window (like the font of the song-rolled song information) is the same as the list of songs. Note that I just said that the inside of the program is Like the list of songs in XMMS, the program itself, the XMMS own window is still a thick and big font, then you need to change the font settings of GTK: 1) Use root account: vi /etc/gtk/gtkrc.zh_cn 2 ) Put the original: fontset = "

-ADOBE-HELVETICA-Medium-r-Normal - 16- * - * - * - * - * - ISO8859-1, / - * - * - Medium-r-NORMAL - 16- * - * - * - * - * - GB2312.1980-0, * - r- * "Modification and we use the font in XMMS above: fontset =" -Microsoft-Tahoma-Medium-r-Normal - * - * - 120 - * - * -P - * - VISCII1.1-1, / -MISC-SIMSUN-MEDIUM-R-NORMAL - * - * - 120 - * - * - C - * - KOI8-R "3) Save exit, turn off XMMS These procedures, then reopen, the effect will come out! Enjoy! Add fonts for Fontconfig font subsystem [Note] The following except "graphical installation font" part is Rehat 9.0 unique, others should also apply, everyone Try. This part is much simple, see RedHat 9 Release Notes: "Add new fonts to the Fontconfig font subsystem is simple and clear; just copy new font to / usr / share / fonts / directory (individual users) You can copy the new font to ~ / .fonts / directory to modify their personal font configuration) After copying the new font, use FC-Cache to update the font information cache: fc-cache (here)

It should be / usr / share / fonts / or ~ / .fonts / directory. ) "- I am calling the font to / .fonts / below. (I don't want to use the root user, hh)" Individual users can also graphically install the font. The method is: Browse fonts: // in Nautilus, then drag and drop the new font file there.

"- This method I failed, no matter where I use ordinary users or root users, I can't copy or" drag and drop "to Nautilus's fonts: /// folder. I don't know why, I have to give up. According to the first When a manner is added, the portion of the font in the GTK 2 can be used freely using new fonts, for example, change the application font to SIMSUM in the control center. (In addition, I found that the size of the SIMSUN effect of the No. 10 size is best. Not using monochrome is also very clear, can be considered) In general, it is too hard to add new fonts for redhat linux. I feel so difficult, especially GTK, I don't think it is like it. 1.2 The font part of the program, do not have to change the so many files that others have said, and actually as long as the font is added, it will be fixed. Let EnLightenment show Chinese equally simple, on the above premise, Find your current e theme, such as mine is in ~ / .enlightenment / themes / aquax / get into this directory, the simplest practice: gedit textclass.cfg uses the Gedit's replacement function, put all the strings of the font, Such as: "- * - Helvetica-bold-r-Normal - * - * - 120 - * - * - * - * - * - *" is all the same as XMMS: -microsoft-tahoma-medium-r-normal - * - * - 120 - * - * - P - * - VISCII1.1-1, / -MISC-SIMSUN-Medium-R-NORMAL - * - * - 120 - * - * - C - * - KOI8-R "Save exit, clear E, RESTART E, get it. Java's Chinese Show 1. JBuilder's Chinese problem vi / etc / profile Add: java_fonts = / path / to / you / zhfonts / export java_fonts, for example, I have to get it. SIMSUM and Tahoma font, because we have put them in: / usr / share / fonts / local, so you can fill in: java_fonts = / usr / share / fonts / local note, JBuilder obviously used Fontconfig fonts Subsystem, so do you recognize what fonts can be These two problems are undoubtedly necessary. Compared with the font folder of the core X-letter subsystem, that is, my ~ / .fonts only font files and one called "Fonts.cache" -1 "file can be compared to understanding. You can make JBuilder open programs display Chinese, but jbuilder itself has a problem, below: Modify JBuilder's own font configuration, such as my JBuilder: ~ / Apps / Devs / JBuilder Then: vi ~ / apps / devs / jbuilder8 / jdk1.4 / jre / lib / font.properties put this like: serif.0 = -b & h -lucidabright-medium-r-normal - * -% D - * - * -P - * - ISO8859-1 Serif.1 = - Standard Symbols L-Medium-R-NORMAL - * -% D - * - * - P - * - URW-FONTSPECICICICIFIF.ITALIC.0 = -b & h -Lucidabright-Medium-I-NORMAL - * -% D - * - * - P - * - ISO8859-1 Serif.italic.1 = - STANDARD SYMBOLS L-Medium-R-NORMAL - * -% D- * - * - p - * - URW-FONTSP ECIFIC is all modified as: serif.0 =

转载请注明原文地址:https://www.9cbs.com/read-105114.html

New Post(0)