LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 02-28-2006, 04:40 AM   #136
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Rep: Reputation: 32

Quote:
Originally Posted by webterractive
My N's look the same as well. Its funny, but its not annoying enough to bother me. I did what Toods posted up and it made the N's look normal---
Freetype 2.1.10 can be made to look better with Verdana fonts but with the bold fonts the Byte Code Interpreter will produce these 'fat' abnormalities with a few of the characters. It's a real shame this because Verdana is used by so many web page designers and it leads to a lot of web pages looking strange.

I tried to get around this with Freetype 2.1.10 by forcing use of the 'autohinter' instead of the BCI for Verdana bold. This looks much more normal but the effect is more 'blocky' than hinting with the BCI.

I have not seen any patches yet available to cure this problem with Freetype 2.1.10, but if anyone knows of one I would appreciate knowing about it. Until then I will stick with version 2.1.9.
 
Old 02-28-2006, 12:49 PM   #137
webterractive
Member
 
Registered: Apr 2004
Location: Richmond, Canada
Distribution: Mandriva 2006/XPSP2
Posts: 265

Rep: Reputation: 30
I Know What You Mean

Yeah I have noticed that too with both the font antialiasing and without it. Using freetype 2.1.9 seems to solve the problem but I think that it has made some apps like Firefox crash on some websites like linuxcompatiable.com, I will unload the package again and see if its just the problem with the Firefox installation and not the libfreetype6 downgrade.
 
Old 02-28-2006, 01:41 PM   #138
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Rep: Reputation: 32
Quote:
Originally Posted by webterractive
--- I think that it has made some apps like Firefox crash on some websites like linuxcompatiable.com,---
It might be worth a look at the following:

There are 2 symlinks in the /usr/lib directory pointing to libfreetype.so.6.3.8.(or -6.3.7 in the case of Freetype v 2.1.9), namely libfreetype.so and libfreetype.so.6. Firefox needs to see libfreetype.so.6 to access the Freetype stuff. It could be that you need to remake these two symlinks to point to the new libfreetype.so.6.3.7.

This is how the files are arranged in Slackware and they could be different in other distributions.
 
Old 02-28-2006, 03:06 PM   #139
webterractive
Member
 
Registered: Apr 2004
Location: Richmond, Canada
Distribution: Mandriva 2006/XPSP2
Posts: 265

Rep: Reputation: 30
libXft+libfreetype-2.1.9

Here is the error output that I get with Firefox after downgrading to libfreetype6-2.1.9:

./firefox/firefox-bin: symbol lookup error: /usr/X11R6/lib/libXft.so.2: undefined symbol: FT_GlyphSlot_Embolden

I think I might have to downgrade to the the Mandrake 10.2 Version of X11 to make things run smoother. There are only two files in my /usr/lib/ for libfreetype; libfreetype.so.6 --> libfreetype.so.6.3.8. I have changed it and now it looks like this libfreetype.so.6 --> libfreetype.so.6.3.7

either I'll try to downgrade, or just continue using Opera which has no issue with this.

Last edited by webterractive; 02-28-2006 at 03:07 PM.
 
Old 02-28-2006, 04:13 PM   #140
webterractive
Member
 
Registered: Apr 2004
Location: Richmond, Canada
Distribution: Mandriva 2006/XPSP2
Posts: 265

Rep: Reputation: 30
I have installed the xorg-x11 Mandrake 10.2 updated packages which are 6.8.2 and everything is working very nice.
 
Old 03-02-2006, 01:52 PM   #141
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
Looking for help

I'm running ubuntu 5.10 and facing similar issue of jaggedness. I've read this thread from start to end and followed Franklin's and others instructions with no avail.

My Steps are as follows:

#sudo apt-get install g++

step 1: Adding Windows Fonts in Linux


# cd /usr/share/fonts/truetype
# mkdir windowsfonts
# cp /media/hda1/windows/Fonts/*.ttf .

Now change the ownership of the fonts as well as make sure they have a right of 644 .

# chown root.root *.ttf
# chmod 644 *.ttf
# cd /usr/share/fonts/truetype
# mkdir windowsfonts
# cp /media/hda1/windows/Fonts/*.ttf

# mkfontdir

edited the file fonts.cache-1

added this line

"windowsfonts" 0 ".dir"

# fc-cache

Now I have access to windows fonts in all your X applications including firefox and OpenOffice.org.


Step 2:

Modified my /etc/X11/xorg.conf with correct parameters,
Section "Monitor"
Identifier "Generic Monitor"
HorizSync 30 - 97
VertRefresh 50 - 160
Option "DPMS"
DisplaySize 370.4 277.8
EndSection

vrode@skywalker:/etc/init.d$ xdpyinfo | grep resolution
resolution: 96x96 dots per inch

Step 3:

Downloaded freetype-2.1.10.tar.bz2 to my home directory and untar'd giving me
freetype-2.1.10 directory.

Then I modified ~/freetype-2.1.10/include/freetype/config/ftoption.h to uncomment the line


Here's my symlinks to my existing libfreetype*

vrode@skywalker:/usr/lib$ ls -la libfreetype*
lrwxrwxrwx 1 root root 20 2006-03-01 16:43 libfreetype.so.6 -> libfreetype.so.6.3.5
-rw-r--r-- 1 root root 434840 2005-05-11 20:43 libfreetype.so.6.3.5


Then I ran the command as indicated by Franklin,


vrode@skywalker:~/freetype-2.1.10$ ./configure --prefix=/usr
cd builds/unix; ./configure --prefix=/usr
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [builds/unix/unix-def.mk] Error 77


Then ran make command,

vrode@skywalker:~/freetype-2.1.10$ make
cd builds/unix; ./configure
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [builds/unix/unix-def.mk] Error 77
vrode@skywalker:~/freetype-2.1.10$


and then make install (as root),



root@skywalker:/home/vrode/freetype-2.1.10# make install
make: *** No rule to make target `install'. Stop.

then ldconfig (again as root),


Step 4:

I already have .gtkrc-1.2-gnome2 in my homedir

vrode@skywalker:~$ more .gtkrc-1.2-gnome2
# Autowritten by gnome-settings-daemon. Do not edit

include "/home/vrode/.gtkrc.mine"


Anyway not sure what I'm missing or skipped becuase I'm still seeing jaggedness.


Any help and insight will be greatly appreciated.


regards,
/virendra
 
Old 03-02-2006, 02:27 PM   #142
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Rep: Reputation: 32
Hi,

I will try to help you if i can.

My initial observation is that there appears to be errors in the Freetype compile process.

I suggest first you see if the Freetype libraries were actually made:

Go to the directory /freetype-2.1.10/objs and you should find 'libfreetype.la'.
Then go to the subdirectory /freetype-2.1.10/objs/.libs and you should find 'libfreetype.a' and 'libfreetype.so.6.3.*' and also some symlinks. Check that the file date on these corresponds to the time you did the 'make'.

If these files are present, check that you 'make install' command actually copied these 3 file to your location in /usr (in my case /usr/lib)

Let us know what you find.
 
Old 03-02-2006, 02:42 PM   #143
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
Quote:
Originally Posted by Toods
Hi,

I will try to help you if i can.

My initial observation is that there appears to be errors in the Freetype compile process.

I suggest first you see if the Freetype libraries were actually made:

Go to the directory /freetype-2.1.10/objs and you should find 'libfreetype.la'.
Then go to the subdirectory /freetype-2.1.10/objs/.libs and you should find 'libfreetype.a' and 'libfreetype.so.6.3.*' and also some symlinks. Check that the file date on these corresponds to the time you did the 'make'.

If these files are present, check that you 'make install' command actually copied these 3 file to your location in /usr (in my case /usr/lib)

Let us know what you find.
--------------------------

/home/vrode/freetype-2.1.10/objs lists only README and nothing else

I'm guessing it didn't compile. See my previous thread on the outputs.

Is it okay to have freetype-2.1.10 untar'd under my homedir or should I untar under /usr/local/src?

Let me know if you need more info.


regards,
/virendra
 
Old 03-02-2006, 04:16 PM   #144
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
I ran the following command w/ build-essential (see below)

#sudo apt-get install build-essential gcc gcc-3.4

the compile ran fine this time w/o a hitch.

Now off to working on /etc/fonts/fonts.conf because fonts are still jagged.


regards,
/virendra
 
Old 03-02-2006, 08:33 PM   #145
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
Quote:
Originally Posted by KimVette
fwiw you can solve font size/DPI issues by configuring your DisplaySize correctly. Either look up the specs for your monitor or simply measure the X and Y size in mm, and put it in your XF86Config file like so:

Code:
Section "Monitor"
  Option       "CalcAlgorithm" "CheckDesktopGeometry"
  DisplaySize  410 308
  HorizSync    31-112
  Identifier   "Monitor[0]"
  ModelName    "1920X1440@75HZ"
  Option       "DPMS"
  VendorName   "--> VESA"
  VertRefresh  50-75
  UseModes     "Modes[0]"
EndSection
Not only will this make typefaces/fonts display in a reasonable scale on the screen, but WYSIWYG will really be WYSIWYG in layout and word processing programs.
---------------
Do you mean w/o using the process that Franklin outlined?


regards,
/virendra
 
Old 03-02-2006, 11:21 PM   #146
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
Quote:
Originally Posted by newinlinux
.gtkrc-2.0 is just a file you create in your home directory. Do it by uisng pico, very easy.

#pico .gtkrc-2.0

then inside the editor add

gtk-font-name = "Verdana 9"

Then you control-O and then Cotrol-X to quit. And that's it. you have a hidden file call .gtkrc-2.0 residing in /home/yourname
-----------------
Even if you have an existing .gtkrc-1.2-gnome2? That's what I have. Should I still create .gtkrc-2.0?

I'm still fighting my fonts for a crisper look similar to that of windows. I was successful in compiling freetype2 w/ no avail.

I'm using ubuntu 5.10. Appreciate any help.


regards,
/virendra
 
Old 03-02-2006, 11:34 PM   #147
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
Quote:
Originally Posted by Frunktz
Yeah!!!
I resolve that!
The problem was /etc/fonts/fonts.conf.

Set the hinting from true to false.

Great!!
--------------
I guess my /etc/fonts/fonts.conf already has this. see below cut and paste w/ no avail


<match target="font">
<test name="family">
<string>Bitstream Vera Sans</string>
</test>
<test name="pixelsize" compare="less">
<double>7.5</double>
</test>
<edit name="hinting">
<bool>false</bool>
</edit>
</match>


<match target="font">
<test name="family">
<string>Bitstream Vera Sans Mono</string>
</test>
<test name="pixelsize" compare="less">
<double>7.5</double>
</test>
<edit name="hinting">
<bool>false</bool>
</edit>
</match>


Is there anything else I can look for?


regards,
/virendra
 
Old 03-03-2006, 12:02 AM   #148
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
Quote:
Originally Posted by Toods
OK,

Here is my script which aims to mimic the font appearance of Windows 2000/XP (the 'Byte Code Interpreter' must be enabled in the Freetype build):

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <dir>/usr/local/share/fonts/truetype/</dir>

<!-- Get the DPI of the LCD monitor right -->
 <match target="pattern" >
  <edit mode="assign" name="dpi" ><double>96</double></edit>
 </match>

<!-- It is best for my screen with the following off -->
 <match target="font" >
  <edit mode="assign" name="rgba" ><const>none</const></edit>
 </match>

<!-- First turn on Hinting and Anti-aliasing for everything -->
 <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>
 <match target="font" >
  <edit mode="assign" name="antialias" ><bool>true</bool></edit>
 </match>

<!-- Turn Anti-alias off for selected Font Family, Size and Weight -->
 <match target="font" >
  <test name="family" ><string>Arial</string></test>
  <test compare="less" name="pixelsize" ><double>18</double></test>
  <test name="weight" compare="less"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Arial</string></test>
  <test name="slant" ><const>roman</const></test>
  <test compare="less" name="pixelsize" ><double>16</double></test>
  <test name="weight" compare="more_eq"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Arial</string></test>
  <test name="slant" ><const>italic</const></test>
  <test compare="less" name="pixelsize" ><double>12</double></test>
  <test name="weight" compare="more_eq"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Times New Roman</string></test>
  <test compare="less" name="pixelsize" ><double>19</double></test>
  <test name="weight" compare="less"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Times New Roman</string></test>
  <test name="slant" ><const>roman</const></test>
  <test compare="less" name="pixelsize" ><double>15</double></test>
  <test name="weight" compare="more_eq"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Times New Roman</string></test>
  <test name="slant" ><const>italic</const></test>
  <test compare="less" name="pixelsize" ><double>18</double></test>
  <test name="weight" compare="more_eq"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Tahoma</string></test>
  <test compare="less" name="pixelsize" ><double>17</double></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Verdana</string></test>
  <test compare="less" name="pixelsize" ><double>17</double></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Lucida Console</string></test>
  <test compare="less" name="pixelsize" ><double>18</double></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Trebuchet MS</string></test>
  <test compare="less" name="pixelsize" ><double>17</double></test>
  <test name="weight" compare="less"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Trebuchet MS</string></test>
  <test compare="less" name="pixelsize" ><double>12</double></test>
  <test name="weight" compare="more_eq"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Comic Sans MS</string></test>
  <test compare="less" name="pixelsize" ><double>16</double></test>
  <test name="weight" compare="less"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Courier New</string></test>
  <test name="slant" ><const>roman</const></test>
  <test name="weight" compare="less"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Courier New</string></test>
  <test name="slant" ><const>italic</const></test>
  <test compare="less" name="pixelsize" ><double>36</double></test>
  <test name="weight" compare="less"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Courier New</string></test>
  <test name="slant" ><const>roman</const></test>
  <test compare="less" name="pixelsize" ><double>16</double></test>
  <test name="weight" compare="more_eq"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

 <match target="font" >
  <test name="family" ><string>Courier New</string></test>
  <test name="slant" ><const>italic</const></test>
  <test compare="less" name="pixelsize" ><double>18</double></test>
  <test name="weight" compare="more_eq"><int>200</int></test>
  <edit mode="assign" name="antialias" ><bool>false</bool></edit>
 </match>

<!-- For non-MS Truetype Fonts force use of Autohinter instead of BCI -->
 <match target="font" >
        <test qual="any" name="family" compare="eq">
              <string>Bitstream Charter</string>
              <string>Bitstream Vera Sans</string>
              <string>Bitstream Vera Sans Mono</string>
              <string>Bitstream Vera Serif</string>
              <string>Courier</string>
              <string>Courier 10 Pitch</string>
              <string>Cursor</string>
              <string>Luxi Mono</string>
              <string>Luxi Sans</string>
              <string>Luxi Serif</string>
              <string>Utopia</string>
        </test>
  <edit mode="assign" name="autohint" ><bool>true</bool></edit>
 </match>

<!-- Turn BCI Hinting off and AA on for small font sizes -->
 <match target="font" >
  <test compare="less_eq" name="pixelsize" qual="any" ><double>8</double></test>
  <edit mode="assign" name="hinting" ><bool>false</bool></edit>
  <edit mode="assign" name="antialias" ><bool>true</bool></edit>
 </match>

</fontconfig>
I have forced the use of the native 'autohinter' instead of the 'Byte Code Interpreter' for non-MS Truetype fonts such as Bitstream as they render much better that way.

If anyone can help me optimise the XML to make it more compact, then I would be grateful.
----------------------
Adding this to my /etc/fonts/fonts.conf crashed my X


Any insight will be appreciated.


regards,
/virendra
 
Old 03-03-2006, 12:10 AM   #149
vrode
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
/etc/fonts/fonts.conf

I followed the entire thread by Franklin and others piece by piece and I'm still to trying achieve the crispness similar to that of windows.

Can anyone provide their working /etc/fonts/fonts.conf that I use on my system (ubuntu 5.10) in order to get similar results that of windows fonts.


I'd be more than happy to provide any debugs and config files if need be.


Please advice.


regards,
/virendra
 
Old 03-03-2006, 02:04 AM   #150
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Rep: Reputation: 32
Quote:
Originally Posted by vrode
Please advice.
Hi Virendra,

I can understand your frustration trying to get this working.

Please be patient and you will get it working eventually and you will then be very pleased.

Let us look at 5 things:

1.)
Quote:
---- edited the file fonts.cache-1---
Problem - I do not think you should be editing this file. It is created for you.

2.) I think I may have identified another big problem. You should NOT edit the file '/etc/fonts/font.conf'. The files that you can use to put the scripts in described in this thread are: '/etc/fonts/local.conf' or preferably the '.fonts.conf' file which is a user-specific file located in the user's directory either /home/<user> or in /root in the case of when logged in as root.

3.) Have a look in your /var/log/Xorg.0.log file and just check that the screen size and DPI settings that you put in Xorg.conf are being used. With the recent Nvidia drivers, for example, the monitor is probed by default and those settings then take priority. If that is the case you need to add the following line to 'xorg.conf':

Option "IgnoreEDID" "true".

4.) Have a look in the directory that you installed the MS Truetype fonts in and check if you have the following 4 files:

fonts.cache-1,
fonts.dir,
fonts.scale,
and encodings.dir.

5.) If that all looks good, then try a very simple .fonts.conf file like this:

Code:
<!-- Get the DPI of the LCD monitor right -->
<!-- Use the value you have set in Xorg -->

 <match target="pattern" >
  <edit mode="assign" name="dpi" >
   <double>96</double>
  </edit>
 </match>

<!-- First turn on Hinting -->

 <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>

<!-- Turn off all the Anti-aliasing to debug this -->

 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
This will turn off all the anti-aliasing so some things like bold will look bad but we can sort that later. Try this code and then in the fonts section of your Control Centre, have a look at fonts like Arial and Verdana at 10pt size and see if they look like in winXP.

Let us know what this produces.

Good luck.

Last edited by Toods; 03-03-2006 at 04:31 AM.
 
  


Reply

Tags
antialiasing, fonts, howto, openoffice.org, resolution, screen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xft2 not antialiased fonts look ugly pijulius Linux - Software 0 02-20-2004 09:53 AM
No antialiased fonts in Mozilla 1.6? misfit-x Linux - Software 13 02-10-2004 06:57 AM
Fuzzy antialiased fonts in Slackware 9.0 Kovacs Slackware 1 11-23-2003 08:12 AM
too blurry antialiased fonts oski Mandriva 4 10-12-2003 01:22 PM
How to make the GDM to use the antialiased fonts? Xterminator Conectiva 1 11-22-2002 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration