How to get the length of paths in an given font/character
The way I would approach this is to get the outline curves of the font and then break each one down into some fixed number of steps (like, say, 100), and make a series of very small straight lines.

So if you've got some bezier curve, you loop t from 0 to 1 in 100 steps and plug it into the equation:

double x = calculateBezier(0.0, c0.x, c1.x, c2.x, c3.x);
double y = calculateBezier(0.0, c0.y, c1.y, c2.y, c3.y);
double dist = 0.0;
for (double t = 0.01; t &lt;= 1.0; t+= 0.01)
{
    double nextX = calculateBezier(t, c0.x, c1.x, c2.x, c3.x);
    double nextY = calculateBezier(t, c0.y, c1.y, c2.y, c3.y);
    double nextDist = sqrt((nextX - x) * (nextX - x) + (nextY - y) * (nextY - y));
    dist += nextDist;
}


Where calculateBezier() is a function that calculates a point on a bezier curve given the parameter t and control points c0 through c3:

double calculateBezier(double t, double c0, double c1, double c2, double c3)
{
    double t1 = 1.0 - t;

    return (t1 * t1 * t1) * c0 + 3.0 * (t1 * t1) * c1 + 
            3.0 * t1 * (t * t) * c2 + (t * t * t) * c3;
}


And just add the distances of each part of the curve until you're out of curves.

Note that this assumes cubic bezier curves. For quadratic, the calculateBezier function would calculate a quadratic one (like described here).