View unanswered posts | View active topics It is currently Tue Jul 29, 2014 7:08 pm






Reply to topic  [ 7 posts ] 
Smaller font for displaying single digits 
Author Message
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Post Smaller font for displaying single digits
I made this function to display single digits on the NXTs screen in a smaller font than the regular one, and I thought I'd share. The NXTs regular font (in RobotC at least) is 7 pixels high and 5 pixels wide, while mine is 5 pixels high and 3 pixels wide.

Like the "nxtDisplayStringAt" function, this "nxtDisplayDigitAt" function takes the x/y input as the top left corner for the text, and displays the digit from there. It isn't very versatile -- it only displays 0-9 -- but it's been pretty useful for me.
Code:
void nxtDisplayDigitAt(int x, int y, int value){
  int i;
  nxtFillRect(x, y, x+2, y-4);
  switch(value){
    case 0:
      for(i=0; i<3; i++)
        nxtClearPixel(x+1, y-(i+1));
      break;
    case 1:
      for(i=0; i<5; i++){
        nxtClearPixel(x, y-i);
        nxtClearPixel(x+1, y-i);
      }
      break;
    case 2:
      for(i=0; i<2; i++){
        nxtClearPixel(x+i, y-1);
        nxtClearPixel(x+(2-i), y-3);
      }
      break;
    case 3:
      for(i=0; i<2; i++){
        nxtClearPixel(x+i, y-1);
        nxtClearPixel(x+i, y-3);
      }
      break;
    case 4:
      for(i=0; i<2; i++){
        nxtClearPixel(x+1, y-i);
        nxtClearPixel(x+i, y-3);
        nxtClearPixel(x+i, y-4);
      }
      break;
    case 5:
      for(i=0; i<2; i++){
        nxtClearPixel(x+(2-i), y-1);
        nxtClearPixel(x+i, y-3);
      }
      break;
    case 6:
      for(i=0; i<2; i++){
        nxtClearPixel(x+(2-i), y-1);
        nxtClearPixel(x+1, y-3);
      }
      break;
    case 7:
      nxtEraseRect(x, y-1, x+1, y-4);
      break;
    case 8:
      nxtClearPixel(x+1, y-1);
      nxtClearPixel(x+1, y-3);
      break;
    case 9:
      nxtClearPixel(x+1, y-1);
      for(i=0; i<2; i++)
        nxtClearPixel(x+i, y-3);
      break;
  }
}

Here's something to test it with:
Code:
task main(){
  int i;
  for(i=0; i<10; i++)
    nxtDisplayDigitAt(4*i+1, 62, i);
  while(true){}
}

And here is a screenshot of it in use in a Sudoku grid:

Image

_________________
leonoverweel.com


Mon Jul 23, 2012 4:22 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post Re: Smaller font for displaying single digits
Very cool and a clever way to draw the digits :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Jul 24, 2012 12:40 am
Profile WWW
Rookie
User avatar

Joined: Tue Aug 11, 2009 11:49 pm
Posts: 38
Location: Tasmania, the Land Down Under, the Land Downunder!
Post Re: Smaller font for displaying single digits
It could be very handy.

_________________
regards

Sparra Mc


Image


Wed Jul 25, 2012 11:03 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Thu Dec 22, 2011 7:42 am
Posts: 43
Post Re: Smaller font for displaying single digits
Hi guys,

If you need to display more than numeric characters, I also created a small font for all Ascii characters and based on one pixels array (7 bytes per character) and a relative small code.
Compile the file MyFonts.c from source code available in my project Rainbot on Source Forge (follow the link in my signature)

_________________
Visit my project RainBot v0.11 on source forge, a 6 wheels robot featuring A* & Dijkstra's path finding, motors & sensors emulation, small font, fifo & sorted list libraries, using Xander's drivers for HT Compass, and documented with doxygen.


Thu Aug 02, 2012 8:37 am
Profile
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Post Re: Smaller font for displaying single digits
Hey miki,

Does your code display a single ASCII character the way mine does a digit, or can it display a whole sting/ line of them? I would try the program and see for myself, but I'm away from a computer that has RobotC so I can't.

Thanks

_________________
leonoverweel.com


Thu Aug 02, 2012 10:56 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Thu Dec 22, 2011 7:42 am
Posts: 43
Post Re: Smaller font for displaying single digits
I made three functions, one for single char, one for String an a last one for Int. It was enough for my purposes.
ubyte Font_DisplayChar (char C);
ubyte Font_DisplayString(ubyte X, ubyte Y, string S);
ubyte Font_DisplayInt (ubyte X, ubyte Y, string Format, int N);

Note that this files needs another one myCoords, also included in the project.

Code:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//! @file      MyFonts.h
//! @brief     this file declares myFonts.c structures and functions
//! @date      2012-01-29 (creation)
//! @version   1.03
//! @author    Michael Cambay
//! @copyright You may use this code as you wish, provided you give credit where its due.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef MY_FONTS_H
#define MY_FONTS_H 1            // prevent multiple includes

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION: HEADERS
#include "myCoord.h"
// END OF:  HEADERS
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//=============================================================================================================================
//! @addtogroup FONTS
//! @{

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION: COMPILATION OPTIONS
// END OF:  COMPILATION OPTIONS
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION: DEFINITIONS
#define FONTS_VER_MAJOR  1     //!< Major Version of this class
#define FONTS_VER_MINOR  05    //!< Minor Version of this class
//-----------------------------------------------------------------------------------------------------------------------------
//! @struct FONT_HANDLER
//! @brief  this structure models a nxt screen font handler.
//-----------------------------------------------------------------------------------------------------------------------------
#define BitsToByte(b7,b6,b5,b4,b3,b2,b1,b0) (b7<<7|b6<<6|b5<<5|b4<<4|b3<<3|b2<<2|b1<<1|b0)  //!<  returns byte from bits field
typedef struct
{
  int   Index;  //!<  current data index in SmallFont Array for a character
  ubyte Width;  //!<  current character width in pixel (excluding blank right and left column)
  ubyte Col;    //!<  current pixel column
  ubyte Row;    //!<  current pixel row
  ubyte Msk;    //!<  current pixel mask (to test if pixel is black or white)

  char  cMax;   //!<  global  higher character int the font
  ubyte Height; //!<  global  number of pixel rows of one charater written with the font
  COORD Pos;    //!<  global  position of next character to display
} FONT_HANDLER;
// END OF:  DEFINITIONS
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION: DECLARATIONS
ubyte Font_DisplayChar  (char C);
ubyte Font_DisplayString(ubyte X, ubyte Y, string S);
ubyte Font_DisplayInt   (ubyte X, ubyte Y, string Format, int N);
// END OF:  DECLARATIONS
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//! @}
//=============================================================================================================================

#endif // MY_FONTS_H




Code:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//! @file      MyFonts.c
//! @brief     This file manages a small font display (smaller than native NXT fonts).
//! @date      2012-05-06
//! @version   1.05
//! @author    Michael Cambay
//! @copyright You may use this code as you wish, provided you give credit where its due.
//! @par       LOG:
//! @code
//! WHO  WHEN        VERSION WHAT
//! ---------------------------------------------------------------------------------------------------------------------------
//! MKI  2012-05-06  1.05    Add commented sections starting with //<<<<... and ending with //>>>>...
//!
//! MKI  2012-04-01  1.04    Chg: Move all structures and signatures delacarations into MyFonts.h
//!                          Chg: Keep only source codes into MyFonts.c
//!
//! MKI  2012-03-17  1.03    fix inversion of '(' and ')' characters
//!
//! MKI  2012-03-02  1.02    fix witdh of '+' (from 4 to 3)
//!
//! MKI  2012-02-16  1.01    Add doxygen group and comments
//!
//! MKI  2012-01-29  1.00    Create small font
//! @endcode
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef MY_FONTS
#define MY_FONTS 1            // prevent multiple compilations

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION: ROBOTC PROJECT MAIN FILE DECLARATION
#ifndef PROJECT_MAIN_FILE
#define PROJECT_MAIN_FILE "myFonts.c" //!< enable compilation of task main() and various debug and test functions of this file
#endif
// END OF:  ROBOTC PROJECT MAIN FILE DECLARATION
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION HEADERS
#include "myFonts.h"
// END OF  HEADERS
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION GLOBAL INSTANCES
#include "myFonts_globals.c"
// END OF  GLOBAL INSTANCES
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//< SECTION EXTERNAL SOURCES
#include "myCoord.c"
// END OF  EXTERNAL SOURCES
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//=============================================================================================================================
//! @addtogroup FONTS
//! @{

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION LOCAL INSTANCES

//-----------------------------------------------------------------------------------------------------------------------------
//! @struct Font_Small[]
//! @brief  this array defines the character pixels of small font a nxt screen.
//! each character is defined with 1 byte indicating its width and 6 bytes indicating the pixel on each row
//! @note This array is not included in FONT_HANDLER structure, because RobotC 3.08 can't initialize structures
//! @todo include this array in FONT structured when RobotC will be able to initialize array.
//-----------------------------------------------------------------------------------------------------------------------------
ubyte Font_Small[]=
{
  //! espace 32
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '!' 33
  1,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '"' 34
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '#' 35
  5,
  BitsToByte(0,1,0,1,0,0,0,0),
  BitsToByte(1,1,1,1,1,0,0,0),
  BitsToByte(0,1,0,1,0,0,0,0),
  BitsToByte(1,1,1,1,1,0,0,0),
  BitsToByte(0,1,0,1,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '$' 36
  3,
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),

  //! '%' 37
  5,
  BitsToByte(1,1,1,0,1,0,0,0),
  BitsToByte(1,0,1,1,0,0,0,0),
  BitsToByte(1,1,1,1,1,0,0,0),
  BitsToByte(0,1,1,0,1,0,0,0),
  BitsToByte(1,0,1,1,1,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '&' 38
  4,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,1,0,0,0,0),
  BitsToByte(0,1,1,1,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! ''' 39
  2,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '(' 40
  2,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! ')' 41
  2,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '*' 42
  5,
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,1,0,0,0),
  BitsToByte(0,1,1,1,0,0,0,0),
  BitsToByte(1,0,1,0,1,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '+' 43
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! ',' 44
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),

  //! '-' 45
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '.' 46
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '/' 47
  3,
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '0' 48
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '1' 49
  3,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '2' 50
  3,
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '3' 51
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '4' 52
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '5 53
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '6' 54
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '7' 55
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '8' 56
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '9' 57
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! ':' 58
  1,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! ';' 59
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),

  //! '<' 60
  3,
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '=' 61
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '>' 62
  3,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '?' 63
  3,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),

  //! '@' 64
  4,
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,1,0,0,0,0),
  BitsToByte(1,0,1,1,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,1,1,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'A' 65
  3,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'B' 66
  3,
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'C' 67
  3,
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'D' 68
  3,
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'E' 69
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'F' 70
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'G' 71
  3,
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'H' 72
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'I' 73
  1,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'J' 74
  3,
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'K' 75
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'L' 76
  3,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'M' 77
  5,
  BitsToByte(1,0,0,0,1,0,0,0),
  BitsToByte(1,1,0,1,1,0,0,0),
  BitsToByte(1,0,1,0,1,0,0,0),
  BitsToByte(1,0,0,0,1,0,0,0),
  BitsToByte(1,0,0,0,1,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'N' 78
  4,
  BitsToByte(1,0,0,1,0,0,0,0),
  BitsToByte(1,1,0,1,0,0,0,0),
  BitsToByte(1,0,1,1,0,0,0,0),
  BitsToByte(1,0,0,1,0,0,0,0),
  BitsToByte(1,0,0,1,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'O' 79
  3,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'P' 80
  3,
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'Q' 81
  4,
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,1,0,0,0,0),
  BitsToByte(1,0,0,1,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,1,1,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'R' 82
  3,
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'S' 83
  3,
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'T' 84
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'U' 85
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'V' 86
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'W' 87
  5,
  BitsToByte(1,0,0,0,1,0,0,0),
  BitsToByte(1,0,0,0,1,0,0,0),
  BitsToByte(1,0,1,0,1,0,0,0),
  BitsToByte(1,0,1,0,1,0,0,0),
  BitsToByte(0,1,0,1,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'X' 88
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'Y' 89
  3,
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! 'Z' 90
  3,
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '[' 91
  2,
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '\' 92
  3,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! ']' 93
  2,
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '^' 94
  3,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '_' 95
  3,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(1,1,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '`' 96 NOTE: NXT firmware displays this as Degree symbol. So do I.
  3,
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '{' 123 NOTE: this char has the 97th position (replacing 'a')
  3,
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,1,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '|' 124 NOTE: this char has the 98th position (replacing 'b')
  1,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '}' 125 NOTE: this char has the 99th position (replacing 'c')
  3,
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(0,1,1,0,0,0,0,0),
  BitsToByte(0,1,0,0,0,0,0,0),
  BitsToByte(1,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),

  //! '~' 126 NOTE: this char has the 100th position (replacing 'd')
  4,
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,1,0,1,0,0,0,0),
  BitsToByte(1,0,1,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
  BitsToByte(0,0,0,0,0,0,0,0),
};
// END OF LOCAL INSTANCES
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION CODE

//-----------------------------------------------------------------------------------------------------------------------------
//! @brief         display a small charater (at Font.Pos.Y and Font.Pos.Y)
//! @param[in]     C charater to display
//! @return        return location of blank pixel at the left of next character to display
//! @note
//-----------------------------------------------------------------------------------------------------------------------------
ubyte Font_DisplayChar(char C)
{
  // These inititalizations (done here) avoid the need to call a Font_Init() function before using the small font.
  FontHandler_Small.cMax = (sizeof(Font_Small)/7)+' ';
  FontHandler_Small.Height = 6; // the small charactere are 6 rows height

  // turns lowercases into uppercases
  if(C>='a' && C<='z')
    C&=~0x20;

  // shift {|}~ caracteres for a correct display.
  if(C >= '{' && C <= '~')
    C -= ('{'-'a');

  // check if character exists in the Font.
  if((C >= ' ') && ( C < FontHandler_Small.cMax) )
    FontHandler_Small.Index  = (C - ' ') * 7;
  else
    return(FontHandler_Small.Pos.X);

  // Get width of character
  FontHandler_Small.Width = Font_Small[FontHandler_Small.Index++];

  // display each row of charcter
  for (FontHandler_Small.Row=0; FontHandler_Small.Row<FontHandler_Small.Height; FontHandler_Small.Row++)
  {
    // display first column empty
    nxtClearPixel(FontHandler_Small.Pos.X+FontHandler_Small.Col, FontHandler_Small.Pos.Y-FontHandler_Small.Row);

    // display each column of charcter
    FontHandler_Small.Msk= 0x80;
    for(FontHandler_Small.Col=1; FontHandler_Small.Col<=FontHandler_Small.Width; FontHandler_Small.Col++)
    {
      int i = FontHandler_Small.Index+FontHandler_Small.Row;  // work around RobotC 3.05 bug
      if(Font_Small[i] & FontHandler_Small.Msk)
        nxtSetPixel  (FontHandler_Small.Pos.X+FontHandler_Small.Col, FontHandler_Small.Pos.Y-FontHandler_Small.Row);
      else
        nxtClearPixel(FontHandler_Small.Pos.X+FontHandler_Small.Col, FontHandler_Small.Pos.Y-FontHandler_Small.Row);
      FontHandler_Small.Msk = FontHandler_Small.Msk>>1;
    }
    // display last column empty
    nxtClearPixel(FontHandler_Small.Pos.X+FontHandler_Small.Col, FontHandler_Small.Pos.Y-FontHandler_Small.Row);
  }
  FontHandler_Small.Pos.X += FontHandler_Small.Width+1;
  return(FontHandler_Small.Pos.X);
}

//-----------------------------------------------------------------------------------------------------------------------------
//! @brief         display a string at x,y
//! @param[in]     X location of blank pixel at the left of the first character to display
//! @param[in]     Y location of top row of first character to display
//! @param[out]    S string to display
//! @return        return location of blank pixel at the left of next character to display
//-----------------------------------------------------------------------------------------------------------------------------
ubyte Font_DisplayString(ubyte X, ubyte Y, string S)
{
  Coord_Set(FontHandler_Small.Pos, X, Y);
  for (int i=0; i<strlen(S); i++)
    Font_DisplayChar(StringGetChar(S,i));
  return(FontHandler_Small.Pos.X);
}

//-----------------------------------------------------------------------------------------------------------------------------
//! @brief         display an formated integer at x,y
//! @param[in]     X      location of blank pixel at the left of the first character to display
//! @param[in]     Y      location of top row of first character to display
//! @param[in]     Format format string (sprintf syntax)
//! @param[in]     N      integer to display
//! @return        return location of blank pixel at the left of next character to display
//-----------------------------------------------------------------------------------------------------------------------------
ubyte Font_DisplayInt(ubyte X, ubyte Y, string Format, int N)
{
  string s;
  sprintf(s, Format, N);
  return Font_DisplayString(X, Y, s);
}

// END OF CODE
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//! @}
//=============================================================================================================================

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// SECTION TESTS
#if(PROJECT_MAIN_FILE=="myFonts.c")
   #ifdef OPTION_SHOW_SPRINTF_HEX_BUG
      //-----------------------------------------------------------------------------------------------------------------------------
      //! @brief         Test hexadecimal output from sprintf. (3.05 issue)
      //! @return        none
      //-----------------------------------------------------------------------------------------------------------------------------
      void myFonts_Tests()
      {
        string  s;
        char    c = 127;//254;
        ubyte   ub = 0xFE;
        int     i = 0xFEDC;
        long    l = 0xFEDC;

        eraseDisplay();

        sprintf(s,"Arg        Result");        writeDebugStreamLine(s);
        sprintf(s,"0xFE       %X", 0xFE);      writeDebugStreamLine(s);
        sprintf(s,"0xFEDC     %X", 0xFEDC);    writeDebugStreamLine(s);
        sprintf(s,"0xFEDCBA98 %X", 0xFEDCBA98);writeDebugStreamLine(s);
        sprintf(s,"c          %X", c);         writeDebugStreamLine(s);
        sprintf(s,"ub         %X", ub);        writeDebugStreamLine(s);
        sprintf(s,"i          %X", i);         writeDebugStreamLine(s);
        sprintf(s,"l          %X", l);         writeDebugStreamLine(s);

        while(true);
      }
   #else
      //-----------------------------------------------------------------------------------------------------------------------------
      //! @brief         Test small font display
      //! @return        none
      //-----------------------------------------------------------------------------------------------------------------------------
      void myFonts_Tests()
      {
        eraseDisplay();
        string s;
        s = "abcdefghijklmnop";   Font_DisplayString( 0,38, s);
        s = " !\"#$%&'()*+,-./";  Font_DisplayString( 0,62, s);
        s = "0123456789:;<=>?@";  Font_DisplayString( 0,56, s);
        s = "ABCDEFGHIJKLMNOP";   Font_DisplayString( 0,50, s);
        s = "QRSTUVWXYZ[\]^_`";   Font_DisplayString( 0,44, s);
        s = "qrstuvwxyz{|}~  ";   Font_DisplayString( 0,32, s);

        int i;
        s = "0123456789";
        i = Font_DisplayString( 0,26, s);
        i = Font_DisplayString( i,26, s);
        i = Font_DisplayString( i,26, s);

        Font_DisplayInt( 1,20, "%d",  32765);
        Font_DisplayInt( 30,14,"%X", -25877);
        Font_DisplayInt( 1,14, "%d", -25877);

        while(true);
      }
   #endif // OPTION_SHOW_SPRINTF_HEX_BUG

  task main()
  {
    myFonts_Tests();
  }
#endif // (PROJECT_MAIN_FILE == "myFonts.c")
// END OF  TESTS
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

#endif // MY_FONTS

_________________
Visit my project RainBot v0.11 on source forge, a 6 wheels robot featuring A* & Dijkstra's path finding, motors & sensors emulation, small font, fifo & sorted list libraries, using Xander's drivers for HT Compass, and documented with doxygen.


Thu Aug 02, 2012 11:35 am
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: Smaller font for displaying single digits
Both of these methods look very cool! I can think of some uses for them... :wink:

BTW, 10001st post in RobotC for LEGO MindStorms! 8)

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Fri Aug 03, 2012 6:21 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.