diff options
Diffstat (limited to 'nuttx/graphics/nxfonts')
-rw-r--r-- | nuttx/graphics/nxfonts/nxfonts_bitmaps.c | 8 | ||||
-rw-r--r-- | nuttx/graphics/nxfonts/nxfonts_getfont.c | 18 | ||||
-rw-r--r-- | nuttx/graphics/nxfonts/nxfonts_internal.h | 4 | ||||
-rw-r--r-- | nuttx/graphics/nxfonts/nxfonts_sans23x27.h (renamed from nuttx/graphics/nxfonts/nxfonts_sans.h) | 26 |
4 files changed, 33 insertions, 23 deletions
diff --git a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c index f215260cf..622c4c0f3 100644 --- a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c +++ b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c @@ -1,7 +1,7 @@ /**************************************************************************** * graphics/nxfonts/nxfonts_bitmap.h * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -46,10 +46,10 @@ /* Pick the fontset */ -#ifdef CONFIG_NXFONT_SANS -# include "nxfonts_sans.h" +#ifdef CONFIG_NXFONT_SANS23X27 +# include "nxfonts_sans23x27.h" #else -# include "nxfonts_sans.h" +# include "nxfonts_sans23x27.h" #endif /**************************************************************************** diff --git a/nuttx/graphics/nxfonts/nxfonts_getfont.c b/nuttx/graphics/nxfonts/nxfonts_getfont.c index 3c53cae7f..52b7774a8 100644 --- a/nuttx/graphics/nxfonts/nxfonts_getfont.c +++ b/nuttx/graphics/nxfonts/nxfonts_getfont.c @@ -1,7 +1,7 @@ /**************************************************************************** - * graphics/nxfonts/nxfonts_getfont.h + * graphics/nxfonts/nxfonts_getfont.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -52,6 +52,10 @@ ****************************************************************************/ /**************************************************************************** + * Private Types + ****************************************************************************/ + +/**************************************************************************** * Private Data ****************************************************************************/ @@ -115,11 +119,11 @@ static inline FAR const struct nx_fontset_s *nxf_getglyphset(uint16_t ch) * Return information about the current font set * * Input Parameters: - * None + * fontid: Identifies the font set to get * ****************************************************************************/ -FAR const struct nx_font_s *nxf_getfontset(void) +FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid) { return &g_fonts; } @@ -131,11 +135,13 @@ FAR const struct nx_font_s *nxf_getfontset(void) * Return font bitmap information for the selected character encoding. * * Input Parameters: - * ch - character code + * ch: Character code + * fontid: Identifies the font set to use * ****************************************************************************/ -FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch) +FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch, + enum nx_fontid_e fontid) { FAR const struct nx_fontset_s *set = nxf_getglyphset(ch); FAR const struct nx_fontbitmap_s *bm = NULL; diff --git a/nuttx/graphics/nxfonts/nxfonts_internal.h b/nuttx/graphics/nxfonts/nxfonts_internal.h index c8118d169..54c574fdc 100644 --- a/nuttx/graphics/nxfonts/nxfonts_internal.h +++ b/nuttx/graphics/nxfonts/nxfonts_internal.h @@ -1,7 +1,7 @@ /**************************************************************************** * graphics/nxfonts/nxfonts_internal.h * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ /* Only font supported for now */ -#define CONFIG_NXFONT_SANS 1 +#define CONFIG_NXFONT_SANS23X27 1 /**************************************************************************** * Public Types diff --git a/nuttx/graphics/nxfonts/nxfonts_sans.h b/nuttx/graphics/nxfonts/nxfonts_sans23x27.h index 963587fd9..998eb862f 100644 --- a/nuttx/graphics/nxfonts/nxfonts_sans.h +++ b/nuttx/graphics/nxfonts/nxfonts_sans23x27.h @@ -1,7 +1,7 @@ /**************************************************************************** - * graphics/nxfonts/nxfonts_sans.h + * graphics/nxfonts/nxfonts_sans23x27.h * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __GRAPHICS_NXFONTS_NXFONTS_SANS_H -#define __GRAPHICS_NXFONTS_NXFONTS_SANS_H +#ifndef __GRAPHICS_NXFONTS_NXFONTS_SANS23X27_H +#define __GRAPHICS_NXFONTS_NXFONTS_SANS23X27_H /**************************************************************************** * Included Files @@ -44,18 +44,22 @@ * Pre-Processor Definitions ****************************************************************************/ +/* Font ID */ + +#define NXFONT_ID FONTID_SANS23X27 + /* Ranges of 7-bit and 8-bit fonts */ -#define NXFONT_MIN7BIT 33 -#define NXFONT_MAX7BIT 126 +#define NXFONT_MIN7BIT 33 +#define NXFONT_MAX7BIT 126 -#define NXFONT_MIN8BIT 161 -#define NXFONT_MAX8BIT 255 +#define NXFONT_MIN8BIT 161 +#define NXFONT_MAX8BIT 255 /* Maximum height and width of any glyph in the set */ -#define NXFONT_MAXHEIGHT 23 -#define NXFONT_MAXWIDTH 27 +#define NXFONT_MAXHEIGHT 23 +#define NXFONT_MAXWIDTH 27 /* The width of a space */ @@ -852,5 +856,5 @@ extern "C" { } #endif -#endif /* __GRAPHICS_NXFONTS_NXFONTS_SANS_H */ +#endif /* __GRAPHICS_NXFONTS_NXFONTS_SANS23X27_H */ |