Previous Document Index
Updated 22:01:2003
Notes on Running Scribus 0.8+ under Red Hat 8.0
As the documenter for Scribus, we have received a few questions from users who have had some minor issues with Scribus running with Red Hat 8.0. Thus, I have put together some hints and comments to ensure Scribus runs as well as possible with RH 8.0. This is a bit long, hopefully will help end-users have a sense of not only how, but why things are as they exist currently. Users of Mandrake 9.0 and 9.1 beta may find this useful as well.
Overall, Scribus runs great with the RH 8.0. I have been a long time Red Hat/ KDE user since Scribus 0.3.7 or so. While Red Hat is a Gnome oriented distro and their KDE packages have occassionally been less than optimal, I appreciate the following:
- Well tested and configured kernels and other internals. Testing other distros, I have found many times a Red Hat package would work, where it would crash or have problems on other distros. Moreover, for my clients who run Linux servers, it is an outstanding package. Very reliable, excellent QA, superior docs and excellent support for security issues. I am in the midst of installing RH 7.3 and Samba on IBM x-Servers professionally and this combo is a dream to configure. Moreover, I honestly know is the best solution for my client.
- A principled stance regarding Open Source applications and making not only the source, but downloadable ISO's available. Redhat has caught a lot criticism about not including package A or B or not adding closed source drivers, but they have honored their stated principals and you have to respect that.
- They have contributed a lot to the open source community: cygwin, rpm, code and lots of developer time to libc, gcc and binutils to name a few.
- They pay kernel hacker Alan Cox's salary.
That said, their release of 8.0 has generated a lot of discussion and controversy, as it is their own first attempt at a "user-friendly" Linux Desktop. Overall, I think they have succeeded. I would quibble with some of their choices, but I can see a sincere, serious effort to move forward. Minor grumbles in order of aggravation: a buggy version of RPM, no kpackage, removal of other KDE features, no easy to use setup for Samba for first time Linux users - third party solutions do exist.
Where it concerns Scribus, most of the problems relate to a completely revised set of libraries and configuration for fonts in XFree86, which has always been a weakness for Linux - probably one of the toughest to solve. More below.
Despite all the controversy with merging the KDE and Gnome themes, the new Bluecurve theme is very useable for the intended audience. This is just the default and you can install Keramik among others.
The good stuff in RH 8.0 which is great for Scribus:
- GCC-3.2 This is a revised C++ GNU compiler. This is responsible for sometimes 20-40% improvement in Scribus performance, especially with handling large image files. The improved code also has made Scribus even more stable.
- Ghostscript 7.05 and the latest CUPS 1.17 with GIMP print drivers right out of the box. Thus, there is a Level 3 postscript interpreter and CMYK printing support standard. This system also generates much better PDF's. This is a big improvement from Ghostscript 6.x and the older Lprng spooler in RH 7.x. I had so many problems with the old style LPRng and printing-gui in 7.x, I almost dropped using RH for a desktop. No matter how carefully I set things up and cursed as fluently in as many languages as I know, printing was hit or miss.
- The other new goody in RH 8.0 is the new scheduler which makes the desktop applications run much snappier.
- The KDE printer setup with CUPS is actually easier than Windows 2000 for setting up a postscript printer. Exactly, ninety seconds after opening the Kprinter control panel, I had a test print spooling out of the printer. CUPS will be the default in RH 8.1 - finally.
Recommendations:
- Make sure the correct kernel and corresponding libc is installed for Athlon cpus. I have seen in 7.3 and RH 8.0 where a i686 kernel is sometimes installed initially instead of the Athlon kernel. I think this is the default, but you can, after installation, install the athlon kernel and libc.
Set the corresponding
CXXFLAGS=-march=""
correctly, when compiling Scribus. Examples -march= could be: athlon, athlon-xp, PIII or PIV.You set this by doing the following before running the configure script:
export CXXFLAGS="-march=athlon"
Look inman gcc
for the details. There are several different options just for AMD chips. More than most applications, Scribus, by its nature takes advantage of the new compiler advances, especially in handling floating point math.- Scribus does not yet handle Unicode or UTF-8 locales, which is the default in 8.0. Before running Scribus,
export LANG=""
to your locale in the console. Otherwise, Scribus cannot read the installed fonts properly. (Acrobat Reader 5.0.5/5.0.6 has a similar issue.)- There is a small bug with menus not displaying the actual font faces properly. The fonts will display on the canvas and print properly, they just do not show all the variations in the menus. There is a patch which you can apply to 0.8 (this has been added to all the 0.9.x-devel releases).
Font Handling in Red Hat 8.0
The new fontconfig or what XFT2 means for end users - a brief explanation.
Within Redhat 8.0 is a completely new method of handling fonts, which will become standard in Xfree86 4.3; Keith Packard's fontconfig libraries, aka Xft2. They are a set of extensions to Xfree86 to enable a vastly simpler way of handling installation, user selection and much needed simplification to handling Unicode fonts for Japanese, Chinese and right to left languages. Lastly, fontconfig also works with the freetype libraries to render them with the best screen quality possible - via anti-aliasing, auto-hinting and other tricks, This is a major work and improvement for Xfree86. Everyone in the open source community should be very thankful for this work.
The difficulty is the programming interface is somewhat different from the Xft1 setup. For developers this may require a substantial amount recoding to take advantage of Xft2. For an application like Scribus, this is doubly difficult, as Scribus, has lots of code to really, really, really discover what fonts are installed, as well as know their true postscript names.(Even True Type fonts have a postscript name embedded.) Unlike other programs that just want a serifed font like Times, Scribus needs to distinguish between Times and Times New Roman, as well as know the weight variations like bold, italic, demi and roman faces.
To add to the difficulty, by its design, Xft2 uses a parsing method which can produce substitutions when a application requests a font. The new system works well, but for designers, they need 100% certainty they get the exact fonts they selected. Lastly, the defaults Red Hat has used to draw the fonts on screen is defaulted to make the currently available fonts in Xfree86 look good when anti-aliased, sometimes to the detriment of end-user added fonts. Among the major applications or libraries which fully support Xft2 is Gnome 2.x+, special builds of Mozilla and the Red Hat packaging of KDE. Others like Open Office will require substantial recoding to support Xft2.
How it is supposed to work:
The mechanism is quite simple. Create a directory at the root of your home directory called .fonts. Drop your favorite (typically) True Type fonts and magically fontconfig will pick up in a short while that you have added new fonts and make them available to applications. This is configured by a file in /etc/fonts/ fonts.conf. This file which is written in XML, is well commented and shows the substitution pattern defaults.Until, more end-user docs are written I would resist the temptation to tweak.
The Luxi Fonts
Redhat has chosen (wisely) to use the Luxi fonts as default with anti-aliasing enabled. The Luxi fonts were contributed to Xfree by Bigelow and Holmes - and they are an example of what Xfree86 lacks - a wide selection of well designed fonts with good Unicode coverage of not just Western European glyphs or characters. Most of the other fonts which are in Xfree86 have come from various sources over the years. For example, the URW fonts included with Ghostscript are not the most optimal screen fonts, but typically are excellent printer fonts. Bookman for example is a very readable text font. Some good news: see this recent story on Slashdot - Bitsream to donate fonts
Options?
So, after all that under the hood stuff, where do go from here or why the fonts (sometimes) do not look good in Scribus? After reviewing all the docs I could find, including some of the source code of RedHat patches etc, I have tested a number of different approaches trying to optimize Scribus and Redhat: adjusting and testing Xft2 config files, adjusting font paths, disabling freetype completely, adjusting the old Xf86config file etc. It comes down to two choices, which you, the user, will have to decide based on your own preferences.
Choice One: Do nothing. Keep the default Xft2 setup as is. This does improve the overall look of Scribus and fonts display well at 100% on the canvas. The downside is text redraws are *much* slower and viewing a text at any other resolution than 100% is not going to look attractive. The biggest challenge is problems with font substutions, caused by conflicts in the font discovery mechanism Scribus uses and the substitutions made by Xft2. This is not a "bug", per-se, but will be sorted out in time, as we learn the nuances of Xft2 and as Xft2 gets refined. On the other hand, I do not see any stabilty issues or crashes with Xft2 in either KDE or Scribus - nor with the other DTP apps I use regularly.
Choice Two: Set KDE and QT applications back to the Xft1 style configuration.
This requires a bit of tweaking a la RH 7.3, so Xfree86 is setup in order that fonts are not anti-aliased and are the first available fonts in Xfree86 search path. Disclaimer: As a personal preference, I do not like anti-aliasing screen fonts for three reasons and have not since they were available with Adobe Type Manager on Windows 3.0: 1) There is a substantial performance hit. 2) I find them difficult to read after a time - and as you can guess I spend a lot of time in front of a computer. 3) Good screen fonts (ideally) should not need to be anti-aliased to look good. A good start is to download the MS webfonts,as they are known. This is a group of well designed and tested fonts,which have special hinting and sometimes embedded bitmaps, so they display well at all sizes. Moreover, when they are embedded in PDF's, you have a reasonably good chance they will display well on other platforms, as they are almost always on a Win32 workstation and a good number of Macs. One of the issues with PDF's created in *nix applications like Latex is when they are opened on Win32 or a Mac, typically Adobe Acrobat Reader will do some sort of aliasing with the Multi-Master fonts and the text renders poorly. That is one reason is why Scribus created PDF's look good anywhere - when you embed the fonts. This prevents Acro Reader from making - sometimes - poor substituions.
Here is the steps I took:
- Get the webfonts from http://corefonts.sourceforge.net/ BUT put the fonts in /usr/share/fonts/default/TTF. I like to keep my fonts paths as simple as possible.
- Follow the advice from http://www.graemepyle.com/linuxfonts.html
- Important make sure the font names are in lower case.
- After the fonts are installed, as root, create a fonts.scale file, cd into the directory and issue the command:
ttmkfdir -o fonts.scalefor a directory of TrueType fonts or for Type 1 fonts create the fonts.scale file using:mkfontscale- Then: as root:
fc-cache --force --verboseThis will create new a fonts.dir and update the font cache. This replaces the mkfontdir command in Xfree 4.2- Disable anti-aliasing in KDE/QT from the console:
$ qtconfigand disable anti-aliasing in the fonts tab. This will disable this for both Scribus and KDE.- Edit (as root) /etc/X11/fs/config so that /usr/share/fonts/default/TTF is the first directory as per below:
# where to look for fonts # catalogue = /usr/share/fonts/default/TTF, /usr/share/fonts/default/Type1, /usr/lib/openoffice/share/fonts/truetype, /usr/X11R6/lib/X11/fonts/misc:unscaled, /usr/X11R6/lib/X11/fonts/75dpi:unscaled, /usr/X11R6/lib/X11/fonts/100dpi:unscaled, /usr/X11R6/lib/X11/fonts/misc, /usr/X11R6/lib/X11/fonts/TTF, /usr/X11R6/lib/X11/fonts/Type1, /usr/X11R6/lib/X11/fonts/Speedo, /usr/X11R6/lib/X11/fonts/cyrillic,- Open
\usr\bin\startkdein kedit (as root) or your favorite text editor. startkde is not a program, but a long script which launches KDE. Scroll down to about line 160, where you see the lines and comment out with the # sign about KDE adding fonts and resetting the font paths, as well as the font path Ghostscript uses for loading fonts. With the new fontconfig system, this is unnecessary, as QT 3.0.5 in RH 8.0 supports fontconfig. There are a few programs which not only load their own font paths, but reset the font path every time they load. KDE, Star Office, Open Office and Abiword come to mind.- Reboot (simple) or as root:
/sbin/service xfs reloadand restart KDE.You now will have good sharp screen fonts enabled (which also print well) and KDE will see them without having to KDE mess with the font path. By setting good defaults for the font path, the old style Xft1 system, for which Scribus has been optimzed will always have a selection of good, readable screen fonts. They are in my experience, the best displaying fonts in Scribus. Plus, you avoid unintended font substitutions from Xft2, which can cause problems for Scribus.
Taking these steps has: 1) Speeded up redraws 2) Avoided font path "merry-go-round" 3) Ensured that my preferred fonts are always available to all applications. 4) Improved the rendering of text within Scribus.
Lastly, avoid shareware or free fonts on the web. Some, but not all of these are not well engineered inside and can have problems printing or displaying at all sizes. It is really difficult to create reliable high quality fonts. Reportedly, the designer who was commissioned by MS to design Verdana took almost one year for one font..
Relevant pages for more info on fonts and Scribus: Optimizing Linux for DTP and Linux DTP Links and the fontconfig home page: http://fontconfig.org
References: The draft version of Xfree86 4.3 documentation at http://www.pps.jussieu.fr/~jch/software/fonts-doc/fonts.html
More hints to come soon
Added 22:01:2003
Back Top