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 1 of 4 | |||||
Author | Message | ||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
A wet day here in Tassie. Very basic instructions: You can open either .c or .bas font files Once opened, select the character from the drop down list. Click pixels to toggle on or off. You can 'Restore' the character to it's starting shape. The character is saved when you change characters. You can 'Copy' a character, change to a different character and 'paste' over the full character. Finally, you can save as either .c or .bas format. If you want both, save twice. I intend to add 'new' and the ability to display the full character set. I still need to work on the header section of the .c files but I have done enough for today. The attached ZIP includes the exe file and a modified sevensegment font for Paul. 2016-02-24_042651_FontTweak.zip Jim VK7JH MMedit MMBasic Help |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
That is brilliant Jim, I was going to write a font editing program of my own but yours is much better. I have discovered that when you start loading fonts that you need to hack the standard fonts to get just the characters that you need without loading the full font. Now for the requests: - Could we have the facility to add a new character and delete an existing character? - Also renumber a character (eg, make char 0x21 become 0x31)? - Could we have the ability to scale the whole font larger by x2, x3, etc? Geoff P.S. Yes, it is rainy in Tassy. I'm hiding in the camper looking forward to the forecast sunny weather. Geoff Graham - http://geoffg.net |
||||
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1328 |
Nice one Jim - just tried it. Would it be difficult to also have it draw in the pixels if you held down the cursor, or shift, or somesuch? It takes a while to draw a new character by clicking on each pixel. Greg Edit: Geoff beat me to the punch. Geez, we're an ungrateful lot. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
I knew there would be requests! @Greg, Yes I would like to draw rather than click. @Geoff, To add/delete, you would upset the numbering of all the following characters so it can only be the last character. This will be possible when I implement the 'new' command. Renumbering a character can be done with copy and paste. You just need to do something with the old character before you paste over the top of it. Scaling up is OK. Even down is OK but in both cases, there will be a lot of tidying up afterwards. I was considering having two windows and you drag characters from one set onto the new set. Before the request comes in, I have also given some thought to taking images and dithering them into 'characters'. That would also work for converting any font or hand drawn glyph. I think I will have to loose the buttons and go with menus to handle all the extras. I also need a bigger screen to play with. Jim VK7JH MMedit MMBasic Help |
||||
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1804 |
Thanks Jim for this and thanks also for the sevensegmentnum. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Yet another extremely useful application from you Jim - THANK YOU so much! I have not yet tried it; and am just about to go out for a few hours (wife wants to go shopping ). Looking forward to using this as I am needing a new sized font and hopefully this will make things very easy. Thanks again . . . . WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 844 |
Hi Jim, This is a little hand coded font I did, 48*24 and just 3 characters CHR(1-3) being a sine,square and triangular wave shape respectively. It displays OK when I use it in MMBasic. The FontTweaker sets up the 48*24 grid OK but I think it might be misplacing(offsetting) some of the bits for this wider font when it reads it in. The existing fonts all seem to display OK, but I can't find any other examples that are 48 bits wide to confirm if it just my font or there is an issue with wider fonts. Thanks for another useful tool. Regards Gerry ' Font: Special graphics_48x24 ' Includes ASCII characters 01-03 DefineFont #4 03011830 'SINE 00007E00 FF010000 00000080 00C0C303 00070000 000000E0 0070000E 001C0000 00000038 001C0038 00700000 0000000E 000E0070 00E00000 00000007 000700E0 00C00000 00008003 C0010000 00000300 0700E000 E0000000 00000700 0E007000 70000000 00000E00 1C003800 1C000000 00003800 70000E00 07000000 0000E000 C0C30300 01000000 000080FF 007E0000 'square 80FFFFFF FFFF0700 070080FF 80FFFFFF 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 07008003 800300E0 00E00700 FFFFFF03 FF0300E0 00E0FFFF FFFFFF03 'TRIANGULAR 00003800 7C000000 00000000 0000EE00 C7010000 00000000 00808303 01070000 000000C0 00E0000E 001C0000 00000070 00380038 00700000 0100001C 000E00E0 00C00300 07000007 80030000 00000E00 1C00C001 E0000000 00003800 70007000 38000000 0000E000 C0011C00 0E000000 00008003 00070700 03000000 0000008E 00DC0100 00000000 000000F8 00700000 End DefineFont Latest F4 Latest H7 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Gerry, try removing the comments and blank lines from inside the definefont section. I will fix that in a later release. Jim VK7JH MMedit MMBasic Help |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 844 |
Yes, that did it. Thanks Gerry Latest F4 Latest H7 |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Jim, Been playing for a while with your new 'app' and it is proving very, very useful. Just a couple of things I need to check with you: 1> Does 'Not yet.' (on File-New) mean feature coming? Or am I selecting something at the wrong time. 2> If I import a font from 'RinkyDink..' then when I select a character in the drop-down, I often get a different character in the 'edit box' i.e. With GroteskBold 16x32, if I select a 'q' then I get an 'm' displayed. Fully appreciate that this is an early release; I just wanted to check if it is something stupid that I am doing; or whether it is an 'early feature' A very useful app that really compliments the excellent TFT functionality created by Geoff & PeterM. For anyone using TFTs, I strongly recommend you give this app a go WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
@WW Answer to 1. I have not implemented it yet. Answer to 2. It appears that some of the font.c file have blank lines in them. That was not something I expected and my program does not like blank lines. I will fix that. Probably today. It will also then skip over blanks and comments in BAS files. For now, you can open the .c file in any texteditor and delete the blank lines. Jim VK7JH MMedit MMBasic Help |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
This update fixes a few issues. Blank lines or comments in the source files should no longer cause grief. I have made some improvements to the header when saving as .c format. The arrow keys shift the character around. Going off the grid will cause pixel data to be lost. You can now drag the mouse around to draw. Left button down to set a pixel, right button to clear. A click still toggles the pixel. 2016-02-25_040317_FontTweak.zip Jim VK7JH MMedit MMBasic Help |
||||
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1328 |
Brilliant Jim - ask and ye shall receive. Greg |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
@TassyJim Thanks for the update. The drop-down now goes to correct character (i.e. blank lines in source issue fixed); this is a great help. The Drawing/Erase feature using mouse drag is very useful and works well. However, I am seeing peculiar operation now with toggle. Sometimes it works, but most of the time an 'off pixel' flickers on then off again immediately. An 'on pixel' seems to toggle off, but then once it is off, only flickers on (as above) with maybe one-in-twenty clicks causing it to stay on. Hope this is something you can re-create there. All said, this version is a big step up in terms of usability so a massive thanks WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
I can replicate the problem if I move the mouse as I click. The program is trying to handle 'dragging' at the same time as 'clicking' I will try and delay the drag operation. Time to think... Are you using a MAC and emulator or a real computer? Jim VK7JH MMedit MMBasic Help |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Fixing the problem made things too clunky. I have changed it so a left click sets and a right click clears the pixel. This is the same as when dragging so should be easy to use. It has the advantage of setting the last pixel in a drag sequence - previously it was not doing the last pixel you dragged over. 2016-02-25_074322_FontTweak.zip Keep trying to break it... Jim VK7JH MMedit MMBasic Help |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
I am using my Windoze laptop (W10). My 'real' computer (iMac) has not yet had the privilege of your app! Will try with a steadier hand - but a delay here would be useful IMHO WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Ok, just tried your latest version (07:43:22) and toggle/drag work really well. If I have edited pixels on a character, should the 'Restore' button not revert back to the image when I first select it (i.e. remove any current editing)?? At the moment, Restore appears to do nothing . . . Phil For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Oops... 2016-02-25_090526_FontTweak.zip I have restored the 'restore' button. Jim VK7JH MMedit MMBasic Help |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Thanks Jim - Have this to try along with MatherP's code too. Give me a few minutes and I'll report back . . . . WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
Page 1 of 4 |
Print this page |