Wednesday, February 28, 2007

Quick MaraDNS and Chortle font update



I am looking at the code that allocates and frees memory in MaraDNS' recursive cache. The code is a little complicated because there are three cases to account for:

  • A standard DNS query stored in the cache. (This is further divided in to CNAME and non-CNAME answers)
  • A NS reference stored in the cache.
  • A "This name does not exist" stored in the cache.

Each of these is stored in the cache slightly differently, and needs to be deallocated differently. To make things worse, I wasn't aware of all these permutations when I first wrote the cache, so things are a little messy in the code.

I still have to catch up on support email; as of yesterday, I had one unanswered email. I may have more today; I'm only on the internet for 30 minutes today to download some files for my class tomorrow, so I don't have time to check it.




I have done all 200+ glyphs for the 15-pixel size version of the Roman (non-bold and non-italic) font for Chortle. I am now working on the 15-pixel bold version, which is difficult, especially with the upper case letters with diagonal strokes, such as "A", "M", "N", "V", "W", "X", "Y", and "Z". The problem, especially with "M" and "W", is that, if I make the strokes two pixels wide, these letters look heavier than other letters. If I make some of the strokes one pixel wide, the letters look funny. So, I've been making all of the strokes two pixels wide; while the letters are darker than other letters, this seems to be the best solution.

Tuesday, February 27, 2007

MaraDNS update; Chortle 0.11 released



Well, the testing for the 20070226 snapshot of MaraDNS shows that, while the code does not crash anymore, it leaks memory like a seive. It's time for me to overhaul the relevant code that allocates and frees memory. I will work on this tonight.




I have released version 0.11 of my Chortle font today. The big change is that the vertical spacing is a little tighter and most accents are no longer clipped. Å is still slightly clipped at the top; since this is a letter I never use and one which I think is fairly rare, I will live with this, so that Chortle can have rougly the same vertical spacing as the Verdana font. The way Verdana handles Å is by moving the ring down so that it touches the top of the "A".

The other changes are that the version number has been corrected and updated in all .ttf files, and the "big bullet" character has been removed from the Unicode version of the font and a little more spacing has been put around this character.

I'm currently working on the bitmap versions of the Chortle font at various resolutions; it takes me two or three days to do all of Chortle's glyphs at a given resolution and font weight.

Monday, February 26, 2007

Chortle fonts released; MaraDNS updates

As I mentioned in a previous blog entry, I am very happy with the Charis SIL font except for a couple of annoyances:

  • The vertical line spacing is to high.
  • The font does not look good on the screen.

I have installed the wonderful Fontforge program and have begun work on a font called Chortle, which is a derivitive of Charis SIL that will address the two problems.

Since classic TrueType hinting can not be done without violating an Apple patent, the way I will make this font readable on the screen is by using FontForge's ability to edit both bitmap and vector versions of the sam font. Basically, I will correct, by hand, the bitmap versions of Charis Chortle at a few different pixel sizes. Since this is very labor intensive, I have reduced the number of glyphs in Charis from thousands to about 200. This also has the advantage of reducing the size of the font and making it more suitable for use in embedded systems.

There is quite a bit to do with this font; I still need to tidy up the ascent and descent values and put some space around the bullet. I may also put a dot in the "0" character to make it distinct from "O".

For people who are interested, the Chortle font can be downloaded here:


http://www.samiam.org/Chortle





An update to the MaraDNS roadmap that I just posted to the list:

I have already done all of the changes to the csv2 parsing code to use tilde as record separators while being compatible with MaraDNS 1.2 csv2 zone files. I have also already added the bind_port and upstream_port variables, have made it possible to customize the nameserver used to recursively resolve a given subdomain, but have not rewritten udpany() yet.

I haven't touched the Python script to convert BIND zone files in to MaraDNS 1.3 zone files since 2006. My next MaraDNS project is to finish this script.

I have also made the final changes to the memory allocation so that Valgrind will always report that MaraDNS is not leaking memory. I am doing some stress testing right now, as I am typing this, to make sure MaraDNS' memory allocation is airtight.




I have found and fixed the problem with MaraDNS 20070219 crashing. Right now, as I am typing this, I am stress testing the MaraDNS 20070226 snapshot to make sure it is airtight.

I have just answered all support mail people have sent me the last few days. I will probably take a few days to answer mail that comes in.

- Sam

Friday, February 23, 2007

mp3 submarine patent




OK, Microsoft licenses, for a pretty penny ($16 million), the right to use the mp3 format with Microsoft Windows. So, what happens. Alcatel Lucent claim that there are other patents that affect the mp3 format that they own. So, they sue Microsoft. and win the case

Keep in mind:
  • Alcatel's issue should not be with Microsoft, but with Thomson, who claimed that Microsoft (and Apple and all the people who make digital music players) had a mp3 license.
  • This affects anything and everything that can play mp3
  • This is a classic submarine patent. For years Alcatel/Lucent had this patent. Now, finally, they sue years after mp3 has basically dominated the compressed music market
  • This is another case for using Vorbis a non-patented music format that sounds better than mp3 at the same bitrate, but, alas, doesn't have portable player support.


Anyway, this decision makes me very angry. The patent law has to be reform to stop this kind of submarine patent litigation. I hope Microsoft wins on appeal.

Support update; another minor bug




I have answered all of the support email sent to me earlier this week. There are two emails sent more recently that I have not had time to address yet.

One person pointed out that a different format for MaraDNS 1.3 zone files that don't use a tilde between records would be more aestically pleasaing. I agree. However, I also have to consider MaraDNS 1.2 zone file compatibility and ease of zone file parsing by UNIX scripts. It's water under the bridge at this point; the new tilde separated parsing code is completed and I'm moving on to improving the memory allocation so Valgrind never complains.

When testing things for the second support concern, I found a bug in the CSV2 parsing of zone files.If a zone name ends in a percent, the RR has to be explicitly stated for A records. In other words, this is incorrectly a syntax error:

www.% 10.1.2.3

Note that this does work:

www.example.com. 10.1.2.3

As does this:

www.% A 10.1.2.3

The workaround is to make sure all records ending with a percent have an explicit rr type.

- Sam

Tuesday, February 20, 2007

If I could only have three fonts...



If I could only have three fonts, the fonts would be:

  • Microsoft's very beautiful Verdana font (Download) designed by Matthew Carter. This is the most readable true type fonts at the low resolutions current computer displays have. In order to take full advantage of this font in Linux, you need to enable autohinting in FreeType; a process that requires a recompile of FreeType and may violate some patents.

  • The Summer Institute of Linguistics Charis SIL font. This is a derivitive of another one of Matthew Carter's typefaces: Bitstream Charter. This is a True Type conversion of the original, free Bitstream Charter font. Charis SIL has excellent multilingual support, and, more importantly for my uses, has all of the special characters linguists need to transcribe the sounds of words in IPA (a special character set that directly transcribes how a word sounds). I use this font in my English classes to show people how to say different words.

    For some reason, the Charis font has noticably thicker stokes than the original Charter font, like the font was very slightly bold. The font also has a couple of annoyances. One is that the spacing between lines is very large; this is so the font can fit complex litagures used with some IPA transcriptions. The other annoyance is one it shares with Bitstream Charter: The font looks unattractive when rendered on a low-resolution screen. Even anti-aliasing does not completely resolve the issue. Interestingly enough, once I make a .pdf file from a document using the Charis SIL font, the .pdf looks fine on a computer screen. In fact, all of my English lessons use the Charis SIL font.

  • The Unicode versions of the old X11 "Misc fixed" fonts. These are very readable fonts that I have been using in some form or another since 1993; they are very readable bitmap fixed-width fonts. They are far easier on my eyes than any courier derivitive. The main disadvantage of these fonts is that they areonly available in a few point sizes, and that they only work (as far as I know) in the X11 environment for Linux and UNIX systems.


All three of these fonts are freely downloadable, and I have mirrored the fonts here.

Note that both the Verdana and the Fixed fonts look excellent without using any anti-aliasing. I don't like anti-aliased fonts; they give me headaches. In particular, since the fonts look a little blurry, my eyes always try to refocus on them; this hurts after looking at them for a while.




The MaraDNS support mail is starting to pile up again. I'll probably catch up with today's emails tomorrow.

Monday, February 19, 2007

MaraDNS snapshots updated




First of all, I have added MaraDNS 1.2.12.05 to the MaraDNS Sourceforge page.

Second of all, Daniel has already contributed a Slackware package of MaraDNS 1.2.12.05. Slackware users are encouraged to upgrage as soon as possible.

Finally, I have uploaded some new snapshots of MaraDNS today:

  • I have backported the connect()/send()/recv() changes to the recursive code in the the 1.0 branch. I will release MaraDNS 1.0.40 in a few days. This snapshot can be found here
  • I have updated the FAQ and other documentation in the stable branch of MaraDNS. This snapshot can be found here
  • I am working on improving the memory allocation with MaraDNS 1.3. The 20070219 snapshot should not be used unless you are willing to assist me with these changes. If you want to download a usable development snapshot, download the 20070216 snapshot instead.