News:

Welcome to RetroCoders Community

Main Menu

Silly Font Idea

Started by johnno56, Apr 26, 2023, 09:08 PM

Previous topic - Next topic

johnno56

Screen 7
cls

locate 1,1
Print "A"

for xx = 0 to 7
	for yy = 0 to 7
		col = point(xx,yy)
		pset (20+xx,20+yy), col
		line (40+(xx*2),40+(yy*2))-step(2,2),col,bf
		line (60+(xx*4),60+(yy*4))-step(4,4),col,bf
		line (100+(xx*8),100+(yy*8))-step(8,8),col,bf
	next
next

end

The above snippet uses a simple 'point' and 'pset' to 'enlarge' the existing text. Imagine if 'get' and 'put' were involved, then the 'text' can be placed at the graphics cursor. A few drawbacks: Colour will be determined by the 'original' character. I have tried this with various 'screens' (0, 7, and 14) and they all work without modification. But when I switch to a '_newimage' screen the character is chopped in half.

With a bit of practice (and a bucket load of patience) an entire character set could be 'scanned and stored'.

I just remembered... all this could be made much simpler... LETCHR$()

Oh well, the thought was there... even if a little too late... lol

J
May your journey be free of incident.  Live long and prosper.

CharlieJV

I like it.

Now you have me thinking: what if we had a string function, _GETCHR$(ascii_code), that returned the character bit pattern as a string?

So sticking with capital letter "A":

_GETCHR$(65) would return the 64-character bit pattern string:

"..XXX....XX.XX..XX...XX.XXXXXXX.XX...XX.XX...XX.XX...XX........."

which is (just to make it human-readable):

"..XXX..." + ".XX.XX.." + "XX...XX." + "XXXXXXX." + "XX...XX."" + "XX...XX."" + "XX...XX."" + "........"


I wonder if this could be useful.

johnno56

I had even toyed with the idea of making a character (single letter) designer. I kind of have an idea as to how to do that but I have my doubts. I had started to make a sprite editor, for a basic that shall not be named, but did not finish it. I may be able to gleen some functions from that and cobble together something. The problem could be loading and saving files.

I think I should focus on creating the enlarged fonts and converting those to the LETCHR$() 'on the fly'. On the other hand, use a designer to make the characters, then use that info to make a set of 'data' statements that can be 'read' into the program/game. Something like that... I need to give it more thought. Too many methods flying around the old grey matter... lol More research...

Your idea is looking pretty good at the moment...
May your journey be free of incident.  Live long and prosper.