https://wiki.archlinux.org/api.php?action=feedcontributions&user=Shemz&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:02:35ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Java_Runtime_Environment_fonts&diff=118335Java Runtime Environment fonts2010-09-29T12:41:14Z<p>Shemz: </p>
<hr />
<div>[[Category:Fonts (English)]] [[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Instructions are given to improve the display of fonts in Java applications when using Sun Microsystem's Java Runtime Environment}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Fonts}}: Information on adding fonts and font recommendations<br />
{{Article summary wiki|Font Configuration}}: Font setup and beautification<br />
{{Article summary wiki|MS Fonts}}: Adding Microsoft fonts and mimicking Windows' font settings<br />
{{Article summary end}}<br />
<br />
Some users may find the default Java fonts or the display mode of fonts in Java applications to be unpleasant. Several methods to improve the font display in the Sun Java Runtime Environment (JRE) are available. These methods may be used separately, but many users will find they achieve better results by combining them.<br />
<br />
TrueType fonts appear to be the best supported format for use with Java.<br />
<br />
==Anti-aliasing==<br />
[http://en.wikipedia.org/wiki/Antialiased_font Anti-aliasing] of fonts is available with Sun Java 1.6 on Linux. To do this on a per user basis, add the following line to the user's {{Filename|~/.bashrc}}.<br />
<br />
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=''setting'''<br />
<br />
{{sn|'''TrueType''' fonts contain a ''g''rid-fitting ''a''nd ''s''can-conversion ''p''rocedure (''GASP'') table with the designer's recommendations for the font's display at different point sizes. Some sizes are recommended to be fully anti-aliased, others are to be hinted, and some are to be displayed as bitmaps. Combinations are sometimes used for certain point sizes.}}<br />
<br />
Replace {{Codeline|''setting''}} with one of the following seven values:<br />
<br />
:*{{Codeline|off}} or {{Codeline|false}} or {{Codeline|default}} – No anti-aliasing<br />
:*{{Codeline|on}} – Full anti-aliasing<br />
:*{{Codeline|gasp}} – Use the font's built-in hinting instructions<br />
:*{{Codeline|lcd}} or {{Codeline|lcd_hrgb}} – Anti-aliasing tuned for many popular LCD monitors<br />
:*{{Codeline|lcd_hbgr}} – Alternative LCD monitor setting<br />
:*{{Codeline|lcd_vrgb}} – Alternative LCD monitor setting<br />
:*{{Codeline|lcd_vbgr}} – Alternative LCD monitor setting<br />
<br />
The {{Codeline|gasp}} and {{Codeline|lcd}} settings work well in many instances.<br />
<br />
Optionally to use GTK look and feel, add the following line to .bashrc instead. Note that the Java options described above and this one only work for applications that draw their GUI in Java, like Jdownloader, and not for applications which utilize Java as backend only, like Openoffice.org and Matlab.<br />
<br />
export _JAVA_OPTIONS='-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' ''<br />
<br />
For the above change to take effect, {{Filename|~/.bashrc}} must be ''sourced'' as the normal user.<br />
$ source ~/.bashrc<br />
<br />
Open a new instance of a Java application to test the changes made.<br />
<br />
==Font selection==<br />
<br />
===TrueType fonts===<br />
Some Java applications may specify use of a particular TrueType font; these applications must be made aware of the directory path to the desired font. TrueType fonts are installed in the directory {{Filename|/usr/share/fonts/TTF}}. Add the following line to {{Filename|~/.bashrc}} to enable these fonts.<br />
export JAVA_FONTS=/usr/share/fonts/TTF<br />
<br />
''Source'' {{Filename|~/.bashrc}} as the normal user for the change to take effect.<br />
$ source ~/.bashrc<br />
<br />
===Default fonts===<br />
The ''Lucida'' fonts distributed with the Sun JRE are the default for Java applications that do not specify a different font's use. The Lucida fonts were designed for low resolution displays and printers; many users will wish to use other fonts. The default Java fonts can be changed on a system-wide basis by the creation or editing of a file named {{Filename|fontconfig.properties}}.<br />
<br />
As root, change directory to {{Filename|/opt/java/jre/lib}}. Copy {{Filename|fontconfig.properties.src}} to {{Filename|fontconfig.properties}}. Then, as root, open the new {{Filename|fontconfig.properties}} in an editor.<br />
# cd /opt/java/jre/lib<br />
# cp fontconfig.properties.src fontconfig.properties<br />
# nano fontconfig.properties<br />
<br />
{{Note|Encodings other than ''Latin-1,'' or ''ISO-8859-1,'' are shown in other {{Filename|fontconfig.properties.*.src}} files in {{Filename|/opt/java/jre/lib}}. Some users will find these files to be better sources to use for editing. In all cases the edited file should be saved as {{Filename|fontconfig.properties}}.}}<br />
<br />
<br />
The Java font names in the configuration file are in the form of {{Codeline|genericFontName.style.subset}}, for example, {{Codeline|serif.plain.latin-1}}. These generic fonts are mapped to the installed fonts using ''X'' ''l''ogical ''f''ont ''d''escription (XLFD) names. The {{Codeline|%d}}, in the example below, is used as a placeholder in the XLFD name for the point size. The Java application replaces {{Codeline|%d}} at runtime.<br />
serif.plain.latin-1=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1<br />
<br />
{{Tip|The utility, ''xfontsel,'' may be used to display fonts and to discover their XLFD names. Xfontsel is part of the {{Package Official|xorg-utils}} package.}}<br />
<br />
<br />
Change the Lucida fonts named in the {{Filename|fontconfig.properties}} file to your selected fonts using the XLFD names. Below is an excerpt of a {{Filename|fontconfig.properties}} file after modifications have been made. The Lucida fonts have been replaced by ''DejaVu'' fonts.<br />
# Version -- a version number is required.<br />
# IMPORTANT -- Do not delete the next line. Ever.<br />
version=1<br />
<br />
# Component Font Mappings<br />
# gen_name.style.subset=<br />
# -fndry-fmly-wght-slant-sWdth-adstyle-pxlsz-ptSz-resx-resy-spc-avgWdth-rgstry-encdng<br />
<br />
serif.plain.latin-1=-misc-dejavu serif-medium-r-normal-*-*-%d-*-*-p-*-iso8859-1<br />
serif.bold.latin-1=-misc-dejavu serif-bold-r-normal-*-*-%d-*-*-p-*-iso8859-1<br />
serif.italic.latin-1=-misc-dejavu serif-medium-o-normal-*-*-%d-*-*-p-*-iso8859-1<br />
<br />
After the changes have been saved to {{Filename|fontconfig.properties}}, the editor may be closed and the user should drop root privileges. Open a new instance of a Java application to test the changes.</div>Shemzhttps://wiki.archlinux.org/index.php?title=Java_Runtime_Environment_fonts&diff=118334Java Runtime Environment fonts2010-09-29T12:39:27Z<p>Shemz: </p>
<hr />
<div>[[Category:Fonts (English)]] [[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Instructions are given to improve the display of fonts in Java applications when using Sun Microsystem's Java Runtime Environment}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Fonts}}: Information on adding fonts and font recommendations<br />
{{Article summary wiki|Font Configuration}}: Font setup and beautification<br />
{{Article summary wiki|MS Fonts}}: Adding Microsoft fonts and mimicking Windows' font settings<br />
{{Article summary end}}<br />
<br />
Some users may find the default Java fonts or the display mode of fonts in Java applications to be unpleasant. Several methods to improve the font display in the Sun Java Runtime Environment (JRE) are available. These methods may be used separately, but many users will find they achieve better results by combining them.<br />
<br />
TrueType fonts appear to be the best supported format for use with Java.<br />
<br />
==Anti-aliasing==<br />
[http://en.wikipedia.org/wiki/Antialiased_font Anti-aliasing] of fonts is available with Sun Java 1.6 on Linux. To do this on a per user basis, add the following line to the user's {{Filename|~/.bashrc}}.<br />
<br />
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=''setting'''<br />
<br />
{{sn|'''TrueType''' fonts contain a ''g''rid-fitting ''a''nd ''s''can-conversion ''p''rocedure (''GASP'') table with the designer's recommendations for the font's display at different point sizes. Some sizes are recommended to be fully anti-aliased, others are to be hinted, and some are to be displayed as bitmaps. Combinations are sometimes used for certain point sizes.}}<br />
<br />
Replace {{Codeline|''setting''}} with one of the following seven values:<br />
<br />
:*{{Codeline|off}} or {{Codeline|false}} or {{Codeline|default}} – No anti-aliasing<br />
:*{{Codeline|on}} – Full anti-aliasing<br />
:*{{Codeline|gasp}} – Use the font's built-in hinting instructions<br />
:*{{Codeline|lcd}} or {{Codeline|lcd_hrgb}} – Anti-aliasing tuned for many popular LCD monitors<br />
:*{{Codeline|lcd_hbgr}} – Alternative LCD monitor setting<br />
:*{{Codeline|lcd_vrgb}} – Alternative LCD monitor setting<br />
:*{{Codeline|lcd_vbgr}} – Alternative LCD monitor setting<br />
<br />
The {{Codeline|gasp}} and {{Codeline|lcd}} settings work well in many instances.<br />
<br />
Optionally to use GTK look and feel, add the following line to .bashrc instead. Note that the Java options described above and this one only work for applications that draw their GUI in Java, like Jdownloader, and not for applications which utilize Java as backend only, like Openoffice.org and Matlab.<br />
<br />
export _JAVA_OPTIONS='-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'''<br />
<br />
For the above change to take effect, {{Filename|~/.bashrc}} must be ''sourced'' as the normal user.<br />
$ source ~/.bashrc<br />
<br />
Open a new instance of a Java application to test the changes made.<br />
<br />
==Font selection==<br />
<br />
===TrueType fonts===<br />
Some Java applications may specify use of a particular TrueType font; these applications must be made aware of the directory path to the desired font. TrueType fonts are installed in the directory {{Filename|/usr/share/fonts/TTF}}. Add the following line to {{Filename|~/.bashrc}} to enable these fonts.<br />
export JAVA_FONTS=/usr/share/fonts/TTF<br />
<br />
''Source'' {{Filename|~/.bashrc}} as the normal user for the change to take effect.<br />
$ source ~/.bashrc<br />
<br />
===Default fonts===<br />
The ''Lucida'' fonts distributed with the Sun JRE are the default for Java applications that do not specify a different font's use. The Lucida fonts were designed for low resolution displays and printers; many users will wish to use other fonts. The default Java fonts can be changed on a system-wide basis by the creation or editing of a file named {{Filename|fontconfig.properties}}.<br />
<br />
As root, change directory to {{Filename|/opt/java/jre/lib}}. Copy {{Filename|fontconfig.properties.src}} to {{Filename|fontconfig.properties}}. Then, as root, open the new {{Filename|fontconfig.properties}} in an editor.<br />
# cd /opt/java/jre/lib<br />
# cp fontconfig.properties.src fontconfig.properties<br />
# nano fontconfig.properties<br />
<br />
{{Note|Encodings other than ''Latin-1,'' or ''ISO-8859-1,'' are shown in other {{Filename|fontconfig.properties.*.src}} files in {{Filename|/opt/java/jre/lib}}. Some users will find these files to be better sources to use for editing. In all cases the edited file should be saved as {{Filename|fontconfig.properties}}.}}<br />
<br />
<br />
The Java font names in the configuration file are in the form of {{Codeline|genericFontName.style.subset}}, for example, {{Codeline|serif.plain.latin-1}}. These generic fonts are mapped to the installed fonts using ''X'' ''l''ogical ''f''ont ''d''escription (XLFD) names. The {{Codeline|%d}}, in the example below, is used as a placeholder in the XLFD name for the point size. The Java application replaces {{Codeline|%d}} at runtime.<br />
serif.plain.latin-1=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1<br />
<br />
{{Tip|The utility, ''xfontsel,'' may be used to display fonts and to discover their XLFD names. Xfontsel is part of the {{Package Official|xorg-utils}} package.}}<br />
<br />
<br />
Change the Lucida fonts named in the {{Filename|fontconfig.properties}} file to your selected fonts using the XLFD names. Below is an excerpt of a {{Filename|fontconfig.properties}} file after modifications have been made. The Lucida fonts have been replaced by ''DejaVu'' fonts.<br />
# Version -- a version number is required.<br />
# IMPORTANT -- Do not delete the next line. Ever.<br />
version=1<br />
<br />
# Component Font Mappings<br />
# gen_name.style.subset=<br />
# -fndry-fmly-wght-slant-sWdth-adstyle-pxlsz-ptSz-resx-resy-spc-avgWdth-rgstry-encdng<br />
<br />
serif.plain.latin-1=-misc-dejavu serif-medium-r-normal-*-*-%d-*-*-p-*-iso8859-1<br />
serif.bold.latin-1=-misc-dejavu serif-bold-r-normal-*-*-%d-*-*-p-*-iso8859-1<br />
serif.italic.latin-1=-misc-dejavu serif-medium-o-normal-*-*-%d-*-*-p-*-iso8859-1<br />
<br />
After the changes have been saved to {{Filename|fontconfig.properties}}, the editor may be closed and the user should drop root privileges. Open a new instance of a Java application to test the changes.</div>Shemzhttps://wiki.archlinux.org/index.php?title=Talk:Pacman&diff=116614Talk:Pacman2010-09-08T14:18:28Z<p>Shemz: /* Troubleshooting: manually reinstall pacman */</p>
<hr />
<div>== Reasoning for Existence of Page ==<br />
We already have --help for a quick description of commands, and the man page for a detailed description.<br />
So what does this wiki page achieve exactly? [[User:Shining|shining]] 16:45, 27 April 2008 (EDT)<br />
<br />
:After last cleanup from toofishes which removed a bunch of flags, and linked to --help and man page instead, I think it is now clearer.<br />
:This page should just be a quick overview of the most frequently used pacman commands, not an exhaustive enumeration of every single flag. [[User:Shining|shining]] 07:50, 12 June 2008 (EDT)<br />
<br />
== Detail missing ==<br />
Can someone please add the details of pacman? There is no explanation of how it works. What are the components and their interaction? And how about related dependencies and libraries? Without that basic flow-chart concept in mind, it is very difficult to understand the roll that third-party additions or frontends might play.<br />
<br />
:This would be very interesting. libfetch, libalpm, etc. [[User:Manolo|manolo]] 15:23, 15 November 2009 (EST)<br />
<br />
== No RTFM or personal opinions ==<br />
Get rid of any comments that direct people to man pages instead of actually explaining things. That is a very lazy way of doing things. At the very least you can summarize, or you can let someone else do it.<br />
<br />
Do not forget that one of the reasons the wiki exists is give the reader something they can understand in simple language. Man pages are the worst example of writing that has ever been written.<br />
<br />
Also, don't make claims about how wonderful a program is; rather state the reasons for the way it was created and let the user be the judge of if it is actually wonderful or not. - [[User:KitchM|KitchM]]<br />
<br />
:We are trying to direct to man pages as much as possible in order to avoid duplicated effort.<br />
:We do the best we can at explaining things in man pages. If people find that things are not clear, we would much prefer to get feedback, rather than people duplicating the documentation on the wiki.<br />
:The people working on pacman and its man pages actually also check this wiki page and maintain it occasionally. We would like to avoid having to fix things in both places systematically.<br />
:I hope that is understandable. We do want to explain things. We should just prefer do that in one centralized place. [[User:Shining|shining]] 12:10, 1 October 2009 (EDT)<br />
<br />
::Thanks, Shining, for your thoughts. I think that centralization has been the intent for many decades, but has never been correctly implemented.<br />
::IMHO, I have found that man pages are written in geek-speak by the programmers who make the software as a quickie way to document themselves to others of their language, and wiki pages are to be written by people whose job it is to communicate with everyone. I am not convinced that there is any duplication of effort in the two, but rather the necessary translation which must be done from one language to another. That is why one should only refer to man pages as an extra reference, but not the main one.<br />
::By the way, one example of problems with man pages is the recent one I ran across for pacman. Man pacman had one little reference to man pacman.conf at the bottom of the text. I had overlooked it for a long time, and only stumbled upon it by accident. Coulda, shoulda, woulda just doesn't have any bearing in this case. Poorly written, poorly formated and poorly cross-referenced is the best to which man pages can attain. There are many non-personal reasons for this, but suffice it to say, that's the way it is. Worse yet, even between the two there were still many important questions left unanswered.<br />
::I maintain that we should fully explain as we go so that mistakes like this do not occur, else the wiki is incomplete. - [[User:KitchM|KitchM]] 11:33, 4 October 2009 (EDT)<br />
<br />
:::You seem very negative and biased against man pages. You didn't even try to have them improved. We would really like to receive more detailed feedback on them before giving up. Please join pacman-dev@archlinux.org to discuss this. That way, more people could also contribute to this discussion. Mails are also a much better way to discuss than a wiki page.<br />
:::Did you try the web version of the man pages ? This seems well formatted and cross-referenced to me : [http://www.archlinux.org/pacman/pacman.8.html pacman.8.html]. [[User:Shining|shining]] 12:22, 5 October 2009 (EDT)<br />
<br />
::::Could it be that the bias is on your part? I plainly wrote that as a person with experience in this area, I recognize the frustration of the billions of people who suffer from the terse and odd language of the traditional man pages. I also wrote that I have always stood ready to assist in any way to translate these things into useful common English and that few take me up on that.<br />
::::I do not think that your erasure of my comments should justify contrary statements on subjects I have already addressed. Why do that?<br />
::::In any case, this is the place to make comment about the problems in the wiki writing found on the referenced page. Please keep that in mind as I point out that man pages should have no place in a wiki setting as a substitute for doing proper wiki writing. I would hope that we can all agree to that, and repair the wiki page in question.<br />
::::(As to the issue of helping with the man pages, as I have twice stated, all you had to do was ask. I will gladly meet you there.) [[User:KitchM|KitchM]] 14:35, 5 October 2009 (EDT)<br />
<br />
::::: shining wrote: We would really like to receive more detailed feedback on them before giving up. Please join pacman-dev@archlinux.org to discuss this.<br />
<br />
:::::: KitchM wrote: all you had to do was ask. I will gladly meet you there.<br />
<br />
::::::: Seems we are going around in circles... [[User:Allan|Allan]]<br />
<br />
::::::::I don't think that is completely accurate. Sure, I was forced to restate some points, but we got thru it. And the good thing was that I got asked to help. (Which I did, by the way.) So that's real progress. And very cool. I hope my suggestions got to the right parties and were appreciated. [[User:KitchM|KitchM]] 19:53, 6 October 2009 (EDT)<br />
<br />
==Official name?==<br />
~Also, what is pacman's official name? i.e., pacman or Pacman?[[User:Manolo|manolo]] 00:42, 13 November 2009 (EST)<br />
<br />
:It appears as "pacman" on both [http://www.archlinux.org/pacman/pacman.8.html the man page] and [http://www.archlinux.org/pacman/ the home page]. -- [[User:Pointone|pointone]] 12:35, 13 November 2009 (EST)<br />
<br />
==New merge==<br />
I think the new article merged by pointone is perfect, but I predict some people are going to think it's too verbose :) [[User:Manolo|manolo]] 13:32, 16 November 2009 (EST)<br />
<br />
I just had a look at the merge, I find it perfectly fine. I think that giving this information to users is very important.<br />
I am still a big wiki noob, but I used to be pissed off many times by stupid edit of wiki pages, adding useless or wrong information. I have to say I am impressed by all the amazing work done by manolo and pointone so far on various wiki pages, both in contents and style. Please keep up the good work :) --[[User:Shining|shining]] 18:19, 16 November 2009 (EST)<br />
<br />
== Pacman refuses to delete corrupted package, because it is corrupted... ==<br />
<br />
I had this issue today with two packages (icu-4.4-2-x86_64.pkg.tar.xz and ttf-bitstream-vera-1.10-7-any.pkg.tar.xz). Got asked "<X> is corrupted. Do you want to delete it? [Y/n]" and then told "failed to commit transaction - <x> is invalid or corrupted". Some nice person should add in "Troubleshooting" that in this case one can delete said package manually as root in /var/cache/pacman/pkg. -- [[User:Misc|Misc]] 20:17, 17 April 2010 (EDT)<br />
<br />
:I'm glad someone asked this. And thanks for the pointer. One of the most annoying things that I've found users have ever had to deal with in the last couple decades has been this sort of problem with automated package management methods, regardless of the OS used. I have noticed, however, that the download process usually weeds out the corrupted downloads before committing them to the install process. It might be that dumping a bad package might be something that is automated by the pacman routine in a better manner than it does now, but downloading again, and overwriting the bad one, should fix the problem without further effort. - [[User:KitchM|KitchM]] 23:01, 18 April 2010 (EDT)<br />
<br />
== proposed addition to package cache cleaning... ==<br />
<br />
''Comment: I think people will find value if the following was added to the page. Might be good to insert it between the pacman -Sc and pacman -Scc descriptions. What do others think?''<br />
<br />
<br />
<br />
Alternatively, the [[http://aur.archlinux.org/packages.php?ID=37572 CacheClean]] python script can be used to manage one's pacman cache. Functionally, the script acts like the "pacman -Sc" command with a key difference: the user can select how many old versions (generations) of his/her packages to keep. For example, the following command will keep two versions of the cached packages, deleting everything else in the /var/cache/pacman/pkg directory.<br />
<br />
# cacheclean.py 2<br />
<br />
- [[User:graysky|graysky]] 16:18, 28 May 2010 (EDT)<br />
<br />
:Disagree; I think we should keep these kinds of ''unsupported'' tools, etc. in [[pacman Tips]]. -- [[User:Pointone|pointone]] 18:07, 2 September 2010 (EDT)<br />
<br />
== Changes with pacman 3.4 ==<br />
In the Installing and/or Upgrading sections, we could mention the new possibility of: pacman -Syu <package><br />
[[User:D garbage|D garbage]] 06:26, 27 June 2010 (EDT)<br />
<br />
== Troubleshooting: manually reinstall pacman ==<br />
<br />
There is a great sticky in the forums explaining how to [https://bbs.archlinux.org/viewtopic.php?id=95007 manually reinstall pacman].<br />
We could add something along these lines to the Troubleshooting section (sorry, I'm not good at this - but as a start):<br />
<br />
{{FAQ<br />
|question=Pacman ended up broken! How do I reinstall it?<br />
|answer=In case pacman is broken beyond repair, you can get the necessary packages (openssl,libarchive,libfetch and pacman) and manually untar them to root. This will result in a working pacman binary. Make sure to then reinstall these packages with pacman to maintain package database integrity. There is an example script in this [https://bbs.archlinux.org/viewtopic.php?id=95007 forum post] you can take as starting point to automate the process.}}<br />
{{FAQ<br />
|question=Or another similar situation, removed pacman by mistake, how to reinstall it?<br />
|answer=An easy way is to boot from a live cd (I used live usb for this), and update pacman database (only required for netinstall images). Mount the original partition where you want to install pacman using mount utility, and install pacman with -r switch giving the location of the new root.<br />
}}<br />
<br />
:Added (slightly modified). Thanks! -- [[User:Pointone|pointone]] 21:47, 27 July 2010 (EDT)<br />
<br />
== Outdated Mirrors ==<br />
<br />
Recently, some people had problems with mirrors that went completely out of sync due the new tier1/2-scheme. maybe we could add a sentence & link to the related troubleshooting section:<br />
<br />
"pacman mirrors are not synced immediately. It may take over 24 hours before an update is available to you. The only options are be patient or use another mirror. ''If you have not received any updates for a long time, check [https://www.archlinux.de/?page=MirrorStatus MirrorStatus] for a properly syncing mirror.''"<br />
<br />
[[User:Hokasch|Hokasch]] 06:48, 2 September 2010 (EDT)<br />
<br />
:Implemented (simplified). -- [[User:Pointone|pointone]] 18:04, 2 September 2010 (EDT)</div>Shemz