Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:07 23 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : SMD BP170 : User Loadable Fonts

Author Message
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:32pm 18 Aug 2015
Copy link to clipboard 
Print this post

@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
Edited by G8JCF 2015-08-19
The only Konstant is Change
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025