Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Looking at your screenshots, and putting together your previous comments, you are already getting the maximum performance out of Freetype with Bitstream Vera Sans.
The shape and hinting of your fonts matches what I'm running.
Your term window is not affected because it uses a bitmap font - each character has a fixed bitmap that does not change. Whilst this is nice for small fonts, it doesn't scale well at all. [1]
On the other hand, Type 1 and TrueType fonts are 'scalable outline fonts'. At small sizes, you don't need the hinting - the font size used for the panel/bar and the window title on your screen. Once the size of the font starts to get cranked up (or, on my end, if I try to view them with a larger monitor), as you saw from disabling anti aliasing, the shape doesn't look right - sub pixel hinting is needed to correct this [2] (under Linux though, it seems anti aliasing has to be enabled for this to work properly)
There is an alternative approach that may be more to your liking though.
1. Recompile Freetype with the bytecode interpreter enabled (disabled in most builds, including Slackware's, due to patent problems. Check the Freetype README for how to do this), then disable the autohinter by this:
2. If you have a Window$ license, try the Tahoma font (it is not part of the Microsoft 'Core fonts for the web' as it ships with Internet Explorer), or if not use the Arial font (part of the M$ 'Core fonts for the web', therefore available for download) as your default font. To do this:
That approach though only works with Tahoma, Arial et al of the M$ fonts. You'l also need to redefine the default monospace font, possible the default serif font as well, and make sure that Firefox is pointing to the correct font name.
Using the bytecode interpreter, I also can't make KDE + GTk applications play nice with each other - KDE demands antialiasing, but GTk apps don't look right with it. Using the autohinter gets round this, but the fonts aren't quite as 'thin' in GTk programs as with the bytecode interpreter.
Bitstream Vera Sans looks horrid with it, but it is probably what you're after.
Thanks for all that good information. I am going to start
working that out today. Just as an update, when I took
that screenshot I was using the following fonts in Firefox:
Code:
Proportional: Serif Size (pixels) 16
Serif: Times New Roman
Sans-serif: Arial
Monospace: Courier New Size (pixels) 13
Display resolution: 96 dpi Minimim font size: none
All M$ fonts...but they don't really display any better than
the Bitstream fonts.
Of all the previous reading I've done about this issue,
your suggestion of "Recompile Freetype with the bytecode
interpreter enabled" is the one thing that I've not done,
that I believe I should try.
It does make a difference. Although the M$ fonts are a start, without the bytecode interpreter in use, they won't be rendered in the same way as you would expect in Windows, which appears to be the style you're after.
For some reason, it is not a separate package in Slackware, but rather included in the X11-6.8.x-i486-x.tgz package. You can happily install Freetype straight over the existing files in Slackware though.
To enable the bytecode interpreter, grab the Freetype sources, unzip them somewhere, and then open up <path_to_freetype_source>/include/freetype/config/ftoption.h
then ./configure;make;make install/checkinstall as normal.
Also, note that your default sans-serif font is still Bitstream on your system, as that's what's being used for your menus in Firefox (that can be changed with the code I gave below in part 2, or if you have it installed, running gnome-settings)
And under Gtk based applications, they look better with antialiasing disabled if you're using the bytecode interpreter.
Bytecode Interpreter + M$ Fonts - Antialiasing should give you what you're after.
I just d/led freetype-2.1.9.tar.bz2 and I'm going
to start compiling now. Can you also tell me what
are Gtk or KDE based applications? Or just tell me
how I can determine which ones are...
configure: creating ./config.status
config.status: creating unix-cc.mk
config.status: creating unix-def.mk
config.status: creating freetype-config
config.status: creating freetype2.pc
config.status: creating ftconfig.h
FreeType build system -- automatic system detection
The following settings are used:
platform unix
compiler cc
configuration directory ./builds/unix
configuration rules ./builds/unix/unix.mk
If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.
Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).
make: Nothing to be done for `unix'.
mingdao@james:~/downloads/freetype-2.1.9$
Can you also tell me what are Gtk or KDE based applications?
KDE (qt toolkit) applications mostly tend to follow the exciting convention of naming their programs with a k at the front. Non KDE qt programs should specify that they use qt somewhere.
However, most non KDE programs are written using the Gtk toolkit - Mozilla's, etc (I believe fluxbox is also a Gtk built program). In terms of appearances, they may look similar, but won't be the same (qt and Gtk programs won't be using the same things, the menus look different, etc. Little things like that for appearance.) Normally the project web page for the application will tell you what it's built against.
Quote:
You think I'm okay here?
As long as you edited the source code before you ran ./configure, then that's fine. Compile (make) and install (make install/checkinstall) away.
Okay, I guess this is where the tweaking begins...
I changed everything according to your post #33
with the fonts I have in post #34 - and that looked
worse than ever.
I had to go back and enable antialiasing in .fonts.conf
because they definitely are a wash without that.
So I changed the fonts to
Serif
Garamond
Arial
Courier New
and that looks better, except for the menus on Firefox.
And Thunderbird is a total mess - but I'll change some
fonts on there.
Any suggestions as I tweak tonight?
Last edited by Bruce Hill; 02-15-2005 at 07:28 AM..
Originally posted by Chinaman when I took
that screenshot I was using the following fonts in Firefox:
Code:
Proportional: Serif Size (pixels) 16
Serif: Times New Roman
Sans-serif: Arial
Monospace: Courier New Size (pixels) 13
Display resolution: 96 dpi Minimim font size: none
All M$ fonts...but they don't really display any better than
the Bitstream fonts.
the fonts in the screenshot are not arial. they look like bitstream vera sans, and a poorly rendered helvetica in the menus (i was getting that same thing, with the lowercase L in the gimp "File" menu taller than the F, etc.). are you sure X is reading all of your font directories? check your /var/log/Xorg.log, especially looking out for messsages that say something like: "could not init font path element <directory>, removing from list."
The fonts specified in the Firefox/Thunderbird preferences only control the fonts it displays on the pages, not the fonts it uses for the menus.
Use gnome-config to change the default font to Arial for Gtk programs (and make sure there is an entry in .fonts.conf forcing the default sans-serif font to be Arial/Tahoma).
To get what you want, make sure you have:
1. Autohinter off
2. Bytecode interpreter on (just turning off the autohinter does this as long as it's compiled into Freetype properly)
3. Change default sans-serif to Arial/Tahoma in .fonts.conf
4. Use gnome-config to change default Gtk fonts to Arial/Tahoma
5. Disable antialiasing (if the above steps are all done, then you should happily be able to turn this off.)
You will still need the subpixel hinting, so your .fonts.conf should look like:
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Don't need subpixel ordering -->
<match target="font" >
<edit mode="assign" name="rgba" >
<const>false</const>
</edit>
</match>
<!-- Subpixel hinting is still needed -->
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintfull</const>
</edit>
</match>
<!-- Antialias off, shouldn't need this -->
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>false</bool>
</edit>
</match>
<!-- Autohinter off, bytecode interpreter will run automatically instead -->
<match target="pattern" >
<edit mode="assign" name="autohint" >
<bool>false</bool>
</edit>
</match>
<!-- Set default sans-serif font to Arial -->
<match target="pattern" name="family" >
<test name="family" qual="any" >
<string>sans-serif</string>
</test>
<edit mode="assign" name="family" >
<string>Arial</string>
</edit>
</match>
<!-- Helvetica should not be used (nicety, not absolutely necessary) -->
<match target="pattern" name="family" >
<test name="family" qual="any" >
<string>Helvetica</string>
</test>
<edit mode="assign" name="family" >
<string>sans-serif</string>
</edit>
</match>
<dir>~/.fonts</dir>
</fontconfig>
Thanks for hanging in there. I believe that Linux can display fonts as
well as Windoze on my LCD, it's just that I need help getting it done...
Code:
mingdao@james:~$ cat /var/log/Xorg.0.log |grep font
(**) FontPath set to "/usr/X11R6/lib/fonts/TTF/,/usr/X11R6/lib/X11/fonts/local/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/CID/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/cyrillic/"
(II) Loading /usr/X11R6/lib/modules/fonts/libbitmap.a
(II) Loading font Bitmap
(II) Loading /usr/X11R6/lib/modules/fonts/libtype1.a
(II) Loading font Type1
(II) Loading font CID
(II) Loading /usr/X11R6/lib/modules/fonts/libfreetype.so
(II) Loading font FreeType
(II) Loading /usr/X11R6/lib/modules/fonts/libspeedo.a
(II) Loading font Speedo
(II) Initializing built-in extension XFree86-Bigfont
Could not init font path element /usr/X11R6/lib/X11/fonts/local/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
No, the FreeType module handles the TrueType fonts (I have the other font modules disabled. X normally complains about them here, and besides, they're anachronisms, FreeType replaces all of them - but that's a subject for another day.)
Don't worry about Helvetica. You don't need it, that bit is just there for some websites that use it, and it looks horrible on an LCD - that part of the code just forces it to replace Helvetica with the default sans-serif font. As I said, it isn't necessary.
Did you have any luck editing the Freetype code, compiling and then installing it?
Originally posted by cathectic Did you have any luck editing the Freetype code, compiling and then installing it?
Yes. I was trying to complete all your instructions before replying.
I have recompiled freetype as you noted.
I have replaced .fonts.conf with yours from
the post above.
I have changed my Firefox fonts to
Sans-serif
Garamond
Arial
Courier
But I cannot figure out how to do this
gnome-config step...
And I'll take a screenshot and post it, so
you can see it.
You guys don't know how much I appreciate
all this help. I'd given up on this LCD looking
good like in the darkside, and just decided
that next computer I built for someone who
doesn't want to use Linux would get this LCD
monitor, and I'd buy a 19" CRT...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.