Set Font, Bold and Italic for Pen Writing Block

Yay! Everyone is making terrific progress on this topic. :~D

All it really needs to do is pretty much this: (assuming (matrix after matmult) exists)


But the MAPped version is so much neater. (Both senses of "neat".)

It cuts off the right part. That isn't too big of a deal with "C" as the last letter, but say you have a ¦ (Alt-0166 for Windows, not sure how you'd put it in on non-Windows OSes.). It might be hard to distinguish it from an italic ; (semicolon).

Yes, more space at the right edge should be preallocated then clipped to visible pixels.

But the matrix version works as expected and gives the ability to do more than italics.

Have you shared this project? Is it ready to show the world?

Check matrixmultforcostumes again, it's the ITALICIZE block in the Other category. You'll have to figure out how to turn the result into a costume.

The project has the
3x3D
example, returning
trueit3x3D
(as lists of where pixels are)

Can't you use the new costume block? (sorry if I'm not understanding quite well, I don't know matrixes yet.)

The matrices I'm using only store x,y coordinates (relative to the top-left corner) of black pixels.

You could make a costume with something like


where index to xy coordinates is a block you'd write that divides and mods the index by the width.

You don't even need the (list [x] < >) block, reshape works with that slot empty.

For my test project, version with map (w:width, h:height, pixels coord:coordinate array)
Italics costume.2 script pic
took ~600 [ms], while
Italics costume.2 script pic (1)
~90 [ms]

Oh, sure, because your version looks only at the black pixels rather than at all the pixels. Not surprising. But 600ms (less than a second!) isn't enough of a burden to overcome my preference for functional programming style. :~)

Ok, performance is not that important to you.
But, for me, 1.5s (matrix calculation) + 0.5s (costume rendering), for one letter, is way too slow.
With skew implemented directly as
Italics costume.2 script pic (4)
the whole process took only ~ 200..300 [ms].

That's fair; I wasn't thinking about the cost of the entire process, just the 600ms you mentioned in your previous message.

It says the project does not exist.

Sorry, project shared again. Try now...

So is there a way to do this without the small bit of JS?

If you think of Italics costume.2 script pic (6)
, in the built-in library "Text Costume", then yes.
This Italics costume.2 script pic (5) can be ommited.

Could you explain how?

You can just take it out.