Set top-level variables in generateShapes

This sets the following top-level variables in generateShapes:
size, divisions, face, weight, style

They are required for the getFace call in drawText.

It also renames some of the generateShapes parameters to avoid name
clashes with the top-level variables.
Ensure end of list is specified in getRange

The calls to shape.getRange and hole.getRange were not correctly
specifying the end of the list as the 'end' parameter. This meant the
last elements of the lists were not being used when removing holes from
the shape. This subsequently caused triangulation problems for certain
letters in fonts.