Kinky text

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Kinky text

Post by richmond62 » Mon Apr 11, 2016 6:05 pm

I would like the ability to both superscript and subscript text without resizing the individual glyphs,
and the ability to set individual character sizes.

Manual kerning!
idea.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Kinky text

Post by richmond62 » Mon Apr 11, 2016 6:09 pm

sK1.png
This is manual kerning in the sK1 project, and were it implemented in Livecode that
would be a great strength for anybody who wanted to work with text.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Kinky text

Post by richmond62 » Mon Apr 11, 2016 6:22 pm

From a purely personal point of view I would like manual kerning to implement
a system to digitise Grantha script [a script used for many languages throughout southern India].
grantha.png
grantha.png (27.83 KiB) Viewed 6145 times
This image shows a subscripted character that is both below the "parent" glyph" and size reduced.
Grantha can 'stack' glyphs up to 3 deep.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Kinky text

Post by mwieder » Mon Apr 11, 2016 6:34 pm

Something other than this?

Code: Select all

set the textshift of char 2 of line 1 of field 1 to -5
set the textshift of char 4 of line 1 of field 1 to 5
set the textsize of char 1 of line 2 of field 1 to 20
set the textsize of char 3 of line 2 of field 1 to 20

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Kinky text

Post by richmond62 » Mon Apr 11, 2016 6:47 pm

Something other than this?
kinky.png
Flipping amazing . . .

AND, why is this SO under-documented / publicised that . . . ?

AND . . . how will one line a glyph up directly underneath another glyph? Is that "one step beyond"?
Use the textShift property to subscript and superscript chunks of text in a field.
That's wonderful, BUT what I am now looking for is not JUST shifting up and down, but also back and forwards.

Refer back to my image of Grantha script and look at the subpercscripted glyph that is tucked underneath another glyph;
this would involve not just a textShift command for up and down, but also one for left and right (?) so that an individual glyph can be either
displaced, or involve no "carriage advance" when it is input into a field.

I very much doubt if one could leverage textDirection to achieve this.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Kinky text

Post by richmond62 » Mon Apr 11, 2016 7:43 pm

Ultimately textShift and textSize are only of any real value locally [i.e. inwith Livecode]
as export does all sorts of things which renders the results effectively useless:
original.png
original.png (9.08 KiB) Viewed 6111 times
libreOffice.png
libreOffice.png (6.89 KiB) Viewed 6111 times
RTF export
Firefox.png
Firefox.png (7.33 KiB) Viewed 6111 times
HTML export
Last edited by richmond62 on Tue Apr 26, 2016 6:39 pm, edited 1 time in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Kinky text

Post by FourthWorld » Mon Apr 11, 2016 7:49 pm

richmond62 wrote:why is this SO under-documented / publicised that . . . ?
What would constitute adequate documentation on this in your view?
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: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Kinky text

Post by richmond62 » Mon Apr 11, 2016 8:03 pm

What would constitute adequate documentation on this in your view?
I do feel that a different type of documentation could be developed; possibly with chapter headings.

Let us imagine a chapter entitled; "Everything to do with Text".

This would then have subheadings such as:

1. Aligning text.

2. Kerning text.

and so on.

Currently the only "way" into the documentation is via terms, and if one doesn't know
Livecode's terms that can be slow and painful at best.

For the sake of argument, I wonder what would make someone who wanted to check out manual kerning
in Livecode think "textShift" out of nowhere. That would just not happen.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Kinky text

Post by mwieder » Mon Apr 11, 2016 8:15 pm

I rather doubt we'll get adequate kerning support any time in the near future. I'm rather too ignorant of the internals for font mechanics to contribute anything useful to the conversation. I know there is a way of using font hints when they're supported and available, but I'm afraid it would take a lot of work to get that to a useful state.

Textshift has been around for a long time and hasn't changed. And yes, it's one of those gems that's hidden down in the deeps of the documentation. Granted it's of limited usefulness (no sub-pixel placement, etc) but it's quite a handy tool to have available.

I *do* like that thematic documentation idea, and it seems that the new docs are getting to a stage where something like that can happen.

...and I rather like the unexpected html export, even though it may not be what's desired.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Kinky text

Post by richmond62 » Mon Apr 11, 2016 8:23 pm

unexpected html export
"unexpected" ? How come?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Kinky text

Post by FourthWorld » Mon Apr 11, 2016 9:13 pm

richmond62 wrote:Currently the only "way" into the documentation is via terms, and if one doesn't know
Livecode's terms that can be slow and painful at best.
The Dictionary is not the only documentation available for LiveCode. Though I agree it may be helpful to see more cross-referencing within it - you're welcome to add some:
https://livecode.com/putting-the-you-in-documentation/

The User Guide, Lessons, and other Guides are joining the Dictionary content in being translated to Markdown on Github. Most of them are already there. There are many benefits to this, not the least of which is allowing you to add more See Also links in Dictionary entries.

Another thing that can be done with the new modular documentation content is that it's becoming possible for anyone to link any portions of it to curate specialized task-specific guides.

For example, if you wanted a guide to "Everything you can do with text" you can write a Markdown document with a little introductory text, and then link to the relevant portions of the User Guide to get folks oriented, followed by any Lessons that may be relevant, then any Dictionary entries you feel should be there.

The range of documentation options for LiveCode have never been broader. All that's needed now is anyone sufficiently motivated to assemble them into anything they want.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Kinky text

Post by mwieder » Mon Apr 11, 2016 9:39 pm

"unexpected" in the sense of different size characters.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Kinky text

Post by richmond62 » Tue Apr 12, 2016 6:32 am

But also unexpected in that the different sized letters don't directly correspond to those in the originating
text field in Livecode.

This is NO GOOD as far as exporting results goes.

Post Reply