Archive for December, 2009

Font Rendering Comparison

Dec 31 2009 Published by under Linux,Windows

After changing some font display settings in Linux, I wanted to test the changes. The specific change I wanted to test was the hinting level adjusted by pixel size. Hinting affects how sharp the edges of displayed fonts are. (Note that this is different from print appearance.) The article that got me started adjusting font display is a post on Planet Gentoo that I read a while ago. I noticed that there was a suggestion to use medium hinting to reduce fuzziness on small fonts. That was interesting, so I turned on full hinting for small fonts, hint medium for medium fonts, and hint slight for large fonts. You can see the result on the screenshot.

Linux

snapshot1

Medium hinting is set for pixel sizes between 7 and 11. As the size becomes larger, there are  noticeable color fringes on the edge of the fonts. That’s where hint slight comes in.

Now, there’s nothing fancy going on in Linux as all the settings can be changed in an XML file. So after adjust font in Linux, I decided to write a webpage to test the different pixel sizes.

<html>
<head>
<title>Font Rendering Test</title>
<style type = "text/css">
        .col1 {
            float:left;
            width:33%;
            margin-left:1px;
        }
        .col2 {
            float:left;
            width:33%;
            margin-left:1px;
        }
        .col3 {
            float:right;
            width:33%;
            margin-right:1px;
        }
</style>
</head>

<body>
<center>

<?php
$s = "";
for($i=97;$i<123;$i++){
    $s = $s . chr($i);
}

$font_families = array("Serif", "Sans-serif", "Monospace");
$n = 1;

foreach ($font_families as $font){
    echo "<div class="col" . $n . ""style="font-family:" . $font . "">\n";
    for($i=5;$i<22;$i++){
        echo "<p style="font-size:" . $i . "px">" . $i . " px</p>\n";
        echo "<p style="font-size:" . $i . "px">" . $s . "</p>\n";
    }
    echo "</div>\n";
    $n++;
}
?>
</center>
</html>
</body>
</html>

I happened to be using a computer running XP while I wrote this, so I decided to run the test on that computer, too.

XP

screenshot.1

XP, like Linux, does have color fringes, but they are less noticeable and appear at all font sizes.

Today, I booted Windows 7 to fill out a PDF form and print it across the network. I also planned to do some PDF editing using PDF X-Change Viewer. One thing that makes Windows different from Linux is that applications don’t have system-wide configuration file. PDF viewers have their own font rendering settings. Anyways, here’s what the fonts look like in Windows 7:

7

screenshot.1

Fonts in 7 does not have any rendering artifacts. Which is a reason people do notice the difference when they switch to another OS.

No responses yet

LCD Brightness in KDE4

Dec 28 2009 Published by under Linux

The KDE4 control panel does not have a panel for setting the display brightness yet. However, changing the display brightness can be done at the shell, and the changes take effect immediately.

  1. find a path like “/proc/acpi/video/VGA/LCD/brightness” using ls and cd (the exact path varies)
  2. cat yourfile. The top line contains possible values. The bottom line is the current one.
  3. login as root using su
  4. echo -n new brightness > /proc/acpi/video/VGA/LCD/brightness

to make this permanent every time you login, add it to the KDE autostart directory

  1. cd ~/.kde/Autostart
  2. vim set-brightness.sh
  3. put the following lines in it:

#! /bin/sh

echo -n brightness > /proc/acpi/video/VGA/LCD/brightness

  1. chmod 775 set-brightness.sh

No responses yet

Increasing mouse scroll speed in firefox

Dec 25 2009 Published by under Linux,Windows

This is easy in windows:

  1. hit start orb
  2. type mouse wheel
  3. hit first option
  4. set the mouse scroll rate

However, settings in Linux desktops such as GNOME and KDE does not directly set the scroll speed in Firefox:

  1. type about:config in Firefox address bar and hit enter
  2. make the following changes
  • mousewheel.withnokey.sysnumlines->”false”
  • mousewheel.withnokey.numlines -> 6 (default:3)

Scroll to see the changes

No responses yet

Key Repeat Rate in Windows

Dec 22 2009 Published by under Windows

(7 or Vista) I noticed that while in Linux hitting the backspace key resulted in multiple hits in less time than in Windows. That made the keyboard on Linux more responsive as a single key appeared much faster on the screen. There’s also a way to turn this on in windows.

  1. In the control panel search box, type keyboard
  2. Hit the first option
  3. Drag repeat delay all the way to the right

No responses yet

Bad Karma and the Fox Chasing Its Tail

Dec 21 2009 Published by under Firefox,Linux

I’ve been using Windows 7 since May, when I started my first co-op term. It was definitely better than Vista and much better than XP in some ways. The only thing I don’t like about Windows 7 compared to XP is more hard drive grinding pre-loading programs before they are used into memory.

So this time I decided to install Kubuntu again, forgetting what caused me to abandon it last time. (I couldn’t recall the reason until I finished writing that last sentence) Just a quick overview of what whas karmic and the fox before I get into the root cause of this.

Karma is evolutionary garbage, literally. Some companies trying to make monkey dress it up and call it “good karma” or try to sell you “karma coins”. All garbage. I remember the story behind the game Alpha Centauri. There was only 1 in a million chance of the spaceship getting hit by a meteor, yet due to the karma carried by humans onboard, it was destined to be hit by a meteor. Same thing happens in real life. Things on an outer level never change without a change on an inner level.

So why is Kubuntu karmic? It still had the same problems from last time. When I loaded up my wireless card, I still had to apply the bug fix from Hardy, back 2 generations ago over a year. I expected it to be fixed by now. Second, the default firefox version from the repository was version 3.0.6. If Ubuntu updated its software every six months, then it should at least be 3.5 now. Karmic was released at the end of October. I go through several links on google to install 3.5. Unfortunately, this wasn’t the only bug I encountered installing firefox. There was a firefox installer included with Kubuntu. If I click on it, the installer exits saying firefox is already the latest version. As a result, I had to install it from the command line. After the installation finished, it gave an error message about kde. This should have been a clue about what would follow. Firefox ran smooth until I tried to restore a few things using Firefox Extension Backup Extension (FEBE). I was only able to restore 3 things until the dialog box just refused to show up (it was a GNOME dialog box). After that, I saw KDE desktop crash a few times, apt unable to resolve dependencies, wireless stop working, and several attempts to get wireless back (it’s a lot harder without an internet connection). NOW the Karma becomes obvious, though I still don’t know why.

So now we come to the fox chasing its tail. That’s what you get with a distribution that aims to be current built on top of Debian Linux. The fox will never escape its tail. Kubuntu is based on the KDE desktop, and many Ubuntu users won’t even care to try it for whatever reason (maybe for the same reson they’ve never tried other distributions). When I compare the Kubuntu/Ubuntu website with the Sabayon/Gentoo websites, I find that the Ubuntu side has far less activity and takes longer to solve problems. All because the distribution is based on Debian. In a source based distribution like Gentoo, there is a much greater flow of knowledge. Just look at Planet Gentoo, a Gentoo user blog. It’s not surprising that I remember the reason I abandoned Kubuntu last time, as my laptop is installing Sabayon and I’m writing this. Kubuntu didn’t have a community, it didn’t have people contributin knowledge. It’s just a buggy KDE desktop on top of Xorg and the rest of Ubuntu.

Update: I’ve come across another article mentioning the same problem with Ubuntu (I did get the Kubuntu broken Grub bug, forcing me to install another Linux distro). Also, there is a more technical article benchmarking Gentoo and Ubuntu. Gentoo won, of course. As far as speed goes, Gentoo is the fastest, followed by Fedora, Slackware, Mandriva, and almost last . . . Ubuntu (last goes to the outdated Debian stable).

No responses yet

Time for the Flood

Dec 19 2009 Published by under Linux,Windows

Just finished my last exam and now’s the time to update all my outdated software!

The plan is to leave my XP installation that came with the laptop and wipe out everything else. Does that mean Atlantis will be destroyed and civilization has to be rebuilt again? (Who just asked that!) Not that Windows 7 Release Candidate has gone stale, it expires sometime next year. In the past 3 life cycles, I have focused on heterogenous software configurations.

  1. XP should have Spore and custom theming
  2. Linux distributions should be either user-friendly or technology focused (Ubuntu and Sabayon)
  3. Vista with Google Chrome and Gadgets

The basic principle behind this new installation is to keep every system I use consistent. This implies keeping the user interface the same. Several things to achieve this effect:

  1. FEBE and CLEO Firefox extensions to mass install all extensions and profiles
  2. Firefox as the general purpose browser
  3. Font smoothing (yeah Linux and XP have them)
  4. KDE as Linux desktop (the destop effects in Vista can be duplicated, and it’s closer to Windows desktop than GNOME)
  5. Speed up the slowest part of my user experience (loading a web page in Ubuntu)

No responses yet