Drawing the line is almost trivial really (although note while in this code we do each point one by one we'll be using less points and drawing lines between them).

Here's the code for that:
Spoiler
That hard bit is filling them. We'll have closed subdivided paths later.
This page linked to by Bomb Bloke on SquidDev's Font API is the kind of technique we are thinking of using. The issue is actually finding the intersection points and y = 2, for example.
Is there some maths wizardry we can use, or do we have to use triangles, which most other libraries seem to use. We thought that using triangles would be far slower in Lua. Although asking Mr Wolfram Alpha shows that solving for t (I used x here) isn't really that... friendly.
Edited by oeed, 11 June 2015 - 11:56 AM.












