Dash appears as a rectangle — Android —

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Dash appears as a rectangle — Android —

Post by jorgecaballero » Wed Jan 09, 2013 9:02 am

Dash appears as a rectangle

I'm developing for Android, is a mini book contains some dash, but the phone does not appear in its place is a rectangle.

Is there any way you see the dash instead of the rectangle?
That will help a lot in the structure of the mini book

I would appreciate your help

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Dash appears as a rectangle — Android —

Post by Klaus » Wed Jan 09, 2013 12:28 pm

Hola Jorge,

1. welcome to the forum! :D

2. I am not sure I understand, but it sounds like you are using a font in the IDE that is not available on ANDROID.
THis way many characters appear as a "rectangle" instead of the actual character.

Check the internet for installed fonts on ANDROID and use these for layout in the IDE.


Best

Klaus

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Dash appears as a rectangle — Android —

Post by Simon » Thu Jan 10, 2013 4:19 am

Klaus,
You deserve a gold star for "Deciphering Intent"!
Here's a smiley instead :D
Even if Jorge comes back and says that wasn't the problem, your answer still fit the given information.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Dash appears as a rectangle — Android —

Post by Klaus » Thu Jan 10, 2013 1:38 pm

Thank you, Simon!

Actually I have a college degree in "Deciphering Intent" :D

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Re: Dash appears as a rectangle — Android —

Post by jorgecaballero » Fri Jan 11, 2013 2:41 am

Thanks for your answers,

Now try changing font types, use many. But I always see the same in andorid, no change to the one I choose in livecode.

On my computer the font change if done while I'm in development, but at launch the application on your phone that appears by default and I get that rectangle.

Is there any way to force that android use the font I want in my application.

I use this but it did not work:

on preOpenStack
      set the textFont of this stack to "Arial"
 end preOpenStack


Please some code or some way that I accept the font change.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Dash appears as a rectangle — Android —

Post by Simon » Fri Jan 11, 2013 2:52 am

These are the officially recognized fonts for Android:
http://www.droidfonts.com/
You can download the font there.
They added Roboto in 4.0
http://robotofont.com/

I see Droid Sans most of the time.
Do not use Arial.

Simon
EDIT: check out Adding Custom Fonts in the Android release notes p 12
But most Important is you have to have a licence to use the font you embed. Just use Droid to avoid trouble.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Not shown in the phone the dash — Android —

Post by jorgecaballero » Fri Jan 11, 2013 10:24 am

Thanks again Simon

I have used their recommendations for learning but the problem has not been solved. Although not shown in the phone the dash. —

Download the source already told me, the "Roboto" install it and add in livecode "Copy Files" If you change the font but does not show the DASH, and appears not the rectangle, but nothing appears.

—This is the sign that I want to see— is for my minibook dialogs.

And also uploaded an application to download and playstore and shows no dash.

Use the font "Droid Sans" and "Roboto" but with no-dash is displayed.

Will need the PRO version of the source DroidSans???


Any other ideas of what else I can do?, That sign is important for the structure of the book, for better readability.

I hope you can help me.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Dash appears as a rectangle — Android —

Post by Simon » Fri Jan 11, 2013 10:43 am

Hi Jorge,
Sorry if I confused you but you don't have to use "Copy File" as the Droid font is already installed on Android.
Is there any chance you can build a small stack that displays the problem and post it here?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Re: Dash appears as a rectangle — Android —

Post by jorgecaballero » Fri Jan 11, 2013 9:25 pm

The problem is that the PC is fine text and displays the dash —
BUT to install the phone displays the rectangle or with other Fonts simply do not see the dash.

Try a variety of ways, just put the font in Livecode, or also try adding font files on the Copy button of the stanalone.
nothing worked, the PC looks good but not on the phone.

I tried it on different phones and the same result, HTC phones and motorola.


What else I can try or what the problem is?

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

Re: Dash appears as a rectangle — Android —

Post by jacque » Sat Jan 12, 2013 6:15 am

Try this: Make a new stack with one text field. Put some text into it and include the dash. Do not assign any fonts to the text, or the field, or the stack. No fonts anywhere. Build an app and check it on your device.

If it looks correct, then it means your original stack has some font settings that you need to remove. Remove all font settings from all the text (select all text and choose "use owner font" in the Text menu.) Use the property inspector to remove font assignment from all fields, cards, and the stack. When you build your app, do not include any font files.

Roboto and Droid Sans are built into Android and you do not need to supply those fonts. If your stack has no font settings, LiveCode will automatically use the system font.

If the test stack does not work, then neither of those fonts supports the character you are using. It looks like an em-dash to me (the long dash) which is common and should be in most fonts. What is the ascii number of the character? You can find out by putting this into the message box:

put charToNum("—")

Don't copy my character, type yours between the quotes. It should be 209. Is that what you get?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Re: Dash appears as a rectangle — Android —

Post by jorgecaballero » Sun Jan 13, 2013 12:03 am

.
Last edited by jorgecaballero on Sun Jan 13, 2013 12:06 am, edited 1 time in total.

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Re: Dash appears as a rectangle — Android —

Post by jorgecaballero » Sun Jan 13, 2013 12:04 am

regards

Sorry so insistently and so many drawbacks,

But still do not see the long dash in the phone, you still see the rectangle instead of the dash.
I already made a new stack, as you indicated me and the result is the same, the rectangle appears.

I also did what you said and in the message box and the code of emDash ascci is 0151 — that is what I have been using Alt +0151

You dont know what else to do and I'm thinking this will have no solution,
but I hope I can get one last tip, a last attempt and hopefully work.

Some of you have made ​​and tested in some andorid phone???

Thanks, I hope a solution is found.

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

SOLUTION --- Re: Dash appears as a rectangle — Android —

Post by jorgecaballero » Sun Jan 13, 2013 2:10 am

Ready ...

I found a solution,,, now use the Dash with Alt +196

But I do the writing and then move to a Notepad, because if I do it directly in LiveCode appears as a hyphen,,,

Copy and paste the text from the notepad to livecode and now appears the Dash in the phone,,,,,

Thanks for your help,,, your tips helped me to keep trying and finally found the solution,,,



Caballero

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

Re: Dash appears as a rectangle — Android —

Post by jacque » Sun Jan 13, 2013 4:54 am

I'm very glad to hear you got it to work. The character sets for Windows, Mac, and Linux are different for characters above 255 ascii. That could explain the problem.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Dash appears as a rectangle — Android —

Post by Simon » Mon Jan 14, 2013 11:30 pm

And one more thing...
If you copy and paste into a fields property inspector "content" the text formatting will remain. So, if you copy Arial text and then paste it the field will have the Arial font.
I usually copy text to notepad first to remove the formatting.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply

Return to “Android Deployment”