This commit is contained in:
gferg 2004-12-27 14:48:08 +00:00
parent b1924aeb53
commit eea53cf0a8
1 changed files with 38 additions and 33 deletions

View File

@ -4,7 +4,7 @@
<articleinfo>
<title>Optimal Use of Fonts on Linux</title>
<copyright><year>2004</year><holder>Avi Alkalay</holder><holder>Donovan Rebbechi</holder><holder>Hal Burgiss</holder></copyright>
<pubdate>2004-12-12</pubdate>
<pubdate>2004-12-24</pubdate>
<authorgroup>
<author>
<firstname>Avi</firstname>
@ -12,10 +12,9 @@
<affiliation>
<address format="linespecific">
<email>avi@unix.sh</email>
<email>avix@br.ibm.com</email>
</address>
<orgdiv>Linux, Open Standards consultant :: Senior IT and Software Architect</orgdiv>
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux">ibm.com/linux</ulink></orgname>
<orgdiv>Linux, Open Standards consultant :: IT and Software Architect</orgdiv>
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux">ibm.com/linux</ulink></orgname>
</affiliation>
</author>
<author>
@ -39,6 +38,12 @@
</authorgroup>
<revhistory>
<revision>
<revnumber>2004-12-24</revnumber>
<date>24 Dec 2004</date>
<authorinitials>avi</authorinitials>
<revremark>Small corrections and DocBook improvements.</revremark>
</revision>
<revision>
<revnumber>2004-12-12</revnumber>
<date>12 Dec 2004</date>
@ -90,13 +95,13 @@
</section>
<section id="notgood"><title>Why Fonts on Linux Aren't Straight Forward ?</title>
<para>Jump to <xref linkend="fix"/> if you just want to fix your desktop look fast. Read this section if you are interested in the details of how and why make it.</para>
<para>Jump to <xref linkend="fix"/> if you just want to fix your desktop fonts fast. Read this section if you are interested in the details on how and why make it.</para>
<para>Fonts are used on the screen and for printing. These medias differ a lot in DPI resolution: screens have 72 to 96 DPI, while modern printers use to have 300 DPI. So low-resolution medias as the screen need better font rendering algorithms to workaround the media's limitations.</para>
<para>To get optimal fonts on the screen you need:</para>
<itemizedlist>
<listitem><para>Good fonts designed for low resolution media. True Type font technology evolved to be the best thing you can get nowadays. But for optimal screen beauty, you also need fonts that were designed for this purpose. We found that <link linkend="msfonts">Tahoma and Verdana</link> are the best fonts you can get for the screen.</para></listitem>
<listitem><para>A good font renderer. Current Linux distributions include the excelent and very mature <ulink url="http://www.freetype.org/">FreeType</ulink> font renderer library.</para></listitem>
</itemizedlist>
<orderedlist>
<listitem><para>Good fonts designed for low resolution media.</para><para>True Type font technology evolved to be the best thing you can get nowadays. But for optimal screen beauty, you also need fonts that were designed for this purpose. We found that <link linkend="msfonts">Tahoma and Verdana</link> are the best fonts you can get for the screen.</para></listitem>
<listitem><para>A good font renderer.</para><para>Current Linux distributions include the excelent and very mature <ulink url="http://www.freetype.org/">FreeType</ulink> font renderer library.</para></listitem>
</orderedlist>
<para>A <filename>.ttf</filename> file contains information to draw the characters at any size, so you eventually can convert a text into a scalable outline drawing (built from line segments and quadratic bezier arcs) with tools like OpenOffice.org or CorelDraw.</para>
@ -108,7 +113,7 @@
<para>With reverse engineering, the Freetype Project has implemented a byte code interpreter, but due to legal issues in some countries, some Linux distributions disable it at compilation and packaging time. This is a list of distributions that are known to enable or disable BCI. Please send us updates.</para>
<table id="ftbcidistros"><title>FreeType Byte code Interpreter Status per Distribution</title>
<table id="ftbcidistros"><title>FreeType Bytecode Interpreter Status per Distribution</title>
<tgroup cols="2">
<thead>
<row>
@ -128,7 +133,7 @@
</tgroup>
</table>
<para>Freetype tries to workaround this legal issues developing autohinting algorithms, but in our tests, BCI algorithms gave us much better font rendering results on the screen.</para>
<para>FreeType tries to workaround this legal issues developing autohinting algorithms, but in our tests, BCI algorithms gave us much better font rendering results on the screen.</para>
</section>
@ -149,7 +154,7 @@
<graphic srccredit="Avi Alkalay, 2004" fileref="msfonts.png"/>
</figure>
<para>As we said before, <emphasis>Tahoma</emphasis> and <emphasis>Verdana</emphasis> were designed for the screen, but they are getting overused for many other purposes.</para>
<para>Our objective here is to provide links where you can get good quality <acronym>RPM</acronym>s, debs, etc for your distribution. These packages are provided by independent contributors, so if you have the skills to build them for your distribution, please <ulink url="mailto:avi at unix DOT sh">contact us</ulink>. WE WILL ACCEPT CONTRIBUTIONS.</para>
<para>Our objective here is to provide links where you can get good quality <acronym>RPM</acronym>s, debs, etc for your distribution. These packages are provided by independent contributors, so if you have the skills to build them for your distribution, please <ulink url="mailto:avi at unix DOT sh">contact us</ulink> and send the URL for your packages. WE WILL ACCEPT CONTRIBUTIONS.</para>
<para>Packages for distributions:</para>
<itemizedlist>
<listitem><para><ulink url="http://avi.alkalay.net/software/msfonts/download/">Red Hat and Fedora RPMs</ulink>. This is the orignal package, and it is reported to work in many other distributions.</para></listitem>
@ -165,20 +170,20 @@
<section id="fix"><title>The Easy Steps to Enlighten Your Desktop</title>
<para>You'll have to:</para>
<itemizedlist>
<orderedlist>
<listitem><para><link linkend="freetype">Update the FreeType library package on you system with one compiled with BCI support</link>.</para></listitem>
<listitem><para>Install the <link linkend="msfonts">Microsoft Fonts package</link>.</para></listitem>
<listitem><para>Follow the instructions bellow on <link linkend="desktop">how to configure your desktop and common applications</link>.</para></listitem>
</itemizedlist>
</orderedlist>
<section id="freetype"><title>Get a Better FreeType <acronym>RPM</acronym></title>
<para>The people involved in this HOWTO modify their original distribution FreeType <acronym>RPM</acronym> to enable bytecode interpreter, and have much better font rendering results.</para>
<para>FreeType compiled with BCI presented much better screen font rendering results.</para>
<para>Get <acronym>RPM</acronym>s for your distribution here:</para>
<itemizedlist>
<listitem><para><ulink url="http://avi.alkalay.net/software/freetype.bci/">Red Hat and Fedora</ulink>.</para></listitem>
<listitem><para>Send us your contribution.</para></listitem>
<listitem><para><ulink url="http://avi.alkalay.net/software/freetype.bci/">Red Hat and Fedora <acronym>RPM</acronym>s</ulink>.</para></listitem>
<listitem><para>Please send us your distribution specific BCI-enabled FreeType package to be included here.</para></listitem>
</itemizedlist>
<para>WE WILL ACCEPT CONTRIBUTIONS of distribution specific FreeType repackaging, so if you can <ulink url="mailto:avi at unix DOT sh">contact us</ulink>, we appreciate.</para>
<para>If you are interested in repackaging your own FreeType, see how we repackage the Fedora Core and Red Hat <acronym>RPM</acronym>s with BCI on the appendix as a reference.</para>
<para>If you are interested in repackaging your own FreeType, see how we repackage the Fedora Core and Red Hat <acronym>RPM</acronym>s with BCI on the <xref linkend="bci"/> as a reference.</para>
</section>
<section id="desktop"><title>Configure Your Desktop</title>
<bridgehead renderas="sect4">General Guidelines</bridgehead>
@ -200,7 +205,7 @@
<graphic srccredit="Avi Alkalay, 2004" fileref="kde.png"/>
</figure>
<para>So we basically choosed <emphasis>Trebuchet 12pt</emphasis> as the window title font, the bitmap font <emphasis>LucidaTypewriter 8pt</emphasis> for fixed size text, and <emphasis>Tahoma 8pt</emphasis> for everything else, which includes menus, buttons, etc. The 2 first should follow your taste, but <emphasis>Tahoma 8pt</emphasis> for all the rest is the optimal configuration, also used by MS Windows 2000 and XP.</para>
<para>One other thing to note is that I disabled anti-aliasing for font sizes up to 9 points. Look at the rest of this dialog how everything is clear and precise.</para>
<para>One other thing to note is that I disabled anti-aliasing for font sizes up to 9 points. Look at the entire dialog and see how all text is clearly rendered, looks clean precise and professional.</para>
<para>Konqueror (KDE's browser and file manager) also needs font configuration for beautiful web browsing and file management. </para>
<figure><title>Konqueror File Management font configuration</title>
<graphic srccredit="Avi Alkalay, 2004" fileref="konqf.png"/>
@ -211,8 +216,8 @@
</figure>
<para>And this is finally for web browsing. We are using <emphasis>Verdana</emphasis> as the general font because it was simply designed for the purpose of fluent text reading on the screen. And the old <emphasis>LucidaTypewriter</emphasis> when a web page requested a fixed size font. Some may choose fonts like <emphasis>Courier</emphasis> or <emphasis>Bistream Vera Mono</emphasis> here.</para>
<para>We left all other fonts blank, to let the page choose it. But you may use <emphasis>Times New Roman</emphasis> as the Serif Font. Read more about serif fonts in <xref linkend="serif"/>.</para>
<para>The sizes of the fonts for browsing are a bit personal and depends on how healthy are your eyes, and the resolution of your screen. In my 1024x768 screen I use default size as 8pt, and I don't want web pages to use sizes smaller than 7pt. In the end of the day, to set the size is not so effective because modern web pages use to set them with absolute values. So it is more practical to use the browsers View menu to "zoom" the page you are currently seeing.</para>
<para>One more thing to note is the Default Encoding. This is a quite complex subject that deserves an entire HOWTO, but it is generally OK to leave it as the Language Encoding. You may need to change it if you frequently browse pages with non pure ASCII (international text) made by irresponsible webmasters that still don't use UTF-8 for the web. But here also it may be more practical to use the View menu to set the encoding for the current page you are browsing.</para>
<para>The sizes of the fonts for browsing are a bit personal and depends on how healthy are your eyes, and the resolution of your screen. In my 1024x768 screen I use default size as 8pt, and I don't want web pages to use sizes smaller than 7pt. In the end of the day, to set the size is not so effective because modern web pages use to set them with absolute values. So it is more practical to use the browsers <guimenu>View</guimenu> menu to "zoom" the page you are currently seeing.</para>
<para>One more thing to note is the <guilabel>Default Encoding</guilabel>. This is a quite complex subject that deserves an entire HOWTO, but it is generally OK to leave it as the Language Encoding. You may need to change it if you frequently browse pages with non pure ASCII (international text) made by irresponsible webmasters that still don't use UTF-8 for the web. But here also it may be more practical to use the <guimenu>View</guimenu> menu to set the encoding for the current page you are browsing.</para>
</section>
<section id="gnome"><title>Gnome</title>
<para>We'll use our generic rules here too: <emphasis>Tahoma 8pt</emphasis> for everything.</para>
@ -221,18 +226,18 @@
</figure>
</section>
<section id="ooo"><title>OpenOffice.org</title>
<para>As of Fedora Core 3 time, OpenOffice.org 1.1.2 has look (but not feel) integration with KDE and Gnome. This means that your environment should say to OOo how to use widget fonts. But we found it didn't really worked. With further investigation we found that only the non-AA configuration we made was not propagated to OOo. So we used OOo's own dialogs to change it.</para>
<figure><title>OpenOffice.org font configuration</title>
<para>As of Fedora Core 3 time, OpenOffice.org 1.1.2 has look (but not feel) integration with KDE and Gnome. This means that your environment should tell OOo how to use widget fonts. But we found it didn't really work. With further investigation we found that only the non-AA configuration we made was not propagated to OOo. So we used OOo's own dialogs to change it.</para>
<figure><title>OpenOffice.org font configuration, using my KDE themes etc.</title>
<graphic srccredit="Avi Alkalay, 2004" fileref="ooo.png"/>
</figure>
<para>So we basically selected Tool->Options menu, and in the View section we enable OOo to do anti-aliasing at font sizes beginning with 12 pixels (approximately 9pt), and the result is what you can see above: clean and comfortable widgets with <emphasis>Tahoma 8pt</emphasis>.</para>
<para>So we basically selected <guimenu>Tool</guimenu>, <guimenuitem>Options</guimenuitem> menu, and in the <guilabel>View</guilabel> section we enable OOo to do anti-aliasing at font sizes beginning with 12 pixels (approximately 9pt), and the result is what you can see above: clean and comfortable widgets with <emphasis>Tahoma 8pt</emphasis>.</para>
</section>
<section id="firefox"><title>Mozilla Firefox</title>
<para>Mozilla Firefox follows the same Konqueror rules.</para>
<figure><title>Firefox fonts for web browsing</title>
<graphic srccredit="Avi Alkalay, 2004" fileref="firefox.png"/>
</figure>
<para>So we Edit->Preferences and then <emphasis>Fonts &#038; Colors</emphasis>, and selected <emphasis>Verdana 14px</emphasis> for general browsing and <emphasis>LucidaTypewriter 11px</emphasis> for monospace text.</para>
<para>So we <guimenu>Edit</guimenu>-><guimenuitem>Preferences</guimenuitem> and then <emphasis><guibutton>Fonts &#038; Colors</guibutton></emphasis>, and selected <emphasis>Verdana 14px</emphasis> for general browsing and <emphasis>LucidaTypewriter 11px</emphasis> for monospace text.</para>
<para>Firefox is a Gnome application, so it will use Gnome's font settings for widgets.</para>
</section>
<!--section id="thunderbird"><title>Mozilla Thunderbird</title>
@ -262,7 +267,7 @@
<para>Yes, we know you had created rich documents, presentations, spreadsheets and web pages that looked great in your computer, but when opened in your friend's machine they looked completely unformated. So lets discuss here some good practices we found to avoid these annoying drawbacks.</para>
<section id="docl2w"><title>Linux to Windows and vice-versa</title>
<para>If you need to exchange documents with Windows users, you should use Windows fonts. This is the general rule. So you should install the <link linkend="msfonts">Microsoft Fonts package</link> and take care to use only <emphasis>Arial</emphasis>, <emphasis>Times New Roman</emphasis>, <emphasis>Verdana</emphasis>, etc, on your docs.</para>
<para>The combination of these fonts with the cross-platform, high quality OpenOffice.org suite, gives you a truly productive teamwork tool.</para>
<para>The combination of these fonts with the cross-platform, high quality <ulink url="http://www.openoffice.org">OpenOffice.org</ulink> suite, gives you a truly productive teamwork tool.</para>
</section>
<section id="docl2l"><title>Linux to Linux</title>
<para>The fonts available on modern Linux distributions, to produce good quality documents are the following:</para>
@ -308,10 +313,10 @@
</tgroup>
</table>
<para>Using these fonts you'll be able to safely exchange and print documents between different modern Linux distributions.</para>
<para>There are other fonts available on your Linux system, but we not listed them here because they are low-quality bitmap fonts, to be used on the screen, and not for documents.</para>
<para>There are other fonts available on your Linux system, but we not listed them here because they are low-quality (obsolete) bitmap fonts, to be used on the screen, and not for documents.</para>
</section>
<section id="doca2a"><title>Any to Any with OpenOffice.org and Bitstream Vera Fonts</title>
<para>The title says it all. OpenOffice.org's all platform packages include the Bitstream Vera Fonts. So if you'll take care to use only these fonts, your documents will open nicely in any other OpenOffice.org installation.</para>
<para>The title says it all. OpenOffice.org's all platform packages include the <link linkend="bitstream">Bitstream Vera package</link>. So if you'll take care to use only these fonts, your documents will open nicely in any other OpenOffice.org installation.</para>
<para>As a side note, OpenOffice.org excels in portability. In any platform, OOo looks and works the same, and it takes special care with your documents layout. It is simply a great tool.</para>
</section>
<section id="docstyle"><title>A Very Small Guide of Style</title>
@ -668,11 +673,11 @@ are called ``glyphs''.</para>
<section id="lucs"><title>Luc's Webpage</title>
<para><ulink url="http://cgm.cs.mcgill.ca/~luc/originalfonts.html">Luc Devroye's webpage</ulink> has links to several sites with free fonts available. What's unique about these fonts is that a lot of them are really free, they are not ``warez fonts''.</para>
</section>
<section><title>Web sites with truetype fonts</title>
<section><title>Web sites with TrueType fonts</title>
<para>There are several web sites offering freely available downloadable fonts. For example, <ulink url="http://www.freewareconnection.com/fonts.html">the freeware connection</ulink> has links to a number of archives.</para>
</section>
<section id="foundries"><title>Foundries</title>
<para>Several foundries sell TrueType fonts. However, most of them are quite expensive, and for the same money, you'd be better of with Type 1 fonts. I'll discuss these more in the Type 1 fonts section. The one place that does do sell truetype fonts at low prices is <ulink url="http://www.buyfonts.com">buyfonts</ulink>. Please read the section on ethics before you buy cheap fonts.</para>
<para>Several foundries sell TrueType fonts. However, most of them are quite expensive, and for the same money, you'd be better of with Type 1 fonts. I'll discuss these more in the Type 1 fonts section. The one place that does do sell TrueType fonts at low prices is <ulink url="http://www.buyfonts.com">buyfonts</ulink>. Please read the section on ethics before you buy cheap fonts.</para>
</section>
</section>
<section id="getfonts.t1"><title>Type 1 Fonts and Metafont</title>
@ -995,11 +1000,11 @@ of this, there are not very many linux applications which support them.
</para>
<para> Red Hat users can rebuild the src.rpm by toggling one setting at the top, and accomplish the same thing (other distributions <acronym>RPM</acronym>s use similar methods):</para>
<para>
<screen format="linespecific">%define without_bytecode_interpreter</screen>
<screen format="linespecific">%define without_bytecode_interpreter 1</screen>
</para>
<para> And change to:</para>
<para>
<screen format="LINESPECIFIC">%define without_bytecode_interpreter</screen>
<screen format="LINESPECIFIC">%define without_bytecode_interpreter 0</screen>
</para>
<para>Other vendors may have a similar, easy-to-use mechanism.</para>
<para>Then rebuild and install the finished binaries. Be sure to restart X as well since the freetype code is already loaded into memory by X.</para>
@ -1023,7 +1028,7 @@ of this, there are not very many linux applications which support them.
<para>This document must be distributed under the terms of <ulink url="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</ulink>. Please translate, adapt, improve, redistrubute using the original XML DocBook source right bellow. Let me know if you want me to put a link to your translation/adaptation/improvement here.</para>
<para>This document is published in the following locations:
<itemizedlist>
<listitem><para><ulink url="http://avi.alkalay.net/linux/docs/font-howto/">Official site</ulink> [<ulink url="http://avi.alkalay.net/linux/docs/font-howto/font-howto-20041212.tar.gz">XML (DocBook) Source</ulink>]</para></listitem>
<listitem><para><ulink url="http://avi.alkalay.net/linux/docs/font-howto/">Official site, with better fonts and layout</ulink> [<ulink url="http://avi.alkalay.net/linux/docs/font-howto/font-howto-20041224.tar.gz">XML (DocBook) Source</ulink>]</para></listitem>
<listitem><para><ulink url="http://en.tldp.org/HOWTO/Font-HOWTO/">TLDP</ulink> [<ulink url="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Font-HOWTO.html">single page</ulink>] [<ulink url="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Font-HOWTO.pdf">PDF</ulink>]</para></listitem>
</itemizedlist>
</para>