LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Making non-antialiased fonts looks nice. (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/making-non-antialiased-fonts-looks-nice-257705/)

vrode 03-03-2006 09:21 AM

Quote:

Originally Posted by Toods
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.)
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.
------------------
Ok, I placed your fonts.conf template in my /home/vrode dir.

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

---------------
My thinkpad t43 came w/ ATI x300. Would I still require the Option statement?

Anyway here's what my Xorg.0.log shows,

(II) RADEON(0): Modeline "1152x768" 84.96 1152 1432 1496 1600 768 1051 1052 1062
(**) RADEON(0): Display dimensions: (370, 277) mm
(**) RADEON(0): DPI set to (96, 96)



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.
------------------
Here's the listing of my

/usr/share/fonts/truetype/windowsfonts

fonts.cache-1
fonts.dir

besides list of *.ttf files.


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.
-------------------
Used the above .fonts.conf in my homedir and has made a little difference but they still seem to be light and have a bit of jaggedness to them.

What I can do to improve them further? Still straining my eyes.




Let us know what this produces.

Good luck.

--------------

Appreciate all your help!


regards,
/virendra

webterractive 03-03-2006 03:19 PM

I have played around with Toods conf and I have found that the better way is to use his template and then add whatever modifications you might want and need. As for the libfreetype6 library, I did notice what someone mentioned about the N's in the Verdana font. This is to be fixed by downgrading to libfreetype6-2.1.9 this did work, but I found that some of the small r's on webpages seem to be cut off at the bottom. This seems to be solved in if you downgrade to libfreetype6-2.1.7. I am using the Mandrake 10 package, with Xorg 6.8.2 for Mandrake 10.2. This seems to solve some issues with apps like Firefox that seem to have a symbol error in Xft.so. Once again I can't comment on how good of job Toods has done on this conf file, its made things really nice on Linux.

vrode 03-03-2006 06:56 PM

Quote:

Originally Posted by webterractive
I have played around with Toods conf and I have found that the better way is to use his template and then add whatever modifications you might want and need. As for the libfreetype6 library, I did notice what someone mentioned about the N's in the Verdana font. This is to be fixed by downgrading to libfreetype6-2.1.9 this did work, but I found that some of the small r's on webpages seem to be cut off at the bottom. This seems to be solved in if you downgrade to libfreetype6-2.1.7. I am using the Mandrake 10 package, with Xorg 6.8.2 for Mandrake 10.2. This seems to solve some issues with apps like Firefox that seem to have a symbol error in Xft.so. Once again I can't comment on how good of job Toods has done on this conf file, its made things really nice on Linux.

-----------------
I will try and downgrade and see what that does.


regards,
/virendra

vrode 03-04-2006 02:05 PM

I downgraded from freetype-2.1.10.tar to freetype-2.1.9.tar and I'm still seeing faint fonts (not dark). I've set the font preference to 'Monochrome' under fonts rendering and 'None' for smoothing and 'Full' for hinting.

I even installed the latest ati-driver-installer-8.22.5-i386.run drivers for my ATI x300 card.

The fonts (arial, times new roman, verdana, courier new) turn out kinda crisp but they are faint and nowhere close to what windows displays.

I've followed the how-to forwards and backwards and I'm still fighting it :(

These fonts straining my eyes :(

Has anyone any insight or has overcome the similar issue? Can you point me in the right direction?

I'm also looking for vt100 font if anyone has it or could point me in right direction.

Any insight will be appreciated.



regards,
/virendra

webterractive 03-04-2006 06:09 PM

With all freetype libraries fonts will always look really light and will have some parts of the body missing. This is due to the library not correctly using BCI. Ideally BCI should make your fonts look like those on Apple OS X. But the algorythms are proprietary. So the only thing you can do with BCI is make your msfonts look good and give them that Windows 2000/XP without Cleartype look when you use BCI enabled freetype.

I find it really useful for everyday computing. The closet thing to Apple's look is using the non-BCI enabled freetype library, but this makes some msfonts look funny.

Franklin 03-04-2006 07:46 PM

Quote:

Originally Posted by webterractive
If you want to use msfonts, then I suggest that you install them but disable antialiasing, this gives the msfonts a Windows 2000 effect and actually look really good, though I can't say the same for the rest of the fonts so make sure to move them to a back up folder before you enable system wide antialiasing.

Exactly the point I was making from the start. I think a choice needs to be made: Either you want OSX type rendering or Windows type rendering. Then you optimize the system for one or the other - this includes your choice of fonts. There are downsides to both choices in linux and there is considerable difficulties in trying to do both. The recent posts that have tried to achieve this are interesting. I have made the choice to optimize for the Windows 2000 look and I am happy with the effect I have created - both in terms of look and the lack of work entailed to achieve this look. There are definitely deficiencies when you render MS fonts antialiased - the k, n, x fadeouts at the angles in particular - at small pt sizes. This does seem to disappear at larger font sizes though. Antialiasing (for me) seems to need to be disabled below 12 pt. A good web site to standardize off seems to be slashdot. The italicised fonts without antialiasing are very difficult to read. Getting the settings such that these fonts render antialiased while others (yahoo, linuxquestions) render non-antialiased for the same font size specification in your web browser and antialiasing size settings in X seems to set the correct standard for the rest of the system. (program specific irritations not withstanding)

I don't see much difference between freetype 2.1.9 and 2.1.10 though I know there is one. I think the issue is more or less apparent depending on the monitor type, size, and quality. Flat panels seem to have a far narrower range of tolerable settings than CRTs. I am partial to CRTs and this certainly colors my choice in rendering.

I have updated my screenshots. Ya, they are all Slackware-current, but I have more or less done the same in Debian (Etch) and OpenSUSE 10 (don't like it - and I was a SuSE 8 and 8.2 lover. Maybe a topic for another thread ;) ) I will add some shots from Deb later - I will likely get rid of SuSE.

I wish I had more time to mess with this - 12 hour work days don't leave much energy for LQ. Just wanted to say hi and thank everyone for some excellent posts to a thread I never thought would generate such interest. I think it would be great to pick some of the great posts in this thread and combine it into a more manageable howto with screenshots to illustrate the effects people are achieving. Anyone with the time and inspiration certainly has my blessing - not that it's required by any means.

Regardless, keep up the great work on this stuff. Sorry I'm not able to contribute as much as I would like these days.

Steve

vrode 03-04-2006 09:01 PM

Based on your current screenshot I would love to get this resolution. Then again, I'm trying to achieve the same for my LCD (thinkpad t43 w/ ATI x300) which support 1400x1050 w/ 50hz refresh rate.

At this point, I'm even willing to pay someone to fix this for me.


Any taker?

Feel free to contact me offline at aptgetd at gmail.com


regards,
/virendra

Frunktz 03-05-2006 09:29 AM

Anyone has some problems with OOo2 and the menu?
I fix the option (Turn off antialias) in the options of OOo2 but the font of the menù are very ugly...
Thanks

Franklin 03-05-2006 09:55 AM

Quote:

Originally Posted by Frunktz
Anyone has some problems with OOo2 and the menu?
I fix the option (Turn off antialias) in the options of OOo2 but the font of the menù are very ugly...
Thanks

For OOo-2.0 on Slackware-current and KDE-3.5.1:

KDE fonts are set at Tahoma 8

KDE antialiasing is set on - exclude 8.0 - 11.0, full hinting.

OOo tools-options-view:

use system font for user interface: select this option

scaling: I set this a 90 or 92%. This will match the OOo menu font size to my KDE/GTK menu font size. Your settings may be diffrent. (apparently not required in Gnome)

Font antialiasing: set to "from 18 pixels" this keeps the menu font (for me) non-antialiased at the size I specified as well as allows fonts in the document to be antialiased from 14 pt and above - non-antialiased from 11 pt down.

That's all I do.

HTH

webterractive 03-05-2006 08:37 PM

Here is the way I have my fonts set up for OOo 2.0.1, I have Tahoma 10pt without antialiasing and using Toods config file, with some mods. But for OOo I have antialiasing enabled but have switched the interface font to use Bitstream Vera Sans. This is done by replacing Andale Sans UI to Bitstream Vera Sans, and I have enabled antialiasing for fonts over 8pt, so 9pt and up. This gives me a good looking interface for OOo and it makes the msfonts look good on the screen.

So you need to make the changes in the Font area, and as well as keep antialiasing for fonts 9pt and up in the General area, in the Options menu.

Frunktz 03-06-2006 04:23 AM

Oh yes, I have that configuration (not Toods because my X crash..maybe it's for Freetype 2.10), but as you can see from the photo my font is very ugly..
I have that problem with Bluefish, OOO2, Adobe, some site with Firefox, on other apps no problem.
My resolution is 1280x1024 96 dpi...
On another computer(laptop), same installation, but with 1024x768 font in OOo2 are correctly...
Why?

http://img163.imageshack.us/img163/1...ermata13cp.png

Toods 03-06-2006 06:27 AM

Quote:

Originally Posted by Franklin

I wish I had more time to mess with this - 12 hour work days don't leave much energy for LQ. Just wanted to say hi and thank everyone for some excellent posts to a thread I never thought would generate such interest. I think it would be great to pick some of the great posts in this thread and combine it into a more manageable howto with screenshots to illustrate the effects people are achieving. Anyone with the time and inspiration certainly has my blessing - not that it's required by any means.

Hi Steve,

First of all I must thank you for initiating this thread. Like many others it has helped me on the way and stimulated my interest in getting the font appearance to my liking on Linux.

My own reference was to get the font appearance as closely as possible to that on Windows 2000/XP. On that operating system the font size at which anti-aliasing is applied seems to be different for each font and also whether the fonts are bold, italic (or both). It is for that reason that I devised the rather long 'local.fonts/.fonts.conf' script that I have posted.

The alternative approach is obviously to go fully anti-aliased for all fonts. I also have a configuration for this, but to achieve a really beautiful effect (like printed fonts) I found it necessary to patch Freetype-2.1.9 with the 'Smoothing Patch' of Chester. This was one of his approaches that was never incorporated into the release version of Freetype.

One of the main stumbling blocks that I encountered with all this was that something had written a script at the bottom of my 'fonts.conf ' (NOTE NOT .font.conf) and when in this file, cannot be turned off by changes in '.font.conf'.

With OpenOffice, I find that to achieve the same size menu font as the system (Tahoma 8), I just need to nudge the scaling down to 99%.

I think it would be a great idea to 'distill' the information in this thread into a 'HowTo' sticky to help others along this road. I don't want to take this on all myself, but would be happy to help collaborate with others on this (Franklin?, webterractive?). I think the best way to do this would initially be off-forum so that we could exchange drafts before posting. I would be happy to make a first draft.

Regards to all,
Bill.

Frunktz 03-06-2006 07:39 AM

Nice idea!
But I cannot resolve some problems...
Anyway I think there is a little but in Freetype2 when it parse the MS Fonts with bytecode..little bug that Suse seems to have fix.
The bug is when you use Tahoma font..I see in 8pt..With that size try to look on some letters ('v', '8', '2', and other). For example in 'v' letter you can see a pixel in plus in the "intersection".

I think a solution of some problem is FORCE all apps (througth fonts.conf or local.conf) to use for example Tahoma in substitution of Sans/SansSerif..Is possible?

http://img47.imageshack.us/img47/5927/schermata26pm.png

Toods 03-06-2006 08:04 AM

Quote:

Originally Posted by Frunktz
Nice idea!
But I cannot resolve some problems...
Anyway I think there is a little but in Freetype2 when it parse the MS Fonts with bytecode..little bug that Suse seems to have fix.
The bug is when you use Tahoma font..I see in 8pt..With that size try to look on some letters ('v', '8', '2', and other). For example in 'v' letter you can see a pixel in plus in the "intersection".

I think a solution of some problem is FORCE all apps (througth fonts.conf or local.conf) to use for example Tahoma in substitution of Sans/SansSerif..Is possible?

http://img47.imageshack.us/img47/5927/schermata26pm.png


Hi Frunktz,

I think I understand what you are saying about Tahoma 8. When I magnify a screenshot of some Tahoma 8 text I can see an extra pixel in characters '2' and 'v'. I think this is a Freetype bug. I have only looked in Freetype-2.1.9. I will look at this in 2.1.10 and 2.1.8.

Does anyone know if a patch has been written to deal with this problem?.

If you want Tahoma to be your default 'sans-serif' font you can put an entry in your 'local.conf' like this:

Code:

        <alias>
          <family>sans-serif</family>
          <prefer><family>Tahoma</family></prefer>
        </alias>

Good luck.

webterractive 03-06-2006 04:32 PM

To me it looks like you don't have the BCI enabaled version of libfreetype6, but the non-BCI version.


All times are GMT -5. The time now is 05:45 PM.