Comment 5 for bug 615787

Revision history for this message
Ben Laenen (benlaenen) wrote :

Since I created these glyphs, you're free to copy them, as they belong to the public domain part of DejaVu. You can also just copy the hinting instructions because they don't use anything font specific.

btw, there is a difference between U+F000 and U+F001: the first one will give you the horizontal ppem, and the second one the vertical ppem (or the other way around, I forgot). So in some subpixel rendering engines, U+F000 will be U+F001 times 3. But they will usually give the same number.

How it technically works: the glyphs are made of two times seven segments, and each segment is a simple rectangle. The instructions ask for the ppem. And then with some small calculations to get both digits (after a check to check whether the number is less than 88) and an IF instruction for each number that each digit can represent, it does an ALIGNRP to the left phantom point (i.e. the left boundary of the glyph) for each segment that's not needed for that number. Since these unneeded glyphs will then be zero-width "lines", they become invisible.

So to get these in the Ubuntu font: just copy the outlines from DejaVu (you may have to adjust the metrics, but it doesn't matter, you only have to keep the point numbers at the same locations to make it easy for the hinting instructions). Then just copy the instructions as well, which should be very easy, but I don't know how VTT works here :-)