full text justification
Moderator: Klaus
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
full text justification
Hello all LiveCode gurus, grand masters, big cheeses, little cheeses and total newbies
I need to be able to display fully justified text in a LiveCode field - I found some code that Brian Yennie wrote in 2007 (http://thread.gmane.org/gmane.comp.ide. ... cus=100322 thanks Brian!) that I've tweaked and have now got justified text that seems OK (if you don't look too closely). I'm including the stack here in the hope that others might find it of use - and that some of you will be able to suggest ways to improve what I've got and move us on towards something like 'proper' justified text which we can all benefit from.
Of course in the long-term LiveCode will have a 'full justify' options on its fields and the feature request for this is http://quality.runrev.com/show_bug.cgi?id=4714
So, please check out the hack code in my stack and let me have your suggestions on how to progress things
Kind regards
Dave
PS: new versions of the stack will always be attached to the first posting of this thread
I need to be able to display fully justified text in a LiveCode field - I found some code that Brian Yennie wrote in 2007 (http://thread.gmane.org/gmane.comp.ide. ... cus=100322 thanks Brian!) that I've tweaked and have now got justified text that seems OK (if you don't look too closely). I'm including the stack here in the hope that others might find it of use - and that some of you will be able to suggest ways to improve what I've got and move us on towards something like 'proper' justified text which we can all benefit from.
Of course in the long-term LiveCode will have a 'full justify' options on its fields and the feature request for this is http://quality.runrev.com/show_bug.cgi?id=4714
So, please check out the hack code in my stack and let me have your suggestions on how to progress things
Kind regards
Dave
PS: new versions of the stack will always be attached to the first posting of this thread
- Attachments
-
- JustifyText3.livecode.zip
- (4.36 KiB) Downloaded 257 times
Last edited by dave.kilroy on Wed Apr 30, 2014 8:25 pm, edited 1 time in total.
"...this is not the code you are looking for..."
Re: full text justification
That's neat...
I like this !

-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: full text justification
Thanks Dixie 
Like I say it's mostly copied from Brian's work and then tweaked - but it is most certainly a hack (in the not-yet-cooked sense) and could do with a lot of attention from coders here...
Dave

Like I say it's mostly copied from Brian's work and then tweaked - but it is most certainly a hack (in the not-yet-cooked sense) and could do with a lot of attention from coders here...
Dave
"...this is not the code you are looking for..."
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: full text justification
Nicely done, Dave - thanks for posting that!
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: full text justification
Just tried this on Windows and it's a mess! Will figure out what is happening and upload a new version...
"...this is not the code you are looking for..."
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: full text justification
Hi all
OK discovered the problem when on Windows 7 was that I was using LC 6.6.2(rc2) - when I changed to LC 6.6.1 everything calmed down (although I did have to prevent my tweakJustification handler running on Windows which means the right-hand margin is a bit less uniform). New version with these changes available here: [edit] actually in order to avoid confusion I've moved the new version to the first posting in this thread[\edit]
So, it appears there is a bug on LC 6.6.2(rc2) when on Windows - I'll file a bug report...
Kind regards
Dave
OK discovered the problem when on Windows 7 was that I was using LC 6.6.2(rc2) - when I changed to LC 6.6.1 everything calmed down (although I did have to prevent my tweakJustification handler running on Windows which means the right-hand margin is a bit less uniform). New version with these changes available here: [edit] actually in order to avoid confusion I've moved the new version to the first posting in this thread[\edit]
So, it appears there is a bug on LC 6.6.2(rc2) when on Windows - I'll file a bug report...
Kind regards
Dave
Last edited by dave.kilroy on Wed Apr 30, 2014 8:23 pm, edited 1 time in total.
"...this is not the code you are looking for..."
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: full text justification
Bug report for difference in how LC 6.6.2(rc2) responds to formattedWidth filed at http://quality.runrev.com/show_bug.cgi?id=12332
...although maybe it isn't a bug at all but a foreshadowing of new field properties...
Dave
...although maybe it isn't a bug at all but a foreshadowing of new field properties...
Dave
"...this is not the code you are looking for..."
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: full text justification
I don't think this is a bug anymore - just a mystery...
I had been doing some testing and discovered it now runs in Windows with LC 6.6.2(rc2)!! I don't really know why ... but as long as you use the latest version it now appears to run fine
I had been doing some testing and discovered it now runs in Windows with LC 6.6.2(rc2)!! I don't really know why ... but as long as you use the latest version it now appears to run fine

"...this is not the code you are looking for..."