HOWTO: Nice fonts

Beastie

Daemon

Reaction score: 546
Messages: 2,275

ahavatar said:
I didn't do anything with .gtkrc-2.0 because I don't have it and I don't understand its purpose for my settings.
Like virtually everything in your home directory, it does not exist by default and you have to create it yourself. It is used to set options (including typeface, font size, etc.) uniformly for all GTK+-based applications.
 

bbzz

Aspiring Daemon

Reaction score: 134
Messages: 874

I'm still finding fonts much better looking on Windows 7. I recompiled freetype2 fonts with MAKE_WITH_LCD_FILTERING, even tried changing that line in cairo as someone suggested.

This is ~/.fonts.conf file:

Code:
    <!-- default quality settings -->
    <match target="font">
        <edit mode="assign" name="rgba">      <const>rgb</const>     </edit>
        <edit mode="assign" name="antialias"> <bool>true</bool>       </edit>
        <edit mode="assign" name="hinting">   <bool>true</bool>       </edit>
        <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit>
#	 <edit mode="assign" name="hintstyle"> <const>hintfull</const> </edit>
        <edit mode="assign" name="lcdfilter"> <const>lcdlight</const> </edit>
    </match>

Also tried changing "lcd_filter" and "hintstyle" options, as well as "rgba" to bgr, vrgb, vbgr.

The issue I have is that letters have red/blue/green shades, it's just not that good.

It's not nearly as crispy and smooth as on my windows laptop, unfortunately. Is there anything else one could try?

Cheers
 

jrm@

Daemon
Developer

Reaction score: 505
Messages: 1,219

mart said:
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

...

    <!-- disable autohinting for fonts that don't need it -->
    <match target="pattern" name="family">
        <test qual="any" name="family">
          <string>Andale Mono</string>
          <string>Arial</string>
          <string>Arial Black</string>
          <string>Comic Sans MS</string>
          <string>Courier New</string>
          <string>Georgia</string>
          <string>Impact</string>
          <string>Trebuchet MS</string>
          <string>Tahoma</string>
          <string>Times New Roman</string>
          <string>Verdana</string>
          <string>Webdings</string>
       </test>
       <edit mode="assign" name="hinting">  <bool>true</bool>  </edit>
       <edit mode="assign" name="autohint"> <bool>false</bool> </edit>
    </match>

</fontconfig>

This part gave me errors, so I used the following instead.

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

...

    <!-- disable autohinting for fonts that don't need it -->
    <match target="pattern">
      <test qual="any" name="family">
        <string>Andale Mono</string>
      </test>
      <test qual="any" name="family">
        <string>Arial</string>
      </test>
      <test qual="any" name="family">
        <string>Arial Black</string>
      </test>
      <test qual="any" name="family">
        <string>Comic Sans MS</string>
      </test>
      <test qual="any" name="family">
        <string>Courier New</string>
      </test>
      <test qual="any" name="family">
        <string>Georgia</string>
      </test>
      <test qual="any" name="family">
        <string>Impact</string>
      </test>
      <test qual="any" name="family">
        <string>Trebuchet MS</string>
      </test>
      <test qual="any" name="family">
        <string>Tahoma</string>
      </test>
      <test qual="any" name="family">
        <string>Times New Roman</string>
      </test>
      <test qual="any" name="family">
        <string>Verdana</string>
      </test>
      <test qual="any" name="family">
        <string>Webdings</string>
      </test>
      <edit mode="assign" name="hinting">  <bool>true</bool>  </edit>
      <edit mode="assign" name="autohint"> <bool>false</bool> </edit>
    </match>

</fontconfig>
 

debguy

Well-Known Member

Reaction score: 24
Messages: 275

/etc/fonts.conf allows HACKS to font substitution

it can break applications or even cause lock-ups. it can fix broken applictions: aha ... but which are you breaking or helping wen you hack it?

Linux From Scratch GNU/Linux x-lfs-2010

do NOT bother downloading. but the above supports Mathematica 4.0. the trick was INSTALLING FONTS CORRECTLY. some hackers had put bogus font substutitions in the X11 font alias files. those removed: order was critical. after all was fixed the math was right: no missing symbols, no wrong symbols, and for math you preettty much want PERFECT.

xorg your not going to get perfect. it's a sloppy system of substitution and never having the right font unless:

#1 its a gnu app that relies on fonts "just being there" and they are when, but (when someone hacks that font or changes the default in the default distro: your f'ed)

#2 the app is an "xorg" app and expects sloppy font choice, calculates and understands "guess choices", and somehow always shows you the right font: HIGHLY UNLIKELY. perhaps supports unicode %100. HIGHLY UNLIKELY.

#3 the app was shipped with all fonts (ie, installed Adobe font pack)

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

Here's the issue. check this "A" here. it's a spline curve. but there are many rules just for that simple glyph (download a GPL font maker, you'll see it's complicated). the spline curve has to be coded and there are many formats

in the end: an app MUST ask for "A" in a table and it can crash if that "A" does not fit exactly in a box (or it will look _bad__fonts_ if it don't crash)

guess what: if that get's substituted how does the app know the substitution isn't bogus?

IT DOESN'T. THAT'S THE PROBLEM.

you have hacks tampering with very sensitive spline files, mixing the order in whcih they are found, then also IMPROPERLY simply substituting a WRONGLY sized shape glyph which might actually be THE WRONG MATH if the OS doesn't have the font asked for (ie, it's free fonts but app asked for a font using Adobe names)

solution: there isn't any really.

in the above URL only "correct" X11 fonts were installed, the FONTPATH was set to be well ordered, and the app fonts configured to be correctly found, and the app never missed a glyph. THE WEB BROWSER was (is) set to only use Courier fonts (which actually made Firefox run a ton faster btw)

here's another for example: you install gnoome but not all gnome fonts. you run gedit(1). crashes when you change fontsize. why? due to the substitution being the wrong size, gedit allocates the wrong memory, it don't fit and when the lines all come in: memory error, gedit "crashes", due to the bad substitution. why did gedit do that? #1 gedit is unsophisticated. #2 on the developer machine they have fonts installed by ubuntu (w/ubuntu font config, which ... ugh). they don't care if you don't. #3 the developers never have the problem and don't care if on other systems it breaks: your problem
 

debguy

Well-Known Member

Reaction score: 24
Messages: 275

GOOD PROGRAMS LIKE FIREFOX

they'll check the memory requirements and box sizes. but try different fonts for best look: some fonts are not "pixelated" by nature, some aren't. pixelated ones look best only if they are at the right desktop resolution and size (and on modern systems, probably not)

if font choices still "look like crap" after choosing a truetype, and if you've "done everything recommneded install", check your DPI setting for your monitor and make sure your desktop is set at the "native resolution". your monitor will ONLY look good when it's DPI resolution (this is true at any desktop size) is at (one of) the native DPI. often if you just choose the "native resolution" that will be ok. (though DPI is still an xorg setting keep in mind). so for a 1080p LED monitor: try 1080p.

run fccache if you change the /etc/font.conf file like manpage says, too ;)
 

debguy

Well-Known Member

Reaction score: 24
Messages: 275

so you got free fonts, questionable substitutions not all apps can handle OFTEN IN XORG LEADING TO INCORRECT SYMBOLS (even if they look good: missing or incorrect symbos are still happening using ubuntu xorg stuff)

**** GUESS WHAT THAT'S NOT ALL ****

i said font files are splines. there are spline source files and spline binary files you didn't know that? rare apps (or perhaps x11 / xorg) can read both.

but to RENDER the fonts in memory (which your video card have builtin, which most don't ... actually likely do but don't admit this to freeware)

to RENDER the fonts. well because of japanese the spline files came to REQUIRE running code patches (math functions) in the font files

*** that's right, font files can be a SECURITY RISK ... you don't want binary font files without source from an unknown maker , because , you just don't know , it's a blob ****

because not all (if any) font compiling "cached font" readers support "emulating font code to avoid font viruses". i'm %100 sure earlier versions of X11 did NOT use a boch's emulator to run code in the fonts. that means the fonts can intently (over-run memory regions or what else can be done)
 

debguy

Well-Known Member

Reaction score: 24
Messages: 275

now ...

the old way to PREVENT FONT SUBSTITUTION was to have font client / servers running loaded with fonts so that no subsitution occurred because the right font was (eventually) found

but nearly no one does that anymore. if your using Adobe Reader on a "well configured system" it might go fetch some adobe font without your knowing it and show you a perfect page. but ... that's not linux
 

debguy

Well-Known Member

Reaction score: 24
Messages: 275

if all GPL software was keyed to a free font set that was always avaialbe in the same subtitution order, things would work

they don't want it to work, per say. the edit fonts in xorg, add remove things, distros like ubuntu change font order and add font packs specifig to (ie, gnome) and gnome OFTEN has "depreciated one font for another"

leading to what you have now: you have no idea if your app is using substitutions or using a font it was designed for, no idea if the symbols you see are correct or incorrect substitutions

yes, ABCDEFG seems to always work: but the bigger picture is there's allot broken

the people doing it: knew it. trust me.
 

debguy

Well-Known Member

Reaction score: 24
Messages: 275

i just GOTTA add this. new firefox (and safari - they share some code base) uses 100 Megabytes per web page open.

the only possible excuse for that is they colluded to QUICKLY CONSUME memory on consumer computers so that 4-8 Gigabytes "ran out quickly"

their responses i've seen: "umm, it needs to pre-allocate or mmap that much so it's rendering engine doesn't run out of memory. it's cached memory so it doesn't consume real memory it just deducts from total free memory not real memory used"

BULL. LIES.
 
D

Deleted member 48958

Guest


Now I use Liberation Sans x11-fonts/liberation-fonts-ttf for UI and I like it much.
Liberation fonts, BTW, is the only project from Red Hat, that I really like :)

I already posted it somewhere on FreeBSD forums, but if you use minimal DE-s,
using such WM-s like x11-wm/fvwm2 or x11-wm/openbox,
it is good idea to add
Code:
Xft.dpi:                                96
Xft.autohint:                           0
Xft.antialias:                          1
Xft.hinting:                            1
Xft.rgba:                               rgb
Xft.hintstyle:                          hintslight
Xft.lcdfilter:                          lcddefault
to ~/.Xresources, it emulates functionality of such tools like gnome-settings-daemon or mate-settings-daemon, it should resize all fonts to 96dpi in all applications, including Qt and GTK applications. You also need to add xrdb -merge ~/.Xresources to your WM autostart script.

As a monospaced font I'm using "DejaVu Sans Mono" -- x11-fonts/dejavu and I like it much,
BTW, monospaced "Menlo" font from macOS is almost fully mimicating "DejaVu Sans Mono",
and "DejaVu Sans Mono" is based on "Bitstream Vera Sans Mono".
I use "9" font size.
NTYmRSC.png
 
Last edited by a moderator:
Top