Can I use a picture to represent an ascii character?

145 views
Skip to first unread message

JWHoneycutt

unread,
Nov 8, 2018, 6:45:46 PM11/8/18
to TiddlyWiki
I am creating a sign language wiki and recommendations are welcome

Starting with the alphabet, I created images for letters, such as `A`

The image is stored as `A.jpg` in an adjacent subdirectory

The letter `A` is invoked by transcluding a tiddler titled `A` which contains the text `[img[./Sign_language/A.jpg]]`

{{A}} - this I have done so far...

Then I want to use these letters as a font, allowing them to replace ASCII characters, possibly using the syntax `<<.sign "THIS">>`

The macro would take each letter in turn and render the picture of the letter - a font "Sign"

Any ideas how to accomplish this?

JWHoneycutt

TonyM

unread,
Nov 8, 2018, 9:19:06 PM11/8/18
to TiddlyWiki
JW

I think there may be a way to deliver images via css rather than transclusions, that would be more transferable. Lets see what people have to say.

However can you explain why you are reverting to images? The reason I ask is with so many font opportunities out there there are even sign language fonts one example

If you keep it as a font, people can type it, you can spell check etc.. but also use other non alphabetical signs

Regards
Tony

TonyM

unread,
Nov 8, 2018, 9:20:47 PM11/8/18
to TiddlyWiki
Post Script, With a little effort, you could create your own font using your own designs.

JWHoneycutt

unread,
Nov 9, 2018, 12:53:52 AM11/9/18
to TiddlyWiki

Wow, Tony M

Fantastic reference, thanks!

I am hoping to build a sign language interpreter (ironic, I know)

Sign language is "native language" non-specific - and it would be nice if TW5 could be used to teach it to a non-signer

Moving from there I am exploring whether it can also be used to "read" sign language with a camera

I am focused on a simple English alphabet to start

Eventually, with a natural language semantic ontology, open the above to concepts expressed in sign

Imagine having the functionality of text-to-speech and speech-to-text using sign language instead of speech (and no audio)

TonyM

unread,
Nov 9, 2018, 1:25:19 AM11/9/18
to TiddlyWiki
Sounds great,

Just ask here in the forums if you need further help

The image to text part would be the hardest, I would search for prior attempts if I were you. Google has some image recognition AI available in the cloud, but perhaps the moving image is too much for it. Not impossible with today's tech just challenging.

But if I could type some text and have it translated to sign, it would be a good way to learn

Regards
Tony

Mark S.

unread,
Nov 9, 2018, 10:15:05 AM11/9/18
to TiddlyWiki
Not having a bunch of images to work with, here's a start.

This is where TW really needs a regular expression extraction filter. But in lieu of that, what I've done here is to use recursion to pop off the letters one by one. I only have letters A thru F, but you can add the rest in. You can also change "word4letter" to use ".png" or whatever your actual tiddler image extension is. Since it uses recursion, you would not want to load it up with entire paragraphs.

I would think that ".gif" or ".png" files would be most useful, because you could show actual signing motions.

\define word4letter(letter) <$transclude tiddler=$letter$.jpg mode="inline"/>
\define popoff(word)
<$list filter="A B C D E F" variable="letter">
<$list filter="[[$word$]] +[removeprefix<letter>]" variable="remnant">
<$macrocall $name="word4letter" letter=<<letter>>/><$macrocall $name="popoff" word=<<remnant>>/>
</$list>
</
$list>
\end
\define .sign(word) <$macrocall $name="popoff" word="$word$"/>

<<.sign "BED">>

-- Mark

JWHoneycutt

unread,
Nov 9, 2018, 10:48:46 PM11/9/18
to TiddlyWiki
@Mark S 

That is exactly what I had been thinking of.  Thank you.

My images are transcluding too large, and I want them smaller with a nice rounded border - so I just need to find/remember how to do this.

@TonyM

I also found a suitable font and will (once again) wrestle with how to install it.  

For some reason, font installations are hit and miss for me, work in one TW5 and not in another... 

Appreciate your inputs

JWHoneycutt

Ste Wilson

unread,
Nov 10, 2018, 4:37:02 AM11/10/18
to TiddlyWiki
Font installation instructions.
stephenteachertests.tiddlyspot.com/#Font:Thoughts%20Font

Link at bottom of tiddler for custom/ downloaded / non Google fonts.

Reply all
Reply to author
Forward
0 new messages