/*
Copyright (c) 2007-2013, John Ryland
*/
#include <corelayer.h>
#include <screen.h>
#include <font.h>


void fontTest()
{
    Image screen = openScreen();
    Image wallpaper = openImageFile("pics/opening.map");
    Font font1 = openFont("fonts/luximr-12.map");
    Font font2 = openFont("fonts/Arialn-12.map");
    Font font3 = openFont("fonts/Vera-14.map");
    unsigned char offscreenBufferPixels[320*240*sizeof(short)];
    Image offscreenBuffer;
    offscreenBuffer.width = 320;
    offscreenBuffer.height = 240;
    offscreenBuffer.bytes_per_pixel = 2;
    offscreenBuffer.pixel_data = offscreenBufferPixels;
    blitImage(&offscreenBuffer, 0, 0, &wallpaper, 0, 0, -1, -1);
    blitScreen(screen.pixel_data, offscreenBufferPixels);
    drawText(&screen, 10, 30, font1, "luximr: This is a test... minm blah blah");
    drawText(&screen, 10, 50, font2, "Arialn: This is a test... minm blah blah");
    drawText(&screen, 10, 70, font3, "Vera: This is a test... minm blah blah");
    blitScreen(screen.pixel_data, screen.pixel_data);
    closeScreen(screen);
}


int main()
{
    strPrint("SONY mylo font test\n");
    strPrint("Version 0.02\n");
    strPrint("Copyright 2007 John Ryland\n");
    fontTest();
    return 0;
}

