Skip to content

Commit

Permalink
Test newline control options, using Nimbus font for funsies.
Browse files Browse the repository at this point in the history
  • Loading branch information
drdnar committed Mar 9, 2019
1 parent 415dffc commit 6bd074b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/testprgm/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "fontlibc.h"

uint8_t test_font[] = {
#include "testfont.inc"
#include "nimbus9.inc"
};

/* Main Function */
Expand All @@ -27,16 +27,18 @@ void main(void) {

/* while (!os_GetCSC()); */

fontlib_SetWindow(1, 1, 300, 40);
fontlib_SetWindow(1, 1, 300, 80);
fontlib_GetWindow(&xmin, &ymin, NULL, NULL);
fontlib_SetCursorPosition(2, 2);
fontlib_SetForegroundColor(0xC0);
fontlib_SetBackgroundColor(0x40);
fontlib_SetLineSpacing(2,4);

fontlib_SetFont(test_font, 0);
fontlib_SetNewlineOptions(FONTLIB_ENABLE_AUTO_WRAP | FONTLIB_AUTO_CLEAR_TO_EOL | FONTLIB_PRECLEAR_NEWLINE);
fontlib_DrawGlyph('*');
fontlib_DrawString("Hello, World!\nThe quick brown fox jumps over the lazy dog. Jack Dawes loves my big sphinx of quartz. ");
fontlib_Newline();

/* Pause */
while (!os_GetCSC());
Expand Down

0 comments on commit 6bd074b

Please sign in to comment.