Incorporated new fonts into examples; fix glyph allocation bug in nxhello

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3822 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-07-27 14:43:45 +00:00
parent dd47d95381
commit bc5405cdea
7 changed files with 143 additions and 17 deletions

View File

@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NX Graphics Subsystem</i>
</font></big></h1>
<p>Last Updated: July 24, 2011</p>
<p>Last Updated: July 27 2011</p>
</td>
</tr>
</table>
@ -2724,8 +2724,20 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height,
<dd>The number of bits in the character set. Current options are
only 7 and 8. The default is 7.
<dt><code>CONFIG_NXFONT_SANS23X27</code>:
<dd>At present, there is only one font, a 23x27 san serif font.
But if there were were more, then this option would select that sans serif font.
<dd>This option enables support for a small, 23x27 san serif font
(font ID <code>FONTID_SANS23X27</code> == 1)
<dt><code>CONFIG_NXFONT_SANS28X37B</code>:
<dd>This option enables support for a medium, 28x37 san serif bold font
(font ID <code>FONTID_SANS28X37B</code> == 2)
<dt><code>CONFIG_NXFONT_SANS40X49B</code>:
<dd>This option enables support for a large, 40x49 san serif bold font
(font ID <code>FONTID_SANS40X49B</code> == 3)
<dt><code>CONFIG_NXFONT_SERIF27X38B</code>:
<dd>This option enables support for a medium, 27x38 bold font (with serifs)
(font ID <code>FONTID_SERIF27X38B</code> == 4)
<dt><code>CONFIG_NXFONT_SERIF29X37</code>:
<dd>This option enables support for a medium, 29x37 font (with serifs)
(font ID <code>FONTID_SERIF29X37</code> == 5)
</dl>
</ul>

View File

@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i>
</font></big></h1>
<p>Last Updated: July 13, 2011</p>
<p>Last Updated: July 27, 2011</p>
</td>
</tr>
</table>
@ -4480,6 +4480,31 @@ build
At present, there is only one font, a 23x27 sans serif font.
But if there were were more, then this option would select that sans serif font.
</li>
<li>
<code>CONFIG_NXFONT_SANS23X27</code>:
This option enables support for a small, 23x27 san serif font
(font <code>ID FONTID_SANS23X27</code> == 1).
</li>
<li>
<code>CONFIG_NXFONT_SANS28X37B</code>:
This option enables support for a medium, 28x37 san serif bold font
(font ID <code>FONTID_SANS28X37B</code> == 2).
</li>
<li>
<code>CONFIG_NXFONT_SANS40X49B</code>:
This option enables support for a large, 40x49 san serif bold font
(font ID <code>FONTID_SANS40X49B</code> == 3).
</li>
<li>
<code>CONFIG_NXFONT_SERIF27X38B</code>:
This option enables support for a medium, 27x38 bold font (with serifs)
(font ID <code>FONTID_SERIF27X38B</code> == 4).
</li>
<li>
<code>CONFIG_NXFONT_SERIF29X37</code>:
This option enables support for a medium, 29x37 font (with serifs)
(font ID <code>FONTID_SERIF29X37</code> == 5).
</li>
</ul>
<h3>NX Multi-user only options</h3>

View File

@ -973,10 +973,21 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_NXFONTS_CHARBITS
The number of bits in the character set. Current options are
only 7 and 8. The default is 7.
CONFIG_NXFONT_SANS23X27
At present, there is only one font, a 23x27 sans serif font. But
if there were were more, then this option would select that sans serif
font.
CONFIG_NXFONT_SANS23X27:
This option enables support for a small, 23x27 san serif font
(font ID FONTID_SANS23X27 == 1)
CONFIG_NXFONT_SANS28X37B:
This option enables support for a medium, 28x37 san serif bold font
(font ID FONTID_SANS28X37B == 2)
CONFIG_NXFONT_SANS40X49B:
This option enables support for a large, 40x49 san serif bold font
(font ID FONTID_SANS40X49B == 3)
CONFIG_NXFONT_SERIF27X38B:
This option enables support for a medium, 27x38 bold font (with serifs)
(font ID FONTID_SERIF27X38B == 4)
CONFIG_NXFONT_SERIF29X37:
This option enables support for a medium, 29x37 font (with serifs)
(font ID FONTID_SERIF29X37 == 5)
NX Multi-user only options:

View File

@ -781,8 +781,20 @@ CONFIG_USBSTRG_REMOVABLE=y
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
# This option enables support for a small, 23x27 san serif font
# (font ID FONTID_SANS23X27 == 1)
# CONFIG_NXFONT_SANS28X37B
# This option enables support for a medium, 28x37 san serif bold font
# (font ID FONTID_SANS28X37B == 2)
# CONFIG_NXFONT_SANS40X49B
# This option enables support for a large, 40x49 san serif bold font
# (font ID FONTID_SANS40X49B == 3)
# CONFIG_NXFONT_SERIF27X38B
# This option enables support for a medium, 27x38 bold font (with serifs)
# (font ID FONTID_SERIF27X38B == 4)
# CONFIG_NXFONT_SERIF29X37
# This option enables support for a medium, 29x37 font (with serifs)
# (font ID FONTID_SERIF29X37 == 5)
#
# NX Multi-user only options:
#
@ -817,6 +829,10 @@ CONFIG_NXTK_BORDERCOLOR1=0xd69a
CONFIG_NXTK_BORDERCOLOR2=0xad55
CONFIG_NXTK_AUTORAISE=n
CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONT_SANS28X37B=y
CONFIG_NXFONT_SANS40X49B=n
CONFIG_NXFONT_SERIF27X38B=n
CONFIG_NXFONT_SERIF29X37=n
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
@ -984,6 +1000,8 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_TBCOLOR -- The color of the toolbar. Default depends on
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_FONTID - Selects the font (see font ID numbers in
# include/nuttx/nx/nxfonts.h)
# CONFIG_EXAMPLES_NX_FONTCOLOR -- The color of the toolbar. Default depends on
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_BPP -- Pixels per pixel to use. Valid options
@ -1004,6 +1022,7 @@ CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
CONFIG_EXAMPLES_NX_COLOR1=0xaedc
CONFIG_EXAMPLES_NX_COLOR2=0xe7ff
CONFIG_EXAMPLES_NX_TBCOLOR=0xd69a
CONFIG_EXAMPLES_NX_FONTID=0
CONFIG_EXAMPLES_NX_FONTCOLOR=0x0000
CONFIG_EXAMPLES_NX_BPP=16
CONFIG_EXAMPLES_NX_RAWWINDOWS=n
@ -1024,6 +1043,8 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
# driver for use in the test: Default: 0
# CONFIG_EXAMPLES_NXHELLO_BGCOLOR -- The color of the background. Default
# depends on CONFIG_EXAMPLES_NXHELLO_BPP.
# CONFIG_EXAMPLES_NXHELLO_FONTID - Selects the font (see font ID numbers in
# include/nuttx/nx/nxfonts.h)
# CONFIG_EXAMPLES_NXHELLO_FONTCOLOR -- The color of the fonts used in the
# background window. Default depends on CONFIG_EXAMPLES_NXHELLO_BPP.
# CONFIG_EXAMPLES_NXHELLO_BPP -- Pixels per pixel to use. Valid options
@ -1038,6 +1059,7 @@ CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
CONFIG_EXAMPLES_NXHELLO_FONTID=2
CONFIG_EXAMPLES_NXHELLO_FONTCOLOR=0xffdf
CONFIG_EXAMPLES_NXHELLO_BPP=16
CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n

View File

@ -768,8 +768,20 @@ CONFIG_USBSTRG_REMOVABLE=y
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
# This option enables support for a small, 23x27 san serif font
# (font ID FONTID_SANS23X27 == 1)
# CONFIG_NXFONT_SANS28X37B
# This option enables support for a medium, 28x37 san serif bold font
# (font ID FONTID_SANS28X37B == 2)
# CONFIG_NXFONT_SANS40X49B
# This option enables support for a large, 40x49 san serif bold font
# (font ID FONTID_SANS40X49B == 3)
# CONFIG_NXFONT_SERIF27X38B
# This option enables support for a medium, 27x38 bold font (with serifs)
# (font ID FONTID_SERIF27X38B == 4)
# CONFIG_NXFONT_SERIF29X37
# This option enables support for a medium, 29x37 font (with serifs)
# (font ID FONTID_SERIF29X37 == 5)
#
# NX Multi-user only options:
#
@ -804,6 +816,10 @@ CONFIG_NXTK_BORDERCOLOR1=0xd69a
CONFIG_NXTK_BORDERCOLOR2=0xad55
CONFIG_NXTK_AUTORAISE=n
CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONT_SANS28X37B=n
CONFIG_NXFONT_SANS40X49B=n
CONFIG_NXFONT_SERIF27X38B=n
CONFIG_NXFONT_SERIF29X37=n
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
@ -967,6 +983,8 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_TBCOLOR -- The color of the toolbar. Default depends on
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_FONTID - Selects the font (see font ID numbers in
# include/nuttx/nx/nxfonts.h)
# CONFIG_EXAMPLES_NX_FONTCOLOR -- The color of the toolbar. Default depends on
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_BPP -- Pixels per pixel to use. Valid options
@ -987,6 +1005,7 @@ CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
CONFIG_EXAMPLES_NX_COLOR1=0xaedc
CONFIG_EXAMPLES_NX_COLOR2=0xe7ff
CONFIG_EXAMPLES_NX_TBCOLOR=0xd69a
CONFIG_EXAMPLES_NX_FONTID=0
CONFIG_EXAMPLES_NX_FONTCOLOR=0x0000
CONFIG_EXAMPLES_NX_BPP=16
CONFIG_EXAMPLES_NX_RAWWINDOWS=n

View File

@ -768,8 +768,20 @@ CONFIG_USBSTRG_REMOVABLE=y
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
# This option enables support for a small, 23x27 san serif font
# (font ID FONTID_SANS23X27 == 1)
# CONFIG_NXFONT_SANS28X37B
# This option enables support for a medium, 28x37 san serif bold font
# (font ID FONTID_SANS28X37B == 2)
# CONFIG_NXFONT_SANS40X49B
# This option enables support for a large, 40x49 san serif bold font
# (font ID FONTID_SANS40X49B == 3)
# CONFIG_NXFONT_SERIF27X38B
# This option enables support for a medium, 27x38 bold font (with serifs)
# (font ID FONTID_SERIF27X38B == 4)
# CONFIG_NXFONT_SERIF29X37
# This option enables support for a medium, 29x37 font (with serifs)
# (font ID FONTID_SERIF29X37 == 5)
#
# NX Multi-user only options:
#
@ -804,6 +816,10 @@ CONFIG_NXTK_BORDERCOLOR1=0xd69a
CONFIG_NXTK_BORDERCOLOR2=0xad55
CONFIG_NXTK_AUTORAISE=n
CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONT_SANS28X37B=y
CONFIG_NXFONT_SANS40X49B=n
CONFIG_NXFONT_SERIF27X38B=n
CONFIG_NXFONT_SERIF29X37=n
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
@ -967,6 +983,8 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_TBCOLOR -- The color of the toolbar. Default depends on
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_FONTID - Selects the font (see font ID numbers in
# include/nuttx/nx/nxfonts.h)
# CONFIG_EXAMPLES_NX_FONTCOLOR -- The color of the toolbar. Default depends on
# CONFIG_EXAMPLES_NX_BPP.
# CONFIG_EXAMPLES_NX_BPP -- Pixels per pixel to use. Valid options
@ -987,6 +1005,7 @@ CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
CONFIG_EXAMPLES_NX_COLOR1=0xaedc
CONFIG_EXAMPLES_NX_COLOR2=0xe7ff
CONFIG_EXAMPLES_NX_TBCOLOR=0xd69a
CONFIG_EXAMPLES_NX_FONTID=0
CONFIG_EXAMPLES_NX_FONTCOLOR=0x0000
CONFIG_EXAMPLES_NX_BPP=16
CONFIG_EXAMPLES_NX_RAWWINDOWS=n
@ -1007,10 +1026,14 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
# driver for use in the test: Default: 0
# CONFIG_EXAMPLES_NXTEXT_BGCOLOR -- The color of the background. Default
# depends on CONFIG_EXAMPLES_NXTEXT_BPP.
# CONFIG_EXAMPLES_NXTEXT_BGFONTID - Selects the font to use in the
# background text (see font ID numbers in include/nuttx/nx/nxfonts.h)
# CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR -- The color of the fonts used in the
# background window. Default depends on CONFIG_EXAMPLES_NXTEXT_BPP.
# CONFIG_EXAMPLES_NXTEXT_PUCOLOR -- The color of the pop-up window. Default
# depends on CONFIG_EXAMPLES_NXTEXT_BPP.
# CONFIG_EXAMPLES_NXTEXT_PUFONTID - Selects the font to use in the pop-up
# windows (see font ID numbers in include/nuttx/nx/nxfonts.h)
# CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR -- The color of the fonts used in the
# background window. Default depends on CONFIG_EXAMPLES_NXTEXT_BPP.
# CONFIG_EXAMPLES_NXTEXT_BPP -- Pixels per pixel to use. Valid options
@ -1038,8 +1061,10 @@ CONFIG_EXAMPLES_NXTEXT_BUILTIN=n
CONFIG_EXAMPLES_NXTEXT_VPLANE=0
CONFIG_EXAMPLES_NXTEXT_DEVNO=0
CONFIG_EXAMPLES_NXTEXT_BGCOLOR=0x0011
CONFIG_EXAMPLES_NXTEXT_BGFONTID=2
CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR=0xffdf
CONFIG_EXAMPLES_NXTEXT_PUCOLOR=0xfd20
CONFIG_EXAMPLES_NXTEXT_PUFONTID=1
CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR=0x001f
CONFIG_EXAMPLES_NXTEXT_BPP=16
CONFIG_EXAMPLES_NXTEXT_NOGETRUN=y

View File

@ -262,9 +262,21 @@ CONFIG_NXTK_AUTORAISE
CONFIG_NXFONTS_CHARBITS
The number of bits in the character set. Current options are only 7 and 8.
The default is 7.
CONFIG_NXFONT_SANS23X27
At present, there is only one font, a 23x27 sans serif fount. But if
there were were more, then this option would select that sans serif font.
CONFIG_NXFONT_SANS23X27:
This option enables support for a small, 23x27 san serif font
(font ID FONTID_SANS23X27 == 1)
CONFIG_NXFONT_SANS28X37B:
This option enables support for a medium, 28x37 san serif bold font
(font ID FONTID_SANS28X37B == 2)
CONFIG_NXFONT_SANS40X49B:
This option enables support for a large, 40x49 san serif bold font
(font ID FONTID_SANS40X49B == 3)
CONFIG_NXFONT_SERIF27X38B:
This option enables support for a medium, 27x38 bold font (with serifs)
(font ID FONTID_SERIF27X38B == 4)
CONFIG_NXFONT_SERIF29X37:
This option enables support for a medium, 29x37 font (with serifs)
(font ID FONTID_SERIF29X37 == 5)
NX Multi-user only options: