Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:56 25 Nov 2024 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 : Modify existing graphics font?

Author Message
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 06:03am 29 Jul 2024
Copy link to clipboard 
Print this post

I've been playing with the Chinese Ebay ST7920 LCD's, I know that you can use additional fonts, and I have tried those successfully, but is it possible to modify the inbuilt fonts?

Reason for the question is I am using font 4, which is I believe 10 x 16, it fits the space on the display perfectly, but I don't like the 0 character.
It has a center dot, i'd prefer to have the zero with a slash through it.
Rather than create an entire new font from scratch, is there any simple way to change just that one characater? or extract the entire font 4 and then edit the 0 character, I could then upload it as a new font between definefont lines.

Tony
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 06:43am 29 Jul 2024
Copy link to clipboard 
Print this post

AFAIK the built-in fonts are fixed. You can, as you say, create a new font with the changed zero. On the PicoMite this is a good use of the Library area of the flash as then the font isn't taking up a big chunk of your workspace. If you number it as font 4 it will replace the built-in one.

I don't know how to copy a built-in font though. There'll probably be a way to do it but it's something I've never done.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 07:06am 29 Jul 2024
Copy link to clipboard 
Print this post

Thanks Mick,

I guess that was really my question, how do I extract the actual font #4 to make a change?
Googling didn't find much, nor searching the forum, perhaps I need to create the font afresh, I cannot seem to find any more 10 x 16 fonts yet to clone!

Tony
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 07:23am 29 Jul 2024
Copy link to clipboard 
Print this post

There'll be someone along who can sort this out. :)
I think the fonts were taken from a web site, which I can't find a link to at present.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
v.lenzer
Regular Member

Joined: 04/05/2024
Location: Germany
Posts: 49
Posted: 07:28am 29 Jul 2024
Copy link to clipboard 
Print this post

Maybe this helps a little bit:https://www.thebackshed.com/forum/ViewTopic.php?TID=16495&PID=213882#213882
Edited 2024-07-29 17:29 by v.lenzer
Best wishes! Joachim
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 07:36am 29 Jul 2024
Copy link to clipboard 
Print this post

While you wait for somebody that knows how to do it, here is one possibility.

A slightly less tedious method than creating from scratch may be to recover the font by using a PicoVGA or LCD panel that supports reading pixels back.
Print the font to the display one character at a time then use nested for-next loops to read the pixels, saving them in 2D arrays.

Edit the "0" array, then create the font from the data in those arrays.

EDIT
Too slow! The answer is above.
Edited 2024-07-29 17:38 by phil99
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6097
Posted: 07:41am 29 Jul 2024
Copy link to clipboard 
Print this post

' Fnt_10x16.bas
' Font type    : Full (224 characters)
' Font start   : CHR$(32)
' Font size    : 10x16 pixels
' Memory usage : 4484 bytes
DEFINEFONT #8
 E020100A
 00000000 00000000 00000000 00000000 00000000 80000000 00020820 00082080
 00208000 00000000 20810400 00001248 00000000 00000000 00000000 00000000
 C21F2288 1F228820 008820C2 00000000 80000200 041249F8 0201F800 08F89044
 00000002 00000000 800C79C0 09102040 0018F084 00000000 80010000 01092490
 10429490 00F42084 00000000 40000100 00000810 00000000 00000000 00000000
 40000000 01041020 04104000 00108000 00000000 00010000 00010420 01041040
 00408000 00000000 00000000 810A0800 0A1CFCC1 00008080 00000000 00000000
 00020800 0208FC81 00008000 00000000 00000000 00000000 00000000 04104000
 00000002 00000000 00000000 0000FC01 00000000 00000000 00000000 00000000
 00000000 0030C000 00000000 00000000 40000000 04081020 00000102 00000000
 C0010000 C4114188 107164D1 00702042 00000000 80000000 00022860 02082080
 00F88000 00000000 E1030000 40000104 04081020 00FC0102 00000000 E1030000
 41000104 000104E0 00F81044 00000000 20000000 82040A18 007F0821 00082080
 00000000 F1070000 07104000 000104E1 00F81044 00000000 E1030000 07104000
 104104E1 00F81044 00000000 F0070000 80000104 02082040 00208000 00000000
 E1030000 83084104 104104E1 00F81044 00000000 E1030000 44104104 0001FC10
 00F81040 00000000 00000000 00020000 00000080 00208000 00000000 00000000
 00010000 00000040 04104000 00000002 00000000 01020408 02108000 00084000
 00000000 00000000 C01F0000 007F0000 00000000 00000000 00000000 00021080
 02040840 00800001 00000000 E1030000 40004104 00082060 00208000 00000000
 E1030000 45174104 104E5451 00F80004 00000000 C0010000 44104188 1041FC11
 00041144 00000000 E1070000 47104104 104104E1 00F81144 00000000 E1030000
 04104004 10400001 00F81044 00000000 C1070000 44104108 10410411 00F02144
 00000000 F1070000 07104000 104000E1 00FC0104 00000000 F1070000 07104000
 104000E1 00000104 00000000 E1030000 04104004 104104F1 00FC1044 00000000
 11040000 47104104 104104F1 00041144 00000000 E0030000 00020820 02082080
 00F88000 00000000 F0010000 80000208 00020820 00F02084 00000000 21040000
 06144810 11484001 00042104 00000000 01040000 04104000 10400001 00FC0104
 00000000 11040000 4412558C 10410491 00041144 00000000 11040000 44125184
 10410C51 00041144 00000000 E1030000 44104104 10410411 00F81044 00000000
 E1070000 47104104 104000E1 00000104 00000000 E1030000 44104104 12490411
 04F89044 00008000 E1070000 47104104 104108E1 00041144 00000000 E1030000
 010C4004 10011880 00F81044 00000000 F0070000 00020820 02082080 00208000
 00000000 11040000 44104104 10410411 00F81044 00000000 11040000 44104104
 08410411 00204081 00000000 11040000 44104104 12492411 00885045 00000000
 11040000 00052204 10225080 00041144 00000000 11040000 81084104 02082040
 00208000 00000000 F0070000 00010204 10204080 00FC0104 00000000 C0010000
 01041040 04104000 00700001 00000000 00000000 02100000 01084000 00042000
 00000000 C0010000 00010410 01041040 00704000 00000000 21020508 00000004
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000C01F
 20020700 00072288 00000000 00000000 00000000 00000000 000F0000 103E0820
 00FC2084 00000000 01040000 86174000 10410411 00F81144 00000000 00000000
 840F0000 10400011 00F81004 00000000 10000000 440F0104 10410431 00FC1044
 00000000 00000000 840F0000 107F0411 00F80004 00000000 70000000 800F0820
 02082080 00208000 00000000 00000000 C40F0000 10410411 01F43044 00E04300
 01040000 86174000 10410411 00041144 00000000 80000000 000E0020 02082080
 00F88000 00000000 20000000 80030008 00020820 02082080 00C08100 01040000
 C4104000 1148C0C1 00042104 00000000 00030000 01041040 04104000 00380001
 00000000 00000000 841D0000 12492491 00249144 00000000 00000000 86170000
 10410411 00041144 00000000 00000000 840F0000 10410411 00F81044 00000000
 00000000 86170000 10410411 40781146 00000410 00000000 C40F0000 10410411
 01F43044 00104000 00000000 86170000 10400011 00000104 00000000 00000000
 C40F0000 003E0001 00F81140 00000000 00000000 C00F0820 02082080 001C8000
 00000000 00000000 44100000 10410411 00F43044 00000000 00000000 44100000
 08410411 00204081 00000000 00000000 44100000 12490411 00D89044 00000000
 00000000 42100000 05085020 00042102 00000000 00000000 44100000 10410411
 01F43044 00E04300 00000000 C01F0000 04081020 00FC0102 00000000 60000000
 03020820 02082000 00188000 00000000 80000200 00020820 02082080 08208000
 00800002 00030000 00020820 02082060 00C08000 00000000 11030000 00004624
 00000000 00000000 00000000 00000000 01020000 10418840 00FC1144 00000000
 FE0F0000 18608001 60800106 FF010618 000000C0 FE0F0000 58608001 62940916
 FF010618 000000C0 FE0F0000 9864A101 648C31C6 FF01169A 000000C0 FE0F0000
 18608001 608C31C6 FF010618 000000C0 FE0F0000 18608001 6F800106 FF0106D8
 000000C0 FE0F0000 18638C01 608C31C6 FF01C618 000000C0 FE0F0000 98648C01
 60841126 FF014618 000000C0 E1030000 C71A7FFC 1D63FCF1 00F8F0C7 00000000
 E1030000 44154104 125D0411 00F81044 00000000 00000000 03070800 073EFCE1
 00008000 00000000 00000000 01071C00 1D77DCC1 007080C0 00000000 00000000
 03070800 0A7FFCE1 00708080 00000000 00000000 870D0000 073EFCF1 00008000
 00000000 FFFFFFFF 7CF8FFFF F3DE7BCF FFFF1F3E FFFFFFFF 00000000 00000000
 031E78C0 00000000 00000000 F0000000 00020F24 1E082080 00C08107 00000000
 80000000 40122A70 0A492080 0020C081 00000000 00000000 82040000 0421FE11
 00000080 00000000 80000000 40122A70 02082080 00208000 00000000 80000000
 00020820 0A492080 0020C081 00000000 00000000 00010800 0102FC21 00008000
 00000000 00000000 02040800 0420FC01 00008000 00000000 80000000 44122A20
 10492491 00F81044 00000000 11820700 24935E02 001EB4C8 1E00E001 00000000
 C0000300 81071E00 030C78E0 0C30C000 00000000 61041F00 E49D477C 9E7AEA19
 00FE99A7 00000000 20010300 42082184 043FFC10 12482081 00000000 E0010300
 C30F3FFC 043FFCF0 12482081 00000000 00010000 271D71C8 9C74CA29 00402043
 00000000 F1030000 C4124B2C 020BECB0 002CB0C0 00000000 F0030000 C10D2488
 0C285020 00000002 00000000 00000000 C1031B42 820DFCE1 00008000 00000000
 E0010000 A5944084 90524A29 00781022 00000000 E0010000 24934884 904832E9
 00781022 00000000 E0010000 A5974084 905E7AE9 00781022 00000000 00000000
 041144E0 0006F040 000218C0 00000000 60000000 810F1020 043E4000 00188000
 00000000 D0000000 2210214C 08218410 00FC1042 00000000 E0010000 42887F48
 08218410 00FC1042 00000000 C1010000 2820418C 90C1060B 00000040 00000000
 FE0F0000 18608001 7F800106 1E30C0F0 00000000 C0000000 81071E78 030C78E0
 0C300000 00000000 B0020500 C09F4182 04082060 00000002 00000000 80010000
 02092490 00016450 00041040 00000000 20010300 C08C6DCC 031C30C0 1C30C001
 00000000 03F03F00 F03F00FF 3F00FF03 00FF03F0 FF03F03F 55555555 55555555
 55555555 55555555 55555555 3033F3CC 33F3CCCC F3CCCC30 CCCC3033 CC3033F3
 11111111 11111111 11111111 11111111 11111111 A95A95AA 5A95AA55 95AA55A9
 AA55A95A 55A95A95 EEEEEEEE EEEEEEEE EEEEEEEE EEEEEEEE EEEEEEEE 40000104
 00010410 01041040 04104000 10400001 40000104 00010410 0104F043 04104000
 10400001 40000104 003F0410 0104F043 04104000 10400001 20810412 81041248
 0412C823 12482081 48208104 00000000 00000000 0412F803 12482081 48208104
 00000000 003F0000 0104F043 04104000 10400001 20810412 803C1248 0412C823
 12482081 48208104 20810412 81041248 04124820 12482081 48208104 00000000
 803F0000 0412C823 12482081 48208104 20810412 803C1248 0000F823 00000000
 00000000 20810412 81041248 0000F823 00000000 00000000 40000104 003F0410
 0000F043 00000000 00000000 00000000 00000000 0104F003 04104000 10400001
 40000104 00010410 00001F40 00000000 00000000 40000104 00010410 0000FF43
 00000000 00000000 00000000 00000000 0104FF03 04104000 10400001 40000104
 00010410 01041F40 04104000 10400001 00000000 00000000 0000FF03 00000000
 00000000 40000104 00010410 0104FF43 04104000 10400001 40000104 F0010410
 01041F40 04104000 10400001 20810412 81041248 04124F20 12482081 48208104
 20810412 F1041248 00007F00 00000000 00000000 00000000 F1070000 04124F00
 12482081 48208104 20810412 F03C1248 0000FF03 00000000 00000000 00000000
 F03F0000 0412CF03 12482081 48208104 20810412 F1041248 04124F00 12482081
 48208104 00000000 F03F0000 0000FF03 00000000 00000000 20810412 F03C1248
 0412CF03 12482081 48208104 40000104 F03F0410 0000FF03 00000000 00000000
 20810412 81041248 0000FF23 00000000 00000000 00000000 F03F0000 0104FF03
 04104000 10400001 00000000 00000000 0412FF03 12482081 48208104 20810412
 81041248 00007F20 00000000 00000000 40000104 F0010410 00001F40 00000000
 00000000 00000000 F0010000 01041F40 04104000 10400001 00000000 00000000
 04127F00 12482081 48208104 20810412 81041248 0412FF23 12482081 48208104
 40000104 F03F0410 0104FF43 04104000 10400001 40000104 00010410 0000F043
 00000000 00000000 00000000 00000000 01041F00 04104000 10400001 FFFFFFFF
 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 00000000 FFFFFF03 FFFFFFFF
 FFFFFFFF E081071E 81071E78 071E78E0 1E78E081 78E08107 7CF0C107 F0C1071F
 C1071F7C 071F7CF0 1F7CF0C1 FFFFFFFF FFFFFFFF 000000FC 00000000 00000000
 00000000 840E0000 11441041 00EC4004 00000000 C0010000 84104288 104108C1
 40381144 00000010 F1070000 04104000 10400001 00000104 00000000 00000000
 C21F0000 08228820 00842082 00000000 F0070000 00021080 08102040 00FC0104
 00000000 00000000 C40F0000 10420841 00F02084 00000000 00000000 84100000
 10420821 40742186 00000410 00000000 C40F0000 02082080 00188000 00000000
 F0030000 42081E00 07218410 00FC0080 00000000 C0010000 47104188 104104F1
 00702042 00000000 C0010000 44104188 08410411 00DC4181 00000000 E0030000
 03021080 104108C1 00F81044 00000000 00000000 840D0000 0D492491 00000080
 00000000 00000000 840D0204 0D5924D1 00000182 00000000 00000000 840F0000
 103C0011 00F81004 00000000 00000000 441041F8 10410411 00041144 00000000
 00000000 00007F00 0000FC01 0000F007 00000000 80000000 C01F0820 00082080
 0000F007 00000000 00000000 00010840 04081020 00F80000 00000000 00000000
 02040810 01084000 00F80000 00000000 00020800 00092284 03204080 04081080
 0000C003 00020800 80082180 08112040 013C50C0 00004000 00000000 00020800
 0200FC01 00008000 00000000 00000000 42060000 09190060 00000080 00000000
 00010400 00000840 00000000 00000000 00000000 00000000 00000000 000C3000
 00000000 00000000 00000000 00000000 000C0000 00000000 00000000 40C00100
 00010410 05641040 0010C000 00000000 10810B00 41041144 00000010 00000000
 00000000 20010300 01020408 000000E0 00000000 00000000 00000000 C30F3F00
 0F3FFCF0 0000F0C3 00000000 81000000 84083E24 08410411 0824E183 00000000
END DEFINEFONT



Compliments of FontTweak.

Jim
VK7JH
MMedit   MMBasic Help
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 10:51pm 29 Jul 2024
Copy link to clipboard 
Print this post

All the fonts are each in their own file in the source. e.g.Fnt_10x16.h
With a bit of a tweak of the header (can't remember exactly what) they will load directly into FontTweak

Picomite Source
Latest F4 Latest H7
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6097
Posted: 12:03am 30 Jul 2024
Copy link to clipboard 
Print this post

The current FontTweak had a problem with the 10x16 font. There were TABs where I didn't allow for.
An updated version will be upload in a day or two.
Apart from that, change the extension from .h to .c but I will fix that too.
VK7JH
MMedit   MMBasic Help
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 04:44am 30 Jul 2024
Copy link to clipboard 
Print this post

Thanks to everyone who kindly replied, and especially to Jim who's solution was perfect
Now the Zero has a diagonal line instead of a center dot.

Tony.
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 567
Posted: 05:23am 30 Jul 2024
Copy link to clipboard 
Print this post

I think you can change the internal fonts. Hope this can help ST7920 PDF


On a few other displays I have read the font e/roms and made changes to them.

Quazee137
 
Print this page


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

© JAQ Software 2024