# textengine--from Scratch and scratch

project

Is there anything I can do to make it quicker? It's currently pretty slow.

Huh, seems fast to me...

Half a second isn't that fast.

BTW the reason it's even that fast is because I'm compiling it.

is there a way to change the font size? Like a number you put into the block. It's also really fast for me as well.

Not yet. Currently you have to make a new font for that.

Could you time how long it takes?

how do I make a font?

Edit the font list (or make a new one) and have the first item be a list (char-width char-height kerning leading undefined-char), with the first four being in pixels, and the last being an RLE-encoded font character. (the syntax for that will be described in the next paragraph) Then have the second item of your font list be a list of either empty lists or font characters, in Unicode order. (Empty lists are for when you have a gap in the list--e.g. if you have the characters for "a" and "c" but not "b", then use an empty list for "b". (you could technically also have an empty item.))

Font characters are RLE-encoded vertically, so

█
█
█
█
█
█
█
█
█
█
█
█
█


would be

0
11234
71111
15317
1111
135
111


(the "0" is for when the top pixel of a column is black)
which, when you take the MAP JOIN OVER COLUMNS OF it, is (0171 115111 213131 311151 4171). Then JOIN that with . as a separator. (.. makes an empty column, ... makes two, etc.)

Tell me if you didn't understand some part of this, or if you have any more questions.

1
11
21
1211
111221
...
:~)

?

No, this is a sequence of numbers (read left to right, not top to bottom) and you're supposed to say what number comes next. But it's tangentially relevant to your project. :~)

21121211?

Nope.

A hint as to what you're doing to each number?

Sure, the hint is that you're doing RLE.

Is it something you see or what? And what's the initial state for each row? (like is "1211" "01101" or "10010"?)

Just read the digits of each row out loud.

I still don't know what I'm supposed to be paying attention to.

One.
One one.
Two one...

I don't hear a pattern in it.

1: One 1 -> 11
11: Two ones -> 21
21: One two, one one -> 1211
etc.

So the next number in the sequence is 312211.

See? Run length encoding!