Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 20:02 18 May 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 : TFT Font tweaking program

     Page 3 of 4    
Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 11:47pm 28 Feb 2016
Copy link to clipboard 
Print this post

  TassyJim said  
As usual with this project, I have not done much testing...


Thanks for this version - leave it with me and I will gladly stress test it for you!

Report back in about an hour or so . . . . .
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 01:08am 29 Feb 2016
Copy link to clipboard 
Print this post

Uncovered so far . . . .

1> When Ctrl-2/W is used, can the editor remain on the current character rather than go back to displaying Chr$(32)

2> If a 'created' character is deleted (with Ctrl-X), and then a new (blank) character inserted (effectively with the same CHR$ number), then the 'previous' design is displayed rather than a 'fresh' blank window

3> With Ctrl-2/W: any alterations are 'lost' when doubled IF the charcter is not saved first. It would be ideal to autosave first before doubling

4> If you create a design (best viewed from a blank chr$32), then ctrl 2/w (it will go blank - see previous point), then click restore, and a 'strange' design appears

5> Is it worth limiting how many times you can double? Program hangs if you go to extreme

6> When you first open the app there is no X x Y properties shown, but there is an area for editing. If you create something, then Save the file, you can open it again and it will return as Chr$(0). If you then use Ctrl-N to create a new character, it adds Chr$(33). A bit of logic/tidying needed here (possibly disable SAVE) until either NEW or OPEN has been used?)


That's it for now. I will continue to test throughout the day as I am currently working with fonts and hence using your 'app' to do so.

By the way, got a nice little logo animation going (in principal), will get a 'walking' creature next hopefully. Still doing all this on a MX170 setup so limited memory for my 128x128 font!!

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 12:14pm 29 Feb 2016
Copy link to clipboard 
Print this post

  WhiteWizzard said   Uncovered so far . . . .

1> When Ctrl-2/W is used, can the editor remain on the current character rather than go back to displaying Chr$(32)

Yes. As you can only scale the full font, I wasn't too worried about that.
  WhiteWizzard said  
2> If a 'created' character is deleted (with Ctrl-X), and then a new (blank) character inserted (effectively with the same CHR$ number), then the 'previous' design is displayed rather than a 'fresh' blank window

It is a way of getting your character back if you ctrl-X too many times.
But a clear slate would be best.
  WhiteWizzard said  
3> With Ctrl-2/W: any alterations are 'lost' when doubled IF the charcter is not saved first. It would be ideal to autosave first before doubling

Will fix.
  WhiteWizzard said  
4> If you create a design (best viewed from a blank chr$32), then ctrl 2/w (it will go blank - see previous point), then click restore, and a 'strange' design appears

The restore data makes little sence when the scale has been changed. I will clear it with scale changes.
  WhiteWizzard said  
5> Is it worth limiting how many times you can double? Program hangs if you go to extreme

Good idea.
  WhiteWizzard said  
6> When you first open the app there is no X x Y properties shown, but there is an area for editing. If you create something, then Save the file, you can open it again and it will return as Chr$(0). If you then use Ctrl-N to create a new character, it adds Chr$(33). A bit of logic/tidying needed here (possibly disable SAVE) until either NEW or OPEN has been used?)

Perhaps start with a NEW file with default settings so you can start doodling without fear of loosing a masterpiece.

Jim

VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 04:29pm 29 Feb 2016
Copy link to clipboard 
Print this post

Another one for WW to try.
It should have fixed the issues raised in the last post.
The only addition is the mouse wheel now scrolls the image up/down when using large fonts.

2016-03-01_022848_FontTweak.zip

Jim
VK7JH
MMedit   MMBasic Help
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 07:10pm 29 Feb 2016
Copy link to clipboard 
Print this post

Thanks Jim - will try later (currently 05:10 and I need some sleep!!)

Please note that I am more than impressed with your 'app' as it does everything I need it to do!!

Anything that I highlight is just to make it more 'user-friendly' for others to use; or to highlight obvious bugs

Off to sleep now . . . . .
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 09:15pm 04 Mar 2016
Copy link to clipboard 
Print this post

This update lets you load/create fonts with any width (within reason).
The only requirement is that the width x height is a multiple of 8.

This change needed a major redo of some critical areas so I need test reports.

I have also made the file reading a bit more forgiving with the file formats.
If you come accross ant files that don't read correctly, please send me a copy and I will investigate.

It should now prompt you to save any changes before loading a new file.

The ZIP includes the 12x20 font that is built in to MMBasic as a BAS file.

2016-03-05_071312_FontTweak.zip

Jim
VK7JH
MMedit   MMBasic Help
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 12:41am 05 Mar 2016
Copy link to clipboard 
Print this post

Thanks Jim for this 'updated' version. I am busy this weekend but will test ASAP and report back . . .

One thing that is a request from me - just something for you to think about whether it is easy or not.

If x = y (and only if x=y), can you include (enable?) a 'Rotate' button that rotates the current design on view by 90degrees. Only need to rotate one way; as three 'spins' would be the same as an 'opposite' single rotation.

I believe this feature could prove useful to others too!

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 10:50am 05 Mar 2016
Copy link to clipboard 
Print this post

  WhiteWizzard said   can you include (enable?) a 'Rotate' button that rotates the current design on view by 90degrees.

WW

Am considering rotate and flip horizontal and flip vertical.
Also 'inverse' where all pixels are toggled.

But first I have to get the menus sorted out.

Jim

VK7JH
MMedit   MMBasic Help
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 11:03am 05 Mar 2016
Copy link to clipboard 
Print this post

. . . . and when exactly are you releasing the multi-coloured font version?

Seriously, all those 'flipping' things you listed will be very useful too

What language are you writing the 'app' in? (sorry - I hope you don't mind me asking )


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 08:32pm 05 Mar 2016
Copy link to clipboard 
Print this post

For WW:
FontTweak is written in PureBasic.


For everyone else, normal black and white still goes...


This update adds flip and rotate as well as menus.
Ctrl-left and ctrl-right step you through the characters.
I even included a help file.

2016-03-06_063151_FontTweak.zip

JimEdited by TassyJim 2016-03-07
VK7JH
MMedit   MMBasic Help
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 03:46am 10 Mar 2016
Copy link to clipboard 
Print this post

Hi Jim,
On my XP system I can't get this latest version (with Flip etc.) to open the 6x8 Nokia font that MatherP converted as below.

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

It seems to start opening it (with File/Open) but then goes off into la la land and doesn't respond - the character select box stays blued out.

The 12x20 font you included in the zip file opens OK and all the characters are available - what am I doing wrong?

Greg

Edit: the font file above works OK with Peter's new Nokia driver.Edited by paceman 2016-03-11
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 10:33am 10 Mar 2016
Copy link to clipboard 
Print this post

Bugger....
I had tested that font.

Put one or more blank lines or comment lines at the start of the file and all will be OK

I will fix it in the next release.

Jim
VK7JH
MMedit   MMBasic Help
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 04:38pm 10 Mar 2016
Copy link to clipboard 
Print this post

Yep, that fixed it, many thanks - I've got a much nicer looking "@" now.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 04:19pm 11 Mar 2016
Copy link to clipboard 
Print this post

This update has a few changes in the 'File Open" code.
You no longer have to select C or BAS file types.
You don't even need the C or BAS file extensions. The program works out which format the font definition is in.
If there are more than one font definition in the file, put a 'REM' at the start of the first font definition.
eg
" ' DefineFont #8 " or
" // fontdatatype Grotesk16x32[6084] PROGMEM={ "
will skip over those definitions and look for the next font.

2016-03-12_021722_FontTweak.zip
I have also improved the file reading, allowing a few more layout styles through.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 08:03pm 11 Mar 2016
Copy link to clipboard 
Print this post

Working on the next step:



The image is of a 48 x 60 character but the font below is 64 x 80


cls
text mm.hres/2, mm.vres/2, " ",CM,8,1
end

' Font type : Special (1 character)
' Font size : 64x80 pixels
' Memory usage : 644 bytes

DefineFont #8
01205040 00000000 00000000 00000000 00000000 00000000 00000038 03000000
000000FE 3F000000 0000E0FF FF010000 0000F8FF 83070000 0000FCFF 100E0000
0000FE3F 601E0000 00007F18 007A0000 00807F00 007A0000 00803F00 00F80000
00C01F00 00F00100 00E00F00 00F00100 00F00700 01F00300 00F80378 00E00300
00FC607E 17E00700 00FC80FF 47E00700 00FEE0FF 5AD00F00 007FE07F 79C00F00
003FF0FF FFC00F00 003FF0FF FF821F00 801FF03F FF811F00 803FFEFF FF871F00
C03FC4FF F7833F00 C03FFEFF FF873F00 C0FFFFFF BF079F03 C0FFFFFF 130FEF03
C0FFFFFF 300BFE07 C0FFFF1F 001EFE07 C0BFFF07 0F3CFE07 C00FF887 3F3EFE06
C007F8E7 2F1FFC04 C083E1F3 803FEC04 C0E3E711 193F8800 C053F081 FF1F9801
C00FE0E0 3F0F1800 800FE0C0 7F0738FD 80FFF180 FF0F98FC 80FFF9C1 FF0FC9FC
807FFCC1 7F0779FE 00FFFF81 3F00F3FE 00FFFFE0 3F00F1FF 00FF7FC0 FF00D5FF
00FFF301 7E80F7FF 00FFF901 7C3087FF 00FFF801 F8788FFF 007FF800 FB180F00
007F3800 FF190700 003F1C00 FFFF0700 003E3FC0 FFFF075E 00FE3FFC BE7F0FFF
00FC7FFF C0FF0D4F 00FCFD7F C03B0FEF 00FC0000 D07F0F6E 00FC0000 F03F0E6E
00F8EF21 F03F0764 00F8EF3E F41F07F0 00F81F38 FD9F0760 00F0FF7F FCCF0FB0
00E0FF3F FECF15FC 00E0FF1F FECF82FF 00C0FF02 FEE7F0BE 0080FF00 FD77FCA7
0000FF67 FF11FEB1 0000FF53 FF83FBE3 0000FEFF FFE1FB3F 0000FCFF FFF9FDCF
0000FCFF FFF8FE23 0000FCFF 3F38FF89 0000F0FF 0FD2FFFE 0000E0F7 00D13FFF
0000C07F 8091DFFF 0000801F 8891EF7F 0000803F FC9FFFE3 0000001F BED2DFFF
0000000F FF60EFCF 0000001F FF80FFEF 0000009F 7FE0FFF7 000000CF BFF3FFFF
000000FF
End DefineFont

Trying to get a decent black and white from a photo can be challenging and takes a bit of tweaking.

Jim
VK7JH
MMedit   MMBasic Help
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 08:59pm 11 Mar 2016
Copy link to clipboard 
Print this post

  TassyJim said  

Trying to get a decent black and white from a photo can be challenging and takes a bit of tweaking.


Hey - I recognised you (sorry I meant Geoff) straight away (seriously)!

Thanks for yet another release - great job. Really want to play with this today but have workmen round this weekend so may have to wait till Monday

Can you just clarify, where does the REM first line have to go if I have a 'RinkyDink' C file of characters that I wish to tweak? Thanks

WW

EDIT: Think I got it now regarding the REM Edited by WhiteWizzard 2016-03-13
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 09:36pm 11 Mar 2016
Copy link to clipboard 
Print this post

The image to font code is not in yet.
I still have a lot to do to make it usable but I am making progress.

All the RinkyDink files only have one font in them so no point in skipping the first one!

There are some BAS programs that have two or more fonts embedded.
This is where you might want to skip over fonts to get to the one you want.

Jim
VK7JH
MMedit   MMBasic Help
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 10:28pm 11 Mar 2016
Copy link to clipboard 
Print this post

Someone had to do this . . . . . . .

Move over Andy Warhol !!!



For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 02:48am 12 Mar 2016
Copy link to clipboard 
Print this post

We want Marilyn! We want Marilyn!

Jim - getting better and better; move over Apple art! The auto file select is very handy too - I was about to suggest the OPEN default be changed to .BAS but you're way ahead. Great stuff.

Greg
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 11:32am 12 Mar 2016
Copy link to clipboard 
Print this post

You're showing your age Greg.
In my days of ASCII art it was Raquel Welch

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 3 of 4    
Print this page
© JAQ Software 2024