Technology Tales

Adventures & experiences in contemporary technology

Improving Font Display in Fedora 15

30th May 2011

When I first started to poke around Fedora 15 after upgrading my Fedora machine, the definition of the font display was far from being acceptable to me. Thankfully, it was something that I could resolve and I am writing these words with the letters forming them being shown in a way that was acceptable to me. The main thing that I did to achieve this was to add a file named 99-autohinter-only.conf in the folder /etc/fonts/conf.d. The file contains the following:

<?xml version=”1.0″?>
<!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
<fontconfig>
<match target=”font”>
<edit name=”autohint” mode=”assign”>
<bool>true</bool>
</edit>
</match>
</fontconfig>

This forces autohinting for all fonts so that text looks better than it otherwise would. Apparently, Fedora 15 has seen the incorporation of the TrueType bytecode interpreter (BCI) into FreeType now that its patent has expired. To my eyes, this has worsened font rendering so I incorporated the above from a post by Kevin Kofler and it seems to have done the trick for me. However, I also have added the GNOME Tweak Tool and that allows you to alter the autohinting settings too so it may be a combination of the two actions that has helped. Anything that helps rendering of letters like k only can be a good thing. Another Linux distribution whose font rendering has not satisfied me is openSUSE and I am now set to wondering if the same approach would help there too, albeit without the GNOME Tweak Tool until a GNOME 3 version of that distro comes to fruition.

A spot of extension bother with Firefox

8th December 2010

One keystroke that I use a lot when typing on a computer is Control+Shift+[an arrow key] but I found myself in the awkward position of it not working in Firefox anymore. The nuisance level was enough to set me investigating in the name of resolving the problem. Using the following command to start Firefox saw the keystroke being returned to me so I need to find which plug-in, extension or add-on was the cause of the matter.

firefox -safe-mode

Then, it was a matter of disabling one extension at a time and restarting Firefox each time to see when the keystroke functionality was returned to me. The culprit turned out to be Firebug 1.6 and there’s a discussion on their bug forum about the issue. Even the good folk in the Firebug project noted how many folk were experiencing the inconvenience based on a quick Google search. However, that didn’t turn up the answer for me so I had to do some digging of my own and I hope that it has saved you some time. Of course, Firebug comes without cost so we cannot grumble too much but I’ll be keeping it disabled as much as possible until a new version makes its appearance.

 

Update 2011-01-15: This now seems to be fixed in Firebug 1.6.1

A few more SAS functions to know

22nd January 2010

There are whole pile of SAS functions for testing text strings that hadn’t come to my attention until this week. Until then, I’d have gone about using functions like INDEX and PRXMATCH functions for the same sort of ends but it’s never any load to have a few different ways of doing things and to use the right one for the job. Here’s a quick list of my recent discoveries:

ANYALNUM: First position of any alphanumeric character, returns 0 if absent

ANYALPHA: First position of any alphabetic character (letter of the alphabet), returns 0 if absent

ANYCNTRL: First position of any control character, returns 0 if absent

ANYDIGIT: First position of any numeric character, returns 0 if absent

ANYFIRST: First position of any character that can be used as the start of a SAS variable name when VALIDVARNAME is set to V7, returns 0 if absent

ANYGRAPH: First position of any printable character that isn’t white space, returns 0 if absent

ANYLOWER: First position of any lowercase letter, returns 0 if absent

ANYNAME: First position of any character that can be used in a SAS variable name when VALIDVARNAME is set to V7, returns 0 if absent

ANYPRINT: First position of any printable character, returns 0 if absent

ANYPUNCT: First position of any punctuation character, returns 0 if absent

ANYSPACE: First position of any whitespace character (tabs, carriage returns and the like), returns 0 if absent

ANYUPPER: First position of any uppercase letter, returns 0 if absent

ANYXDIGIT: First position of any hexadecimal character, returns 0 if absent

NOTALNUM: First position of any non-alphanumeric character, returns 0 if absent

NOTALPHA: First position of any non-alphabetic character, returns 0 if absent

NOTCNTRL: First position of anything that isn’t a control character, returns 0 if absent

NOTDIGIT: First position of any non-numeric character, returns 0 if absent

NOTFIRST: First position of any character that cannot be used as the start of a SAS variable name when VALIDVARNAME is set to V7, returns 0 if absent

NOTGRAPH: First position of anything that isn’t a printable character that isn’t white space, returns 0 if absent

NOTLOWER: First position of anything that isn’t a lowercase letter, returns 0 if absent

NOTNAME: First position of any character that cannot be used in a SAS variable name when VALIDVARNAME is set to V7, returns 0 if absent

NOTPRINT: First position of any non-printable character, returns 0 if absent

NOTPUNCT: First position of anything that isn’t a punctuation character, returns 0 if absent

NOTSPACE: First position of anything that isn’t a whitespace character, returns 0 if absent

NOTUPPER: First position of anything that isn’t an uppercase letter, returns 0 if absent

NOTXDIGIT: First position of anything that isn’t a hexadecimal character, returns 0 if absent

Apart from simpler cases where other techniques would work well with the a similar amount of effort, there are others that would need some investigation if you were program them without using one of the above functions. For that reason, I’ll be keeping them in mind for when I might meet one of those more complex scenarios.

Interesting gotcha

7th February 2007

I have just spotted an interesting behavour in the Recent Posts section on the left sidebar here: the space between the penultimate and final words in a heading is the HTML entity for a non-breaking space rather than a real space. That means that a browser sees the two words as one rather than two strings and has consequences for text wrapping of these last two words in the phrase. The workaround is to watch the lengths of the last two words but why things were set up the way that they are in the first place is beyond me.

  • All the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. As regards editorial policy, whatever appears here is entirely of my own choice and not that of any other person or organisation.

  • Please note that everything you find here is copyrighted material. The content may be available to read without charge and without advertising but it is not to be reproduced without attribution. As it happens, a number of the images are sourced from stock libraries like iStockPhoto so they certainly are not for abstraction.

  • With regards to any comments left on the site, I expect them to be civil in tone of voice and reserve the right to reject any that are either inappropriate or irrelevant. Comment review is subject to automated processing as well as manual inspection but whatever is said is the sole responsibility of the individual contributor.