Sunday 31 May 2009

Font Hinting Comparison

Although it has taken me much longer than I expected here is the font hinting comparison I promised some weeks ago. The above image is a direct comparison between the four (auto) hinting options provided by FreeType.

The most striking thing is how poor the "Slight" and "Full" hinting options look. (Although they look similar closer inspection reveals them to have some subtle differences.) "None" and "Medium" both produce acceptable results, however. The most notable difference between the two is in the infinity symbol: notice how it is much more consistent with "Medium" hinting as opposed to "None."

So why does all of this matter? Well, rendering quality is extremely important, especially when bitmapped images are being produced -- a potentially common use case for the resulting Mathtex library. Therefore it is important to know exactly how the various rendering options affect the output in order to choose sensible defaults.

About the samples: these were all produced using the svn HEAD version of matplotlib using the Cairo backend (which when running under Linux uses FreeType + fontconfig, making it easy to change the hinting method).

Saturday 16 May 2009

Is there anybody out there?

Sorry for the lack of updates over the past week or so. With exams on the horizon I am finding myself with ever less time to work on my summer of code project. Thankfully, however, I scheduled this into my initial time-line and so it should not be a problem.

I did, however, manage to find the time to work on a quick comparison between the hinting options provided by FreeType's auto-hinter and the current Mathtex implementation. Although not strictly related to my project it is interesting nevertheless. If all goes well I should have a post on it ready by Wednesday.

Monday 4 May 2009

Who are you?

Tell me, I really want to know, who are you? As I am sure many of you know from my last blog post my name is Freddie Witherden and I am a first year physics student at Imperial College London. While this is my first time participating in GSoC I have been active in the open source community for a couple of years now. In this post I'll to outline things of interest I've done heretofore — hopefully keeping the self aggrandisation to a minimum.

My first real experience as a contributor to an open source project came in 2007 when I started submitting patches to the open source real-time strategy game Warzone 2100. Later that year I rewrote the games network code and subsequently became a full fledged developer. Since then I have gone on to maintain the Mac version of the project and am slowly but surely modernising the user interface.

In around December of last year I wrote a web utility to perform error propagation calculations. Given a function, f of n linearly independent variables it would compute the error in f as a function of the errors in each of the input variables. The utility — which can be found here — was written in C++ using GiNaC for symbolic computation and jsMath for LaTeX math output. It was while designing this tool that I discovered the need for an easy way to render LaTeX math expressions without needing a full blown LaTeX install.

Around this time — while looking for alternatives to GiNaC that were more suited for web applications — I discovered Sympy. Since then I have contributed several patches to the LaTeX printing code in order to improve the output quality. But, the problem about how to render the resulting LaTeX code was still an open problem.

After Christmas my first year computing lab started which — among other things — consisted of a project. The project I chose was the double pendulum, a very simple example of a chaotic system. Already knowing C++ I went on ahead to write a graphical simulator using the Qt libraries. Released under the GPL it can be found here.

Although this post has not done a particularly good job at describing who I am I hope that some of the projects which I have had the privilege of being a part of are of some interest.

Saturday 2 May 2009

Please allow me to introduce myself

…I'm a man of wealth and taste. My name is Freddie Witherden and I am a first year Physics student at Imperial College London. This summer I have the privilege of participating in Google's Summer of Code — working on externalising the Mathtex rendering engine which exists in Matplotlib into its own library.

Mathtex is a LaTeX rendering engine written purely in Python which is able to parse and render (to various formats) most mathematical expressions. While it is currently part of Matplotlib there are several projects and applications which would could make use of and benefit from it. Therefore I am working under the supervision of the Python Software Foundation to move the code into its own library.

Over the next couple of days — as time permits — I'll post some more information about the project, myself and what's involved.