Adding image font support to newFont and setNewFont
I propose that
newImageFont be combined into
setNewFont be able to create and set image fonts.
There are two problems I see with how things are currently:
newImageFont is slightly misleading. There isn't an "ImageFont" object, it simply creates a Font in a different way to how
It's true that
newImageFont create Fonts in two very different ways, but
newSoundData also have very different ways of making what they create.
You can create an ImageData object from a file...
ImageData = love.image.newImageData( path/File/FileData )
Or create a blank one by specifying a width and height:
ImageData = love.image.newImageData( width, height )
love.graphics.newFont is already like this:
You can create a Font object from a file...
love.graphics.newFont( path/File/FileData, size )
Or create one using the default font by specifying a size:
love.graphics.newFont( size )
So I propose that
newFont could also create Fonts from an image and a string of glyphs:
love.graphics.newFont( path/etc, glyphs )
newSoundData, and creating a Font with
newFont using the default font, the arguments don't make things ambiguous.
The second problem is that
setNewFont can set a new Font from a font file, or using the default font, but not using an image font. Why not? So I propose that
setNewFont accept an image file plus glyph string too:
love.graphics.setNewFont( path/etc, glyphs )