diff --git a/Documentation/NXGraphicsSubsystem.html b/Documentation/NXGraphicsSubsystem.html index 065f00b7a237d4368093e4d017b00d433dcb9f86..93425526639b56f68fc8951c633f58df9b4ef3cd 100644 --- a/Documentation/NXGraphicsSubsystem.html +++ b/Documentation/NXGraphicsSubsystem.html @@ -12,7 +12,7 @@ <h1><big><font color="#3c34ec"> <i>NX Graphics Subsystem</i> </font></big></h1> - <p>Last Updated: July 10, 2011</p> + <p>Last Updated: July 19, 2011</p> </td> </tr> </table> @@ -2402,14 +2402,18 @@ struct nx_font_s #include <nuttx/nxglib.h> #include <nuttx/nxfonts.h> -FAR const struct nx_font_s *nxf_getfontset(void); +FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid); </pre></ul> <p> <b>Description:</b> Return information about the current font set. </p> <p> - <b>Input Parameters:</b> None + <b>Input Parameters:</b> + <ul><dl> + <dt><code>fontid</code> + <dd>Identifies the font set to get + </dl></ul> </p> <p> <b>Returned Value:</b> @@ -2422,7 +2426,7 @@ FAR const struct nx_font_s *nxf_getfontset(void); #include <nuttx/nxglib.h> #include <nuttx/nxfonts.h> -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); </pre></ul> <p> <b>Description:</b> @@ -2431,8 +2435,10 @@ FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch); <p> <b>Input Parameters:</b> <ul><dl> - <dt><code></code> + <dt><code>ch</code> <dd> + <dt><code>fontid</code> + <dd>Identifies the font set to use </dl></ul> </p> <p> @@ -2676,9 +2682,9 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height, <dt><code>CONFIG_NXFONTS_CHARBITS</code>: <dd>The number of bits in the character set. Current options are only 7 and 8. The default is 7. - <dt><code>CONFIG_NXFONT_SANS</code>: - <dd>At present, there is only one font. But if there were were more, - then this option would select the sans serif font. + <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. </dl> </ul> diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index ba2c65402ec9d78c21d8d5d91ffeb53ee725f69e..22dfbb1f62199120449816d232040fc67cbbc1a2 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -4476,9 +4476,9 @@ build only 7 and 8. The default is 7. </li> <li> - <code>CONFIG_NXFONT_SANS</code>: - At present, there is only one font. But if there were were more, - then this option would select the sans serif font. + <code>CONFIG_NXFONT_SANS23X27</code>: + 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> </ul> diff --git a/configs/README.txt b/configs/README.txt index 95ff0f7b825e1203862f318760a75cc2d39f12c0..57c74babdcb8a9a4871f09e69fe9a88366c6febb 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -973,9 +973,10 @@ 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_SANS - At present, there is only one font. But if there were were more, - then this option would select the sans serif font. + 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. NX Multi-user only options: diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index 886533daa4167e30541162422d7b0141e354ab4a..5fea9f7a4f28dafaeaf2a5f3a214cf5d9e90a6c7 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -572,7 +572,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -605,7 +605,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/ez80f910200zco/dhcpd/defconfig b/configs/ez80f910200zco/dhcpd/defconfig index ca499c9a48ed0361abdfce6ca6802fd2c0fb0457..40cbb674a2113051aa80bdc9c9093b1ff9d9e5a2 100644 --- a/configs/ez80f910200zco/dhcpd/defconfig +++ b/configs/ez80f910200zco/dhcpd/defconfig @@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -613,7 +613,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/ez80f910200zco/httpd/defconfig b/configs/ez80f910200zco/httpd/defconfig index 09acb43f3ca01219dc6383ee41900578dd3b7bd1..5e2801348e9a627cced9f9b2d7d84249b485c7a0 100644 --- a/configs/ez80f910200zco/httpd/defconfig +++ b/configs/ez80f910200zco/httpd/defconfig @@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -613,7 +613,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/ez80f910200zco/nettest/defconfig b/configs/ez80f910200zco/nettest/defconfig index 6923717d48e960f475dd086afd5c6cb9d74d94ae..9468c7b5b9a809ddad3dcf257cd6f0435f17ad49 100644 --- a/configs/ez80f910200zco/nettest/defconfig +++ b/configs/ez80f910200zco/nettest/defconfig @@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -613,7 +613,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/ez80f910200zco/nsh/defconfig b/configs/ez80f910200zco/nsh/defconfig index 43c0a3de180cdef349108171f25d92c64861d8d2..60abb1e7725021964227f0efefc0526eccfefc65 100644 --- a/configs/ez80f910200zco/nsh/defconfig +++ b/configs/ez80f910200zco/nsh/defconfig @@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -613,7 +613,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/ez80f910200zco/ostest/defconfig b/configs/ez80f910200zco/ostest/defconfig index 054e9fe0aa058141ae3f81eb919382390d18066a..7649d22bd318e4629837fb7349589ed69191c4ad 100644 --- a/configs/ez80f910200zco/ostest/defconfig +++ b/configs/ez80f910200zco/ostest/defconfig @@ -575,7 +575,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -608,7 +608,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/ez80f910200zco/poll/defconfig b/configs/ez80f910200zco/poll/defconfig index c2a74015277a8358d75457d80d08e68ae2b950e9..133ef6a753dfc6592aa57241ddccf326af807d19 100644 --- a/configs/ez80f910200zco/poll/defconfig +++ b/configs/ez80f910200zco/poll/defconfig @@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -613,7 +613,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/lm3s6965-ek/nx/defconfig b/configs/lm3s6965-ek/nx/defconfig index 759c14d3a79b4df326ede421ffbd07f2e632bc5a..2a8bb6e990d11dbe9d40a773c8cbbd6100c9cf50 100755 --- a/configs/lm3s6965-ek/nx/defconfig +++ b/configs/lm3s6965-ek/nx/defconfig @@ -548,7 +548,7 @@ CONFIG_NET_RESOLV_ENTRIES=4 # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -584,7 +584,7 @@ CONFIG_NX_KBD=y CONFIG_NXTK_BORDERCOLOR1=8 CONFIG_NXTK_BORDERCOLOR2=4 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/lm3s8962-ek/nx/defconfig b/configs/lm3s8962-ek/nx/defconfig index e76f69a9e53b1f5113dfad58d34ec0ebe132ce7d..0ccbe5e023f64ebd163573e98a5efdc63f3728b8 100755 --- a/configs/lm3s8962-ek/nx/defconfig +++ b/configs/lm3s8962-ek/nx/defconfig @@ -548,7 +548,7 @@ CONFIG_NET_RESOLV_ENTRIES=4 # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -584,7 +584,7 @@ CONFIG_NX_KBD=y CONFIG_NXTK_BORDERCOLOR1=8 CONFIG_NXTK_BORDERCOLOR2=4 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/lpcxpresso-lpc1768/nx/defconfig b/configs/lpcxpresso-lpc1768/nx/defconfig index 477ca4ef772393126e0be34577c1dd2c7d34b8e5..c54eec489c047d46e2cf8ec8401e84beda24dad3 100755 --- a/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/configs/lpcxpresso-lpc1768/nx/defconfig @@ -759,7 +759,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -795,7 +795,7 @@ CONFIG_NXTK_BORDERWIDTH=2 CONFIG_NXTK_BORDERCOLOR1=1 CONFIG_NXTK_BORDERCOLOR2=0 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/olimex-lpc1766stk/nx/defconfig b/configs/olimex-lpc1766stk/nx/defconfig index 1ffd9defe8829b4d7bb8e74a4df56a377623ebec..309bf31acb23e4f64ec16df9ec4cd0e1694dbace 100755 --- a/configs/olimex-lpc1766stk/nx/defconfig +++ b/configs/olimex-lpc1766stk/nx/defconfig @@ -739,7 +739,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -775,7 +775,7 @@ CONFIG_NX_KBD=y CONFIG_NXTK_BORDERCOLOR1=8 CONFIG_NXTK_BORDERCOLOR2=4 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/sam3u-ek/knsh/defconfig b/configs/sam3u-ek/knsh/defconfig index 51f83efc34e3718f3f77e55873801277119cac80..ddf6a23ff629ee292dc2daaf903b70fbc32d32c9 100755 --- a/configs/sam3u-ek/knsh/defconfig +++ b/configs/sam3u-ek/knsh/defconfig @@ -702,7 +702,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -738,7 +738,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/sam3u-ek/nsh/defconfig b/configs/sam3u-ek/nsh/defconfig index 9294603f49c893c7cccf74940428c84fe31a7faa..8cbbbdcb1cb41f7bd288a52cb73786289d11bdd3 100755 --- a/configs/sam3u-ek/nsh/defconfig +++ b/configs/sam3u-ek/nsh/defconfig @@ -672,7 +672,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -708,7 +708,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/sam3u-ek/nx/defconfig b/configs/sam3u-ek/nx/defconfig index ea1b6093673541931e830185eacbac57f46dc4a7..c50d242e11a5b3ebfa663ed484dd41e304737975 100755 --- a/configs/sam3u-ek/nx/defconfig +++ b/configs/sam3u-ek/nx/defconfig @@ -681,7 +681,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -717,7 +717,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/sim/nx/defconfig b/configs/sim/nx/defconfig index 2962d6b0bc6f4375743614307766676460c8190d..d4688ea498830ec7d06a3bcfe7e0cd4037f6e283 100644 --- a/configs/sim/nx/defconfig +++ b/configs/sim/nx/defconfig @@ -369,7 +369,7 @@ CONFIG_NET_RESOLV_ENTRIES=4 # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -402,7 +402,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/sim/nx/defconfig-x11 b/configs/sim/nx/defconfig-x11 index 27a6a51fa0be0d17dbab41364daa72740ee806d4..9228786dfea98d8cc3757a4653ef0ad66668285e 100644 --- a/configs/sim/nx/defconfig-x11 +++ b/configs/sim/nx/defconfig-x11 @@ -369,7 +369,7 @@ CONFIG_NET_RESOLV_ENTRIES=4 # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -402,7 +402,7 @@ CONFIG_NX_KBD=y #CONFIG_NXTK_BORDERCOLOR1 #CONFIG_NXTK_BORDERCOLOR2 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/stm3210e-eval/nsh2/defconfig b/configs/stm3210e-eval/nsh2/defconfig index 988d659e4b7ecd6916573761e3c7466c30c819d0..951980caac4cba1d3686ec5ead4bd8152b884439 100644 --- a/configs/stm3210e-eval/nsh2/defconfig +++ b/configs/stm3210e-eval/nsh2/defconfig @@ -775,7 +775,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -811,7 +811,7 @@ CONFIG_NX_KBD=y CONFIG_NXTK_BORDERCOLOR1=0xd69a CONFIG_NXTK_BORDERCOLOR2=0xad55 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/stm3210e-eval/nx/defconfig b/configs/stm3210e-eval/nx/defconfig index bf6e25e7a61f0c1e0fb8df8ae6d969f143606f97..44633cbc179e0749afd2e5bf5b68f653006aec4e 100644 --- a/configs/stm3210e-eval/nx/defconfig +++ b/configs/stm3210e-eval/nx/defconfig @@ -767,7 +767,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -803,7 +803,7 @@ CONFIG_NX_KBD=y CONFIG_NXTK_BORDERCOLOR1=0xd69a CONFIG_NXTK_BORDERCOLOR2=0xad55 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/configs/stm3210e-eval/nxtext/defconfig b/configs/stm3210e-eval/nxtext/defconfig index 98efcf9a797691f2158abac8bf75412857ff2e33..5b658f0ad8d6beb6462143ef1cf8e46b4fc6b7e1 100644 --- a/configs/stm3210e-eval/nxtext/defconfig +++ b/configs/stm3210e-eval/nxtext/defconfig @@ -767,7 +767,7 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_NXFONTS_CHARBITS # The number of bits in the character set. Current options are # only 7 and 8. The default is 7. -# CONFIG_NXFONT_SANS +# 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. # @@ -803,7 +803,7 @@ CONFIG_NX_KBD=y CONFIG_NXTK_BORDERCOLOR1=0xd69a CONFIG_NXTK_BORDERCOLOR2=0xad55 CONFIG_NXTK_AUTORAISE=n -CONFIG_NXFONT_SANS=y +CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONTS_CHARBITS=7 CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 diff --git a/graphics/README.txt b/graphics/README.txt index 1822067ade7ad3333f5f07fb11501d90d789cb5a..c99a72809c2194e5a95625c989b787e43a8b5322 100644 --- a/graphics/README.txt +++ b/graphics/README.txt @@ -118,9 +118,9 @@ 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_SANS - At present, there is only one font. But if there were were more, then this - option would select the sans serif font. +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. NX Multi-user only options: diff --git a/graphics/nxfonts/nxfonts_bitmaps.c b/graphics/nxfonts/nxfonts_bitmaps.c index f215260cfe4f99489f9d336552296d67a48f0764..622c4c0f3ec9d6c4a30b9157eaf81fcf94d60e71 100644 --- a/graphics/nxfonts/nxfonts_bitmaps.c +++ b/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/graphics/nxfonts/nxfonts_getfont.c b/graphics/nxfonts/nxfonts_getfont.c index 3c53cae7f7f430fc8a785eacab9bca8373baf766..52b7774a80a31af4f8f3c48aef78dc517097d080 100644 --- a/graphics/nxfonts/nxfonts_getfont.c +++ b/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 @@ -51,6 +51,10 @@ * Pre-Processor Definitions ****************************************************************************/ +/**************************************************************************** + * 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/graphics/nxfonts/nxfonts_internal.h b/graphics/nxfonts/nxfonts_internal.h index c8118d169a243640b78c47df031674fe9ba3a152..54c574fdc186d53e1422c5272283194cec000d4b 100644 --- a/graphics/nxfonts/nxfonts_internal.h +++ b/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/graphics/nxfonts/nxfonts_sans.h b/graphics/nxfonts/nxfonts_sans23x27.h similarity index 98% rename from graphics/nxfonts/nxfonts_sans.h rename to graphics/nxfonts/nxfonts_sans23x27.h index 963587fd99f027adc0933034de1d6a0bd5fec767..998eb862fcd5a794a4289e5af30a0573de1eae80 100644 --- a/graphics/nxfonts/nxfonts_sans.h +++ b/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 */ diff --git a/include/nuttx/nxfonts.h b/include/nuttx/nxfonts.h index 8bef4b00a206bc8497f2dbf3bcb3ce096b22959a..5cc715166f86d89c79e00609cdbbc9380b549eec 100644 --- a/include/nuttx/nxfonts.h +++ b/include/nuttx/nxfonts.h @@ -48,20 +48,37 @@ /**************************************************************************** * Pre-processor definitions ****************************************************************************/ +/* Select the default font. If no fonts are select, then a compilation error + * is likely down the road. + */ + +#ifdef CONFIG_NXFONT_SANS23X27 +# define NXFONT_DEFAULT FONTID_SANS23X27 +#endif /**************************************************************************** * Public Types ****************************************************************************/ +/* Font IDs */ + +enum nx_fontid_e +{ + FONTID_DEFAULT = 0 /* The default font */ +#ifdef CONFIG_NXFONT_SANS23X27 + , FONTID_SANS23X27 /* The 23x27 sans serif font */ +#endif +}; + /* This structures provides the metrics for one glyph */ struct nx_fontmetric_s { - uint32_t stride : 2; /* Width of one font row in bytes */ - uint32_t width : 6; /* Width of the font in bits */ - uint32_t height : 6; /* Height of the font in rows */ - uint32_t xoffset : 6; /* Top, left-hand corner X-offset in pixels */ - uint32_t yoffset : 6; /* Top, left-hand corner y-offset in pixels */ + uint32_t stride : 2; /* Width of one font row in bytes */ + uint32_t width : 6; /* Width of the font in bits */ + uint32_t height : 6; /* Height of the font in rows */ + uint32_t xoffset : 6; /* Top, left-hand corner X-offset in pixels */ + uint32_t yoffset : 6; /* Top, left-hand corner y-offset in pixels */ uint32_t unused : 6; }; @@ -70,7 +87,7 @@ struct nx_fontmetric_s struct nx_fontbitmap_s { struct nx_fontmetric_s metric; /* Character metrics */ - FAR const uint8_t *bitmap; /* Pointer to the character bitmap */ + FAR const uint8_t *bitmap; /* Pointer to the character bitmap */ }; /* This structure describes one contiguous grouping of glyphs that @@ -80,19 +97,31 @@ struct nx_fontbitmap_s struct nx_fontset_s { - uint8_t first; /* First bitmap character code */ - uint8_t nchars; /* Number of bitmap character codes */ + uint8_t first; /* First bitmap character code */ + uint8_t nchars; /* Number of bitmap character codes */ FAR const struct nx_fontbitmap_s *bitmap; }; -/* This structure describes the overall fontset */ +/* This structure describes the overall metrics of the fontset */ struct nx_font_s { - uint8_t mxheight; /* Max height of one glyph in rows */ - uint8_t mxwidth; /* Max width of any glyph in pixels */ - uint8_t mxbits; /* Max number of bits per character code */ - uint8_t spwidth; /* The width of a space in pixels */ + uint8_t mxheight; /* Max height of one glyph in rows */ + uint8_t mxwidth; /* Max width of any glyph in pixels */ + uint8_t mxbits; /* Max number of bits per character code */ + uint8_t spwidth; /* The width of a space in pixels */ +}; + +/* Finally, this structure defines everything about the font set */ + +struct nx_fontpackage_s +{ + uint8_t id; /* The font ID */ + struct nx_font_s metrics; /* Font set metrics */ + struct nx_fontset_s font7; /* Fonts for 7-bit encoding */ +#if CONFIG_NXFONTS_CHARBITS >= 8 + struct nx_fontset_s font8; /* Fonts for 8-bit encoding */ +#endif }; /**************************************************************************** @@ -118,11 +147,11 @@ extern "C" { * Return information about the current font set * * Input Parameters: - * An instance of struct nx_font_s describing the font set. + * fontid: Identifies the font set to get * ****************************************************************************/ -EXTERN FAR const struct nx_font_s *nxf_getfontset(void); +EXTERN FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid); /**************************************************************************** * Name: nxf_getbitmap @@ -131,14 +160,16 @@ EXTERN 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 * * Returned Value: * An instance of struct nx_fontbitmap_s describing the glyph. * ****************************************************************************/ -EXTERN FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch); +EXTERN FAR const struct nx_fontbitmap_s * + nxf_getbitmap(uint16_t ch, enum nx_fontid_e fontid); /**************************************************************************** * Name: nxf_convert_*bpp diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 8256c2d8c878a777cbec1e9bd09903c86c43ca37..3fc318a402290a5115197a1dd0e6ad759aa70c92 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -105,7 +105,7 @@ enum tstate_e TSTATE_WAIT_MQNOTFULL, /* BLOCKED - Waiting for a MQ to become not full. */ #endif #ifdef CONFIG_PAGING - TSTATE_WAIT_PAGEFILL, /* BLOCKED - Waiting for page fill */ + TSTATE_WAIT_PAGEFILL, /* BLOCKED - Waiting for page fill */ #endif NUM_TASK_STATES /* Must be last */ }; diff --git a/sched/sem_timedwait.c b/sched/sem_timedwait.c index c02bc48db568fbd42cb4a683dc9c93e177c73213..7b01d22d81315df11b5ef50540c1c98b3166e198 100644 --- a/sched/sem_timedwait.c +++ b/sched/sem_timedwait.c @@ -271,7 +271,9 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime) wd_delete(wdog); /* We are either returning success or an error detected by sem_wait() - * or the timeout detected by sem_timeout(). + * or the timeout detected by sem_timeout(). The 'errno' value has + * been set appropriately by sem_wait() or sem_timeout() in those + * cases. */ return ret;