Chinese environment: add new fonts for Redhat Linux

zhaozj2021-02-16  60

Chinese environment: add new fonts for Redhat Linux

Publisher admin 2003-05-09 08:25:11 (385 Read) The following includes: 1. Add fonts to the two word bodies systems for Redhat 2. Let EnLightenment show Chinese 3. Java Chinese issues: - JBuilder Chinese problem - J2SDK Chinese issues - J2RE's Chinese problem, everyone picks yourself. Add new fonts to Redhat Linux [Note] The following procedure is tested on Redhat 9.0. Prepare fonts to be installed, such as: simsun.ttc, tahoma.ttf ... According to the issuance of the core X-character subsystem Adding a font with the Fontconfig font: Adding fonts for the core X-Body subsystem [Note] The following sections should also apply the version before RedHat 9.0, because the core X-letter subsystem exists in the version so far. "If you want to give Your Red Hat Linux 9 system adds a new font, depending on the font subsystem using the new font, you must clear the required steps.

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 Pasted behind: -Microsoft-Tahoma-Medium-R-NORMAL - * - * - 120 - * - * - P - * - VISCII1.1-1, -Misc-SIMSUN-Medium-r-Normal- * - * - 120 - * - * - C - * - KOI8-R such a line, save it, so the song list will use Simsum in Chinese, English use Tahoma. Let this line to copy the picture below Main window ( Hook "Uses X Font"), then the font in the XMMS main window (like the font of the song information) is the same as the list of songs. Note that I just said that the interior of the program is like the program. Like the song list of XMMS, the program itself, ie 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/gtkrc.zh_cn 2) : Fontset = "

-ADOBE-HELVETICA-MEDIUM-R-NORMAL - 16 - * - * - * - * - * - ISO8859-1, - * - * - Medium-r-NORMAL - 16 - * - * - * - * - * -GB2312.1980-0, * - r- * "changed to us with fonts in XMMS in XMMS: fontset =" -Microsoft-Tahoma-Medium-r-Normal - * - * - 120 - * - * -P - * - VISCII1.1-1, -MISC-SIMSUN-Medium-R-NORMAL - * - * - 120 - * - * - C - * - KOI8-R "3] Save exit and turn off XMMS these programs After reopening, the effect will come out! Enjoy! Add fonts for Fontconfig font subsystem [Note] In addition to the "Graphical Installation Font" section is rehat 9.0 unique, others should also apply, you try. This part is much simpler, see RedHat 9 Release Notes: "Add new fonts to the Fontconfig font subsystem is relatively simple; just copy the new font to the / usr / share / fonts / directory (individual users can put The new font is copied 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 should be / usr / share / fonts / Or ~ / .fonts / directory.) "- I am trying to copy 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 just add the font body, change /etc/gtkrc.zh_cn to get it. Let EnLightenment show Chinese equally simple, under the top, find you The current e-theme, such as mine is in ~ / .enlightenment / Themes / Aquax / enters 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 cache, 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 make 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 clearly uses the Fontconfig font subsystem, So, let it recognize which fonts can be used, fo These two issues of NTS.Scale and Fonts.dir are undoubtedly necessary. Compared with the font folder of the core X-letter subsystem, that is, my ~ / .fonts only with font file and one called "Fonts.cache-1" "" The file can be compared to understand. You can make JBuilder open programs show Chinese, but jbuilder itself has problems, below: Modify JBuilder's own font configuration, such as my JBuilder is installed in: ~ / apps / devs / jbuilder then: Vi ~ / apps / devs / jbuilder8 / jdk1.4 / jre / lib / font.properties Put this thing: serif.0 = -b & h -lucidabright-medium-r-normal - * -% D - * - * - P - * - ISO8859-1 Serif.1 = - STANDARD SYMBOLS L-Medium-R-Normal - * -% D - * - * - P - * - URW-FONTSPECIFIC Serif.Iff.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 converted to: serif.0 = -microsoft-tahoma-medium-r-normal - * - * - 120 - * - * - p - * - Viscii1.1-1 serif .1 =

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

New Post(0)