LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Thread Tools
Old 02-14-2005, 10:08 AM   #31
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50

[Log in to get rid of this advertisement]
Okay, got a screenshot, let me try to find someplace to put it...
Bruce Hill is offline     Reply With Quote
Old 02-14-2005, 10:13 AM   #32
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
https://www.cotse.net/users/servants...screenshot.jpg
Bruce Hill is offline     Reply With Quote
Old 02-14-2005, 02:51 PM   #33
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64 -current
Posts: 750
Thanked: 1
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:
Code:
 <match target="pattern" >
  <edit mode="assign" name="autohint" >
   <bool>false</bool>
  </edit>
 </match>
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:
Code:
<match target="pattern" name="family" >
  <test name="family" qual="any" >
   <string>sans-serif</string>
  </test>
  <edit mode="assign" name="family" >
   <string>Tahoma</string>
  </edit>
 </match>
<alias>
3. Experiment with disabling antialiasing to see if you like it better without antialiasing:
Code:
<match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
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.

[1] http://www.tldp.org/HOWTO/Font-HOWTO/fontech.html
[2] http://grc.com/ctwhat.htm

Last edited by cathectic; 02-14-2005 at 04:26 PM..
cathectic is offline     Reply With Quote
Old 02-15-2005, 04:31 AM   #34
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
Carlos,

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.
Bruce Hill is offline     Reply With Quote
Old 02-15-2005, 06:35 AM   #35
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64 -current
Posts: 750
Thanked: 1
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.

Freetype is available from here: http://www.freetype.org

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

Find:
Code:
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER  */
and uncomment it to replace it with:
Code:
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
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.
cathectic is offline     Reply With Quote
Old 02-15-2005, 06:45 AM   #36
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
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...
Bruce Hill is offline     Reply With Quote
Old 02-15-2005, 06:58 AM   #37
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
You think I'm okay here?
Code:
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$
Bruce Hill is offline     Reply With Quote
Old 02-15-2005, 07:22 AM   #38
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64 -current
Posts: 750
Thanked: 1
Quote:
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.
cathectic is offline     Reply With Quote
Old 02-15-2005, 07:26 AM   #39
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
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..
Bruce Hill is offline     Reply With Quote
Old 02-15-2005, 09:12 AM   #40
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: arch, slackware 10.2
Posts: 2,020
Thanked: 0
Quote:
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."

$ cat /var/log/Xorg.log |grep font

ought to do it.
synaptical is offline     Reply With Quote
Old 02-15-2005, 12:36 PM   #41
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64 -current
Posts: 750
Thanked: 1
Chinaman,

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>
cathectic is offline     Reply With Quote
Old 02-15-2005, 06:49 PM   #42
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
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!
Does that mean it's not loading the TTF fonts?
Code:
mingdao@james:~$ ls -alc /usr/X11R6/lib/fonts/TTF/
total 51817

drwxr-xr-x   2 root root     2136 2005-02-07 10:18 ./
drwxr-xr-x  13 root root      320 2004-09-18 16:14 ../
-rw-r--r--   1 root root    65932 2005-02-07 10:17 Vera.ttf
-rw-r--r--   1 root root    63208 2005-02-07 10:17 VeraBI.ttf
-rw-r--r--   1 root root    58716 2005-02-07 10:17 VeraBd.ttf
-rw-r--r--   1 root root    63684 2005-02-07 10:17 VeraIt.ttf
-rw-r--r--   1 root root    55032 2005-02-07 10:17 VeraMoBI.ttf
-rw-r--r--   1 root root    49052 2005-02-07 10:17 VeraMoBd.ttf
-rw-r--r--   1 root root    54508 2005-02-07 10:17 VeraMoIt.ttf
-rw-r--r--   1 root root    49224 2005-02-07 10:17 VeraMono.ttf
-rw-r--r--   1 root root    60280 2005-02-07 10:17 VeraSe.ttf
-rw-r--r--   1 root root    58736 2005-02-07 10:17 VeraSeBd.ttf
-rw-r--r--   1 root root   311636 2005-02-07 10:17 arial.ttf  <- Arial 
-rw-r--r--   1 root root   288496 2005-02-07 10:17 arialbd.ttf
-rw-r--r--   1 root root   226748 2005-02-07 10:17 arialbi.ttf
-rw-r--r--   1 root root   207808 2005-02-07 10:17 ariali.ttf
-rw-r--r--   1 root root   134188 2005-02-07 10:17 arialn.ttf
-rw-r--r--   1 root root   139056 2005-02-07 10:17 arialnb.ttf
-rw-r--r--   1 root root   138468 2005-02-07 10:17 arialnbi.ttf
-rw-r--r--   1 root root   141328 2005-02-07 10:17 arialni.ttf
-rw-r--r--   1 root root   117028 2005-02-07 10:17 ariblk.ttf
-rw-r--r--   1 root root    45260 2005-02-07 10:17 arlrdbd.ttf
-rw-r--r--   1 root root    80148 2005-02-07 10:17 calist.ttf
-rw-r--r--   1 root root    85080 2005-02-07 10:17 calistb.ttf
-rw-r--r--   1 root root    84960 2005-02-07 10:17 calistbi.ttf
-rw-r--r--   1 root root    41728 2005-02-07 10:17 erasb.ttf
-rw-r--r--   1 root root    57508 2005-02-07 10:17 erasbd.ttf
-rw-r--r--   1 root root    59996 2005-02-07 10:17 erasdemi.ttf
-rw-r--r--   1 root root    68656 2005-02-07 10:17 eraslght.ttf
-rw-r--r--   1 root root    60772 2005-02-07 10:17 erasmd.ttf
-rw-r--r--   1 root root    45952 2005-02-07 10:17 felixti.ttf
-rw-r--r--   1 root root    88507 2005-02-07 10:19 fonts.cache-1
-rw-r--r--   1 root root    48735 2005-02-07 10:18 fonts.dir
-rw-r--r--   1 root root    48735 2005-02-07 10:18 fonts.scale
-rw-r--r--   1 root root   196588 2005-02-07 10:17 gara.ttf  <- Garamond 
-rw-r--r--   1 root root   198540 2005-02-07 10:17 garabd.ttf
-rw-r--r--   1 root root   188916 2005-02-07 10:17 garait.ttf
-rw-r--r--   1 root root 13518660 2005-02-07 10:17 gulim.ttc
-rw-r--r--   1 root root    74076 2005-02-07 10:17 luximb.ttf
-rw-r--r--   1 root root    69872 2005-02-07 10:17 luximbi.ttf
-rw-r--r--   1 root root    71784 2005-02-07 10:17 luximr.ttf
-rw-r--r--   1 root root    69496 2005-02-07 10:17 luximri.ttf
-rw-r--r--   1 root root    87160 2005-02-07 10:17 luxirb.ttf
-rw-r--r--   1 root root    85756 2005-02-07 10:17 luxirbi.ttf
-rw-r--r--   1 root root    88732 2005-02-07 10:17 luxirr.ttf
-rw-r--r--   1 root root    86396 2005-02-07 10:17 luxirri.ttf
-rw-r--r--   1 root root    69972 2005-02-07 10:17 luxisb.ttf
-rw-r--r--   1 root root    65568 2005-02-07 10:17 luxisbi.ttf
-rw-r--r--   1 root root    67548 2005-02-07 10:17 luxisr.ttf
-rw-r--r--   1 root root    66372 2005-02-07 10:17 luxisri.ttf
-rw-r--r--   1 root root   489884 2005-02-07 10:17 pala.ttf
-rw-r--r--   1 root root   434004 2005-02-07 10:17 palab.ttf
-rw-r--r--   1 root root   344288 2005-02-07 10:17 palabi.ttf
-rw-r--r--   1 root root   430800 2005-02-07 10:17 palai.ttf
-rw-r--r--   1 root root    51404 2005-02-07 10:17 palscri.ttf
-rw-r--r--   1 root root   156000 2005-02-07 10:17 papyrus.ttf
-rw-r--r--   1 root root   151256 2005-02-07 10:17 parchm.ttf
-rw-r--r--   1 root root 10044356 2005-02-07 10:17 simhei.ttf
-rw-r--r--   1 root root 10500792 2005-02-07 10:17 simsun.ttc
-rw-r--r--   1 root root 10499104 2005-02-07 10:17 simsun.ttf
-rw-r--r--   1 root root   379588 2005-02-07 10:17 tahoma.ttf  <- Tahoma 
-rw-r--r--   1 root root   352020 2005-02-07 10:17 tahomabd.ttf
-rw-r--r--   1 root root   171792 2005-02-07 10:17 verdana.ttf
-rw-r--r--   1 root root   137616 2005-02-07 10:17 verdanab.ttf
-rw-r--r--   1 root root   155076 2005-02-07 10:17 verdanai.ttf
-rw-r--r--   1 root root   154800 2005-02-07 10:17 verdanaz.ttf
-rw-r--r--   1 root root   217624 2005-02-07 10:17 verdref.ttf
-rw-r--r--   1 root root   104372 2005-02-07 10:17 vineritc.ttf
so I'll add Courier New and Times New Roman,
but there's no Helvetica anywhere...
Code:
mingdao@james:~$ find / -iname '*helvetica*' 2>/dev/null
//home/mingdao/OpenOffice.org1.1.4/share/psprint/fontmetric/Helvetica.afm
/home/mingdao/OpenOffice.org1.1.4/share/psprint/fontmetric/Helvetica-Oblique.afm
/home/mingdao/OpenOffice.org1.1.4/share/psprint/fontmetric/Helvetica-BoldOblique.afm
/home/mingdao/OpenOffice.org1.1.4/share/psprint/fontmetric/Helvetica-Bold.afm
in a font path.
Bruce Hill is offline     Reply With Quote
Old 02-15-2005, 07:49 PM   #43
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64 -current
Posts: 750
Thanked: 1
Quote:
Does that mean it's not loading the TTF fonts?
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?
cathectic is offline     Reply With Quote
Old 02-15-2005, 07:58 PM   #44
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
Quote:
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...
Bruce Hill is offline     Reply With Quote
Old 02-15-2005, 08:07 PM   #45
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Dali, China
Distribution: Slackware
Posts: 6,620
Thanked: 50
Here's a new screenshot
Bruce Hill is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LCD Monitor Problem pbeckler Suse/Novell 3 08-31-2005 02:39 PM
LCD Monitor Problem pbeckler Fedora - Installation 1 08-31-2005 10:32 AM
SuSE 9.2 LCD Monitor Problem NCAussie Suse/Novell 2 05-17-2005 07:34 AM
Problem about my LCD monitor jpan Linux - Hardware 1 10-07-2004 09:39 PM
LCD Monitor problem thllgo Linux - Hardware 4 10-09-2003 03:29 PM


All times are GMT -5. The time now is 07:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration