Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:09 01 Aug 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 : FontTweak has had a facelift

Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:03am 28 Feb 2019
Copy link to clipboard 
Print this post

I started out looking for line drawing fonts and got carried away.

New features include
Remembering window positions etc between sessions.
Full character map viewer. (Right click to print)
Ability to import BIN files from 'Fony', a good font manipulator.
Ability to resize fonts. Needed when an imported font doesn't match the 8 bit multiple rule.
Ability to centre characters (acts on the full font)



The ZIP includes a PDF help file and a couple of fonts.
2019-02-28_170138_FontTweak.zip

Jim



VK7JH
MMedit
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 09:11am 28 Feb 2019
Copy link to clipboard 
Print this post

Good one Jim.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 02:31pm 28 Feb 2019
Copy link to clipboard 
Print this post

Jim--resizing didn't do exactly what I was hoping it would by some magic--essentially scale the bitmap. I resized my 8x8 font where the single-line PC graphics characters are in the first lower case bank (0x60-0x6f) to 12x12. The result was that 4 blank columns were added to the right and 4 blank rows were added at the bottom.

Is there a way to do what I want to do? I understand the problem is non-trivial.
[code]
' PCgraphicsFont.bas
' from lizby
' Font type : Standard 8x8 plus PC graphics replacing lower case (95 characters)
' Font size : 8x8 pixels
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

ff000000 000000ff 18181818 18181818 1f000000 1818181f f8000000 181818f8
f8181818 000000f8 1f181818 0000001f ff181818 000000ff ff000000 181818ff
f8181818 181818f8 1f181818 1818181f ffffffff ffffffff ff181818 181818ff
00ffff00 00ffff00 66666666 66666666 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 00000000 00000000

End DefineFont
[/code]
Before:



After:



Could you make the whole font view 16 characters wide rather than 15?

(And by the way, this is a terrific program.)

Edited by lizby 2019-03-02
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:38pm 28 Feb 2019
Copy link to clipboard 
Print this post

Resize is only intended to make a non standard font such as 9x13 fit into a size that is accepted by MMBasic.
You do have the ability to double the size of fonts but not fractional scaling. I considered fractional scaling of small bitmaps too troublesome.
A better way would be to start with one of the larger fonts such as 9x14 and resize it to 10 x 12.

The number of characters across the font view will depend on the total number of characters. Font sizes vary from one character to 255 so fixing the width to 16 is not ideal. I went with width equals 1.5 times the height.

Jim
VK7JH
MMedit
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 04:34pm 07 Apr 2019
Copy link to clipboard 
Print this post

I want to bring this nice utility into focus again, in case anyone needing font-tweaking is unfamiliar with it.

I had thought it inconvenient that ON for a pixel was a left-mouse click and OFF was a right click--it seemed that a toggle with the left mouse would be easiest.

But then I found out accidentally that you can "paint" with a left or right mouse button held down--so you can click and hold and sweep through as many pixels as you want, turning them all ON or all OFF.

A very useful program--thanks, Jim.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 01:33pm 18 Jun 2019
Copy link to clipboard 
Print this post

Hi Jim,
I just tried to import an image to character in this latest version. I could see the image but none of the keys (including enter) would respond and I could not do anything with it.
I went back to a previous version and could do it OK, so have done what I wanted, but just letting you know that this version may have an issue.

Regards
Gerry
Latest F4 Latest H7 FotS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 12:00am 19 Jun 2019
Copy link to clipboard 
Print this post

  disco4now said   Hi Jim,
I just tried to import an image to character in this latest version. I could see the image but none of the keys (including enter) would respond and I could not do anything with it.

Sorry about that.
This should have it fixed:
2019-06-19_100020_FontTweak.zip

Jim
VK7JH
MMedit
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 06:31am 19 Jun 2019
Copy link to clipboard 
Print this post

Thanks Jim,
good now!

Latest F4 Latest H7 FotS
 
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