How to put Hebrew text in my app?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

How to put Hebrew text in my app?

Post by liveCode » Thu Apr 14, 2022 9:25 am

I try to work with the Hebrew language in liveCode
but there is a problem
I created a text field that has text in Hebrew
And as soon as I turn it into an app all the text goes wrong
that's how it's supposed to be:
a.png
a.png (6.07 KiB) Viewed 3782 times
But this is what it really looks like
b.png
So what do I do?
Thanks

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to put Hebrew text in my app?

Post by richmond62 » Thu Apr 14, 2022 10:55 am

Well apart from the fact that I don't know what 'abrit' means . . . 8)

I built a stack and ran off a MacOS standalone:
-
Screen Shot 2022-04-14 at 12.51.48 PM.png
-
Stack on left, standalone on left.

If you could attach your stack we could see if something was odd about your textField.
Attachments
Abrit.livecode.zip
Stack.
(1.38 KiB) Downloaded 59 times

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to put Hebrew text in my app?

Post by liveCode » Thu Apr 14, 2022 12:04 pm

On WINDOES or on Mac it works well but on Android it does not work well

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to put Hebrew text in my app?

Post by richmond62 » Thu Apr 14, 2022 1:18 pm

On WINDOES or on Mac it works well but on Android it does not work well
my stack, or yours, or both?

Please send your stack here.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to put Hebrew text in my app?

Post by richmond62 » Thu Apr 14, 2022 1:42 pm

If you only want your text as a static thing you could convert it into
an image.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: How to put Hebrew text in my app?

Post by FourthWorld » Thu Apr 14, 2022 5:02 pm

Offhand it looks like the text is there but merely cropped.

Are you using fullscreenmode?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

andresdt
Posts: 146
Joined: Fri Aug 16, 2019 7:51 pm

Re: How to put Hebrew text in my app?

Post by andresdt » Thu Apr 14, 2022 5:47 pm

It may be that Android does not have the font used on the desktop.
Try running the following code on desktop and Android to rule out font existence issue.

code on a button

Code: Select all

on mouseUp
    local tFontName = "Linotype" --> tFontName is the name of the font you are using
    
    if tFontName is among the lines of (the fontNames) then
       answer "The source if it exists"
    else
	answer "this may be the problem"
    end if
end mouseUp

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to put Hebrew text in my app?

Post by jacque » Thu Apr 14, 2022 6:01 pm

A missing font was my first thought too, but it's odd that a single character would show. What font are you using? You can include it with the standalone by putting it into the Copy Files pane of the standalone builder, and including this command in your startup handler (preOpenStack, preopencard, etc.):

Code: Select all

start using font file <name>
The name must match the included font exactly. The older copy of the dictionary I'm looking at right now doesn't say it works for mobile, but I recently used it on Android and it does work.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 133
Joined: Tue Feb 23, 2010 10:53 pm
Location: Saint Louis, Missouri USA

Re: How to put Hebrew text in my app?

Post by bobcole » Thu Apr 14, 2022 11:12 pm

Offhand it looks like the text is there but merely cropped.
Try doubling the width and height of the field to see if it is cropped.
Maybe try setting the "Don't wrap" parameter of the field to true.
Bob C

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to put Hebrew text in my app?

Post by liveCode » Fri Apr 15, 2022 5:40 am

The problem was really solved the phone did not find the font I was using so I added it

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: How to put Hebrew text in my app?

Post by FourthWorld » Fri Apr 15, 2022 10:51 am

How was it rendering the left-most character without rendering the rest?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to put Hebrew text in my app?

Post by richmond62 » Fri Apr 15, 2022 11:16 am

That was the LAST letter, not the first.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: How to put Hebrew text in my app?

Post by FourthWorld » Fri Apr 15, 2022 4:40 pm

richmond62 wrote:
Fri Apr 15, 2022 11:16 am
That was the LAST letter, not the first.
.
Of course. Corrected for precision.

Did you have any thoughts to share on the rendering mystery?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”