(Transfer) Add new font to Redhat Linux

zhaozj2021-02-16  85

/ ************************************************** ************************* * File: $ home / projects / linuxp / howto_zhfontsconfig * Title: Add new font for Redhat Linux * Author: cure * Date: 03-04-19 16:00 * ------------------------------- ------------------------------------------ DESCRIPTION: * Record how to redhat Linux itself and JBuider, J2SDK, J2SE add Chinese * support. * ------------------------------------ ------------------------------------- * Change logs: * 03-04-19 18:15 CURE Add JRE Section. * 03-04-19 19:08 Cure JRE Size Changes to Java Sections, Talk about JBuilder, J2SDK, * J2RE Chinese issues. * ************** *********************************************************** ********** / Toss a day, I originally intended to go to the book later, I accidentally wrote so long, so I decided to share it with you, if you find any mistakes Please point out, I am grateful! In addition, if you think this thing is worth sharing with your friends, then keep the above file header when forwarding, is a small support for me a day! Pretty look The operating system is never our purpose. I hope this text can help at least one of two friends from this Linux's Chinese beautification problem, and truly investment in the use of Linux to serve us, using Linux to develop work Among the things. The following includes: 1. Adding fonts for Redhat 2. Let EnLightenment show Chinese 3. Java Chinese issues: - JBuilder Chinese problem - J2SDK Chinese problem - J2RE Chinese problem, you need to see 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 ... In the release of the core X-letter subsystem, the core X-letter subsystem and the FontConfig font subsystem, add fonts to the core X-letter subsystem [Note] The following sections should also apply the version before RedHat 9.0, because the core X-letter subsystem Existed in the version so far. "If you want to add new fonts to your Red Hat Linux 9 system, you must clear the steps required according to the font subsystem using the new font.

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 New fonts Copy to ~ / .fonts / directory to modify their personal font configurations After copying new fonts, use fc-cache to update font information cache: FC-Cache (here should be / USR / share / fonts / or ~ / .fonts / directory.) "- I am calling the font to / .fonts / below. (Do not want to use root users, 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-11746.html

New Post(0)