Week 1 - ANSI Terminal

October 30, 2018

So the first thing i tried is to see if i can sneak in some Farsi into the sketches. Luckily the underlying JS stuff running p5 is ok with me throwing Unicode at it. “Stars” looked like a good place to start from:

After that i had a go for “Ghost Train” as well. So it turns our just like GHOST and TRAIN that share a T in their tail/head, the equivalent words in Farsi روح and قطار also share a character ( ر ) in their head/tail!

Perfect!

But there’s an issue and that is if i type the words normally, they would be displayed backwards in the output:

let ghost = "روح";
let train = "قطار";

will end up written like حور and راطق.

So the solution is easy, just write ‘em backwards!

let ghost = "حور";
let train = "راطق";

You might need to refresh it or check it on the editor: Farsi Ghost Train

so yeah, There’s this issue of letter connection.

In Farsi (and of course Arabic) some letters are meant to be joined when written next to each other. Sorta like cursive. So the word قطار is when ق ط ا ر are written next to each other. But no matter what i do, i can’t get it to look right in this sketch! So the word قطار will look like ق‌ط‌ا‌ر . Which is fine i guess, I mean in real ANSI i wouldn’t have been able to use UNICODE anyways! So i’ll take it!

Just to clarify, it’s totally possible to have correctly formatted Farsi type inside p5. We’ll see if it can be compatible with future homeworks. But for example:

comments powered by Disqus