Forum Discussion
text box isn't readable when content is created in JS
I tried to do that before uploading here but it didnt work
OK maiaIgs, I've taken a look at your .story file and think I've fixed this issue by:
- Swapping the 'results' text box for a transparent rectangle
- Setting its height and width so the Javascript generated text doesn't 'spill' out of it, forcing the text to shrink
- Adapting you original code to compensate for Hebrew text and RTL (right-to-left) rendering, which was also contributing to the sizing issue as two lines of text were being generated at once
I've also taken the liberty of adding another bit of code to create a 'typing' effect, as you were using a wipe animation to achieve this. This code creates more authentic AI-generated text effect.
This should now consistently display the Javascript generated text at 32pt font.
Hope this helps?
- maiaIgs27 days agoCommunity Member
hi again, thank you for the reply and the attachment. so I can't figure out how to adjust the lower text box as pictured in the screenshot I added. and also the numbers are still going the opposite way in the first sentence so instead of saying 30-40 it says 03-40 for some reason.
I would also like to attach the full project as i have another issue. (please disregard the part with the same two slides from the test file I will replace them in the full once I get it to work).
The problem in the full project is when trying to export a translation file it cuts the sentences into separate word and single letters. I tried to replace the font to Arial but the problem continues
- Jonathan_Hill27 days agoSuper Hero
Hello again Maia,
Unfortunately I won't be able to look at this for at least a week, as I'm travelling to DevLearn.
The number order thing isn't an error, though.
Numbers maintain their left-to-right (LTR) order even in right-to-left (RTL) scripts like Hebrew. This is called "bidirectional text" behavior.
For example, in Hebrew:- A sentence like "יש לי 345 שקלים" (I have 345 shekels)
- The number is read as 345, not 543
- The year תשפ״ד 2024 is read as 2024, not 4202
The other issues you describe are, I think, also due to using JS generated text with a left to right language and the Hebrew characters being read and treated differently by the code.
I'm certain with a bit more research I could help further, but I won't be able to work on this for a little while, I'm afraid.
You could try starting a new question with a title that address the JS vs RTL (Hebrew) issue, and perhaps someone with more direct experience of this could help in the meantime.