![]() |
Forum Index : Microcontroller and PC projects : SMD BP170 : User Loadable Fonts
Author | Message | ||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@BigMik very kindly sent me one of his SMD BP170 modules, and all I can say is "wow" ! So much functionality all made available via the headers in such a small form factor, it fits on the back of my ILI9341 TFT display just perfectly, and the built-in USB<->Serial h/w adapter and voltage regulator makes this so convenient for MX170 experiments even when not connected to a TFT panel. (I'm not on commission before you ask !!) Anyway to give the BP170 a good try-out I have generated a range of 8 self-installing fonts which are particularly targeted at the 'MX170 uMite which only supports 2 built in fonts. Some of these fonts are particularly well suited for smaller/lower resolution displays, eg mykefont2. Each font supports 2 Op Codes 0=Install the Font 1=Return the Width and Height of the Font in Pixels So for example to install a font do: [code] DIM Result%=Font_BigFont(0,1) [/code] The first argument to the font is the OpCode, the second argument is the Font Number into which to install the font. To get back the FontWidth and FontHeight of an installed font do: DIM FontWidth%
DIM FontHeight% Result%=Font_BigFont(1,1,FontWidth%,FontHeight%) The first argument to the font is the OpCode, the second argument is the Font Number, the 3rd and 4th arguments are the variables in which the width and height will be returned. On return FontWidth% and FontHeight% will contain the font's width and height in pixels respectively - see the Example programs to see how useful being able to get back the Width and Height metrics at run-time are - MM doesn't support the MM.FONTWIDTH/HEIGHT read-only variables. Once installed using these user-loadable fonts is exactly the same as using the built-in fonts Each of the fonts comes with a small MMBasic example program to demonstrate how to install the font, obtain the font metrics, and displays the font itself. Don't forget you will need to do OPTION LCDPANEL ..... from a MMBasic command line once before running the test programmes. Hopefully you find these fonts useful. Peter 2015-08-18_222051_BigFontExample.zip 2015-08-18_222100_Dingbats1_XLExample.zip 2015-08-18_222109_DotMatrix_M_SlashExample.zip 2015-08-18_222117_hallfetica_normalExample.zip 2015-08-18_222125_InconsolaFontExample.zip 2015-08-18_222133_mykefont2Example.zip 2015-08-18_222140_SevenSegNumFontPlusExample.zip 2015-08-18_222149_SmallFontExample.zip The only Konstant is Change |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |