![]() |
Forum Index : Microcontroller and PC projects : Micro-font
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
with thanks to the originator ' tinyfont.bas ' Font type : Full (96 characters) ' Font size : 4x6 pixels ' Memory usage : 292 bytes DefineFont #8 60200604 44000000 00A04040 A0AEAE00 82406C6C EACC2048 00004460 84204424 E4A48044 00E404A0 00800400 040000E0 00480240 44E0AAEA E8E24044 E062E2E0 E820E2AA EAE8E0E2 2022E2E0 EAE0EAEA 0404E0E2 80040400 0E208424 2484000E 4040E280 4A60E84A CACAA0EA 608868C0 E8C0AACA E8E8E0E8 60EA6880 E4A0EAAA 2A22E044 A0CAAA40 AEE08888 EEAEA0EA 40AA4AA0 4A80C8CA ECCA60AE C04268A0 AA4044E4 A4AA60AA A0EEAA40 AAA04AAA 48E24044 E088E8E0 E2004208 004AE022 F0000000 0C000084 AA8CE06A 608806C0 0660AA26 E42460AC 24AE0640 04A0CA88 02024004 A0CC8AA4 00E044C4 CA00A0EE 40AA04A0 06C8AA0C 880662AA C0C60680 0A60444E AE0A60AA E0AE0A40 0AA0440A 6C0E24A6 608464E0 C4400444 006CC024 E0EEEE00 End DefineFont |
||||
viscomjim Guru ![]() Joined: 08/01/2014 Location: United StatesPosts: 925 |
Holy cow that's small, however, strangely readable like a dot matrix printer font. Nice... |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Minor fixes to "ijmn". I input the font by hand using TassyJim's excellent FontTweak ' tinyfont.bas ' Font type : Full (96 characters) ' Font size : 4x6 pixels ' Memory usage : 292 bytes DefineFont #8 60200604 44000000 00A04040 A0AEAE00 82406C6C EACC2048 00004460 84204424 E4A48044 00E404A0 00800400 040000E0 00480240 4CE0AAEA 48C24044 C062C2E0 E820E2AA EA68E0E2 8048E2E0 EAE0EAEA 0404C0E2 80040400 0E208424 2484000E 4040E280 4A60E84A CACAA0EA 608868C0 E8C0AACA E8E8E0E8 60EA6880 E4A0EAAA 2A22E044 A0CAAA40 AEE08888 EEAEA0EA 40AA4AA0 4A80C8CA ECCA60AE C04268A0 AA4044E4 A4AA60AA A0EEAA40 AAA04AAA 48E24044 E088E8E0 E2004208 004AE022 F0000000 0C000084 AA8CE06A 608806C0 0660AA26 E42460AC 24AE0640 40A0CA88 22204044 A0CC8AA4 0EE044C4 AA0CA0EE 40AA04A0 06C8AA0C 880662AA C0C60680 0A60444E AE0A60AA E0AE0A40 0AA0440A 6C0E24A6 608464E0 C4400444 006CC024 E0EEEE00 End DefineFont |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
Just because I had a 2.4" ILI9341 handy on an h7-144 backpack, here is this font on that display: ![]() and with the Sinclair_S 8x8 font (from http://rinkydinkelectronics.com): ![]() Compared: ![]() The Sinclair_S font: [code] ' Sinclair_S.bas ' Font type : Full (95 characters) ' Font size : 8x8 pixels ' Memory usage : 764 bytes DefineFont #8 5F200808 00000000 00000000 08080808 00080008 00001414 00000000 247E2400 00247E24 7C507C10 00107C14 08646200 00462610 10281000 003A442A 00100800 00000000 10100800 00081010 08081000 00100808 10280000 0028107C 10100000 0010107C 00000000 10080800 00000000 0000007C 00000000 00181800 08040000 00402010 948C7800 0078C4A4 20A06000 00F82020 04847800 00FC8078 18847800 00788404 50301000 0010FC90 F880FC00 00788404 F8807800 00788484 0804FC00 00202010 78847800 00788484 84847800 0078047C 10000000 00100000 00100000 20101000 10080000 00081020 7C000000 00007C00 10200000 00201008 04423C00 00080008 564A3C00 003C405E 84847800 008484FC F884F800 00F88484 80847800 00788480 8488F000 00F08884 F880FC00 00FC8080 F880FC00 00808080 80847800 0078849C FC848400 00848484 10107C00 007C1010 04040400 00788484 E0908800 00848890 80808000 00FC8080 B4CC8400 00848484 A4C48400 00848C94 84847800 00788484 8484F800 008080F8 84847800 007894A4 8484F800 008488F8 78807800 00788404 1010FE00 00101010 84848400 00788484 84848400 00304884 84848400 0048B484 30488400 00844830 28448200 00101010 1008FC00 00FC4020 20203800 00382020 20400000 00040810 08083800 00380808 54381000 00101010 00000000 FE000000 A199423C 3C4299A1 04380000 003C443C 78404000 00784444 201C0000 001C2020 3C040400 003C4444 44380000 003C4078 18100C00 00101010 423E0000 3C023E42 78404000 00444444 18000800 001C0808 04000400 18240404 60504000 00485060 10101000 000C1010 54680000 00545454 44780000 00444444 44380000 00384444 44780000 40407844 443C0000 06043C44 201C0000 00202020 40380000 00780438 10381000 000C1010 44440000 00384444 44440000 00102828 54440000 00285454 28440000 00442810 44440000 38043C44 087C0000 007C2010 60101C00 001C1010 10101000 00101010 0C107000 00701010 00281400 00000000 End DefineFont [/code] The display layout was designed for the Sinclair_S font--this layout is just used for comparison because it was handy. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3269 |
You would need VERY small fingers to use that screen. Geoff Graham - http://geoffg.net |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Try FONT 7 on the H7 or the loadable font below (same thing). 6x8 and much nicer than the square font. The rinkydinkelectronics fonts are all limited by being n*8 wide but Geoff's code in the Micromite only limits them such that h*w is divisible by 8 DefineFont #8 5C200806 00000000 82200000 00800008 00004551 4F510000 0045F994 2B1CEA21 690000C2 B04C2090 AA104A62 84608046 00000000 40108410 81400081 00841004 A89C8A00 82000080 0080203E 30000000 00000042 0000003E 01000000 21000086 00004208 CAAA2972 82210027 00872008 21842072 42F8800F 00270A04 F824C510 0FFA0041 00270A02 8A3C0831 21F80027 00044108 8A9C2872 28720027 0027089E 61008601 86010080 00846000 40208410 0F000081 0000F880 10028140 20720084 00022084 BA9A2072 28720027 8028FAA2 8ABC28F2 2872002F 00278220 8AA248E2 08FA004E 800F823C 823C08FA 28720008 80278A2E 8ABE288A 82708028 00872008 12044138 4A8A0046 8048A230 82200882 6A8B800F 80288AAA 9AAA2C8A 28728028 00278AA2 82BC28F2 28720008 8046AAA2 A2BC28F2 087A8048 002F081C 200882F8 288A0082 00278AA2 89A2288A 288A0042 00A5AAAA 5208258A 288A8028 00822094 420821F8 0471800F 00074110 A9944AA9 4170804A 00471004 00804821 00000000 800F0000 00008140 07000000 80277A02 8A320B82 0700002F 00278220 8AA62608 07008027 0007FA22 41382431 E8010004 002778A2 8A320B82 06208028 00872008 12040310 09820046 0089C228 20088260 0D000087 8028AA2A 8A320B00 07008028 00278A22 F2220F00 06000008 802078A6 82320B00 07000008 002F7020 41100E41 08000023 80668AA2 89A20800 08000042 00A5AAA2 21940800 08008048 002778A2 21840F00 0400800F 0EE24028 End DefineFont |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
Thanks. That's a nice-looking font: ![]() Stylus only, shown above screen (though nothing actually interactive on this screen). No fingers need be applied. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
Is there any font which contains the PC line graphic characters, Code Page 437 shown here: https://en.wikipedia.org/wiki/Code_page_437 This is characters 0xB3 throubh 0xDA. Or, if not, how would one go about building such a font? For my purposes, the characters could occupy the lower-case slots, 0x60-0x7f. I guess these are also known as VT100 "box drawing" characters. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
2019-02-23_055237_FontTweak.zip 3 years old but still works. I probably should re-visit it sometime. Jim VK7JH MMedit |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
'Thanks, Jim. I had found and have read that thread. Now I'm looking for a pixel representation of those characters to give me a start. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
There should be a copy somewhere on the net but the best I can offer is a PDF and TIFF taken from a Brother printer manual. 2019-02-23_124050_scanner.zip Jim VK7JH MMedit |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
Thanks, Jim. Could be useful as the basis for a 6x12 font, but they aren't the same as the PC line graphics code page 437 characters. I've done a fair amount of searching and have not yet found a pixel representation. I have a question about the coding of the first 8 hex values of the font definition. For instance, with "5C200806" it's clear that the last 4 say that it's a 8x6 font, but what does "5C20" stand for? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
The first hex number is Number of characters ASCII value of the first character Font height Font width So 5C = 92 characters 20 = starting with 'space' 08 = 8 pixels high 06 = 6 pixels wide VK7JH MMedit |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
OK I found this website https://int10h.org/oldschool-pc-fonts/ which has a lot of various version of the IBM font. This website http://hukka.ncn.fi/?fony Has a nice looking font program that can read the FON files and export them as binary files. Given time, I can extract the data from the binary files. There are a number of IBM font sizes. What size are you interested in? Jim VK7JH MMedit |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
I figured that out in the middle of the night, after awakening and wondering what 5C was in decimal. Then it was clear what 20 would be. Funny, that--it's been that way with me since high school--I'd go to sleep mulling over a problem and sometime before I got up the answer came to me. Thanks for those links--I'll check them out. But I may end up just making my own. I also realized overnight that for 8x8 fonts, horizontal lines (doubled pixel rows in the center), would just be [STRIKE]000000ff ff000000[/STRIKE] ff000000 000000ff, and vertical would be 18181818 1818181818, and corners and up/down/right/left tics would be pretty simple variations. 8x8 could then be scaled, either to define a new font or with the text command scaling parameter. (This may seem silly when real graphics are available, but I have a particular use.) Sorry for hijacking this thread. I can only hope that it's helpful from time to time for relative newcomers to be able to see examples of the work which has been done in the past on mmbasic. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
I'd like to see what you come up with if you are willing to share. Micromites and Maximites! - Beginning Maximite |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
Here is a Nokia 5110 lcd with the tiny font (font 3 in the L4 distro for the N5110): ![]() The screen shot in the original post of this thread has the letters inverted. How do you do this with the TEXT command with a monochrome font? [code] ' option LCDPanel N5110,L,11,10,9,&HC0 ' L432 option default integer dim string A nRows=8 ' 12 for ILI9341 j=mm.vres/nRows ' row height for 8|12 rows jj=mm.hres/12 ' horizontal divisions fnt=3 cls font fnt A=mid$(date$,4,2)+"-"+mid$(date$,1,2)+" "+mid$(time$,1,5) text 0,0,A+" AUTO UTIL" for i=1 to 7 : text 0,i*j,"rly"+str$(i) : next i for i=1 to 7 : text 5*mm.fontwidth,i*j,"tmp"+str$(i)+" "+str$(58+i) : next i for i=1 to 2 : text 14*mm.fontwidth,i*j,"tmp"+str$(i+7)+" "+str$(67-i) : next i for i=3 to 5 : text 14*mm.fontwidth,i*j,"tp"+str$(i+7)+" "+str$(67-i) : next i for i=1 to 2 : text 14*mm.fontwidth,(i+5)*j,"flo"+str$(i)+" 68": next i [/code] PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
New section from the manual: |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
Thanks. That might seem to imply that 0,1 as foreground and background in the TEXT command would inverse the monochrome text, and indeed it does: ![]() This produces the inverted text in the first column: for i=1 to 7 : text 0,i*j,"rly"+str$(i),,,,0,1 : next i Leaving out ",,,,0,1" results in normal black on white. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |