Page 1 of 1
keep text formatting on PC
Posted: Wed Jan 05, 2011 7:19 pm
by kwinkler
I've constructed an application on a Mac that has a nicely formatted text field. On the PC version of the application, some of the formatting disappears, such as font and size. The text color is retained. I've tried to use a PC-specific font for the PC version of the application - Lucida Sans Unicode.
Is there a way to keep all the formatting with the PC version of the application? Thanks.
Re: keep text formatting on PC
Posted: Thu Jan 06, 2011 1:10 am
by kwinkler
For whatever it's worth.......
The text that is giving me trouble was created and formatted in TextEdit, then copied and pasted into the LiveCode text field. It loses the formatting in the PC version of the compiled application. The Mac version is fine.
BUT, if I type directly into the text field, and apply formatting inside the text field, then the text RETAINS the formatting in the PC application. The problem is, I have a lot of text already formatted in TextEdit, and I have more formatting options in TextEdit, such as choice of color. So I would rather work in TextEdit, and transfer the text to LiveCode.
Re: keep text formatting on PC
Posted: Fri Jan 07, 2011 7:48 pm
by kwinkler
Update:
In the preceding posts I mentioned that I copied and pasted text from TextEdit into the LiveCode text field, and the formatting did not appear on a PC. The formatting did appear on a Mac.
Instead of copy/paste, I have now used RTFText to import data into the text field. After compiling, the formatting appears fine on the Mac app, but disappears on the PC app.
If I move the original TextEdit rtf file over to the PC, the formatting appears correct. So the problem appears to be with LiveCode, not with the PC.
Re: keep text formatting on PC
Posted: Sat Jan 08, 2011 10:03 pm
by kwinkler
This problem is becoming more widespread. In my main stack, I have no problem changing textSize or textStyle on both a Mac and a PC. But on two different substacks, textSize and textStyle have no effect on the PC. I am developing on a Mac, and all the stacks look fine there. But whether I can change the text size of a field through the user interface, or programmatically, neither way shows up on the PC substacks. The changes DO show up on the main stack on the PC.
So does anyone have a clue why substacks behave this way on the PC? Thanks for any suggestions.
Re: keep text formatting on PC
Posted: Sat Jan 08, 2011 10:32 pm
by kwinkler
And the solution is................embarrassingly simple.
I was using a font in the substacks (Lucida Grande) that does not exist on the PC. Changing the font to Arial, which exists on both the Mac and PC, resolved the formatting problems. It is somewhat surprising that ALL formatting is ignored when a font is unavailable. One might assume that a substitute font would be used, but that the formatting would be retained. This is not the case. If the PC does not have the correct font, then all formatting is ignored.