Hanging from the washing line.

Teaching software development? Using LiveCode to build your curriculum? This is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Hanging from the washing line.

Post by richmond62 » Thu Dec 29, 2016 5:55 pm

So: here I am working on my totally immortal Devawriter Pro[/b] and implementing Grantha script triple stacking.
This involves using a series of ever-diminishing glyphs lower and lower down the staff. To best explain this it is best illustrated
by a snapshot from the font-editor:

[attachment=1]stacker.png[/attachment]
Now, when my Devawriter script assembles those 3 components an pops them into the display field it cuts the thing's bottom off:

[attachment=0]tripeSec.png[/attachment]
I wonder how I should "twiddle" with the line size (?) to get the thing to display everything?
Attachments
tripeSec.png
tripeSec.png (32.8 KiB) Viewed 10528 times
stacker.png

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Hanging from the washing line.

Post by [-hh] » Thu Dec 29, 2016 7:56 pm

Did you already try to use the formattedHeight of <chunk> (and then setting the textheight)?

Connected to that (scroll down there, it's not only for LCB):
http://quality.livecode.com/show_bug.cgi?id=18258
shiftLock happens

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

Re: Hanging from the washing line.

Post by richmond62 » Thu Dec 29, 2016 8:06 pm

No: I hadn't.

If I type: put the formattedHeight of fld "fRESULT" (that's my display field) I get 94,

if I then set the textHeight of the fld to 94 this does NOT help; so where am I going wrong?

I wonder, slightly, if the descender setting in the original font needs resetting using a font editor.

NOPE: just changed the descender from -1000 to -2000 with no visible difference in LiveCode.
mankyFranky.png

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Hanging from the washing line.

Post by [-hh] » Thu Dec 29, 2016 8:42 pm

I have a few fonts where LC formatted-things reports wrong values: it's always too less, never too much.
In that case I enlarge the formattedHeight by a factor (depending on the textSize). Usually a factor of 1.2 is large enough for the height.
And then use it for the textheight. I dont change the font.

For changing the width (that depends also a bit on length of the chunk) and then use it for marginLeft and marginRight we have to work harder.

I think your example would be good for adding to the report cited above (or to open a new report).
shiftLock happens

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

Re: Hanging from the washing line.

Post by jacque » Fri Dec 30, 2016 5:47 pm

Using a fixed line height, try setting the spaceBelow of the truncated line to a few pixels. You'll need to experiment to see what number works.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Hanging from the washing line.

Post by [-hh] » Fri Dec 30, 2016 6:58 pm

Concluding from this and other threads Richmond is deep in font metrics and even willing to adjust these.

But it shouldn't be necessary to adjust "manually" (with each main version of LC) originally properly set metrics to the incorrect text measurement of LC.

Hopefully the soon(?) coming fully pledged "Native Field Object" will solve this, at least to a certain degree **.
https://livecode.com/project/infinite-l ... ld-object/

** Edit: This field object is eventually for mobile. But it needs 'abstract' correct text measurement which could be also used for desktop platforms.
shiftLock happens

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

Re: Hanging from the washing line.

Post by richmond62 » Fri Dec 30, 2016 8:51 pm

You'll need to experiment to see what number works.
Not as far as I can see.

https://www.dropbox.com/s/k4q3wsn4ufhdk ... b.zip?dl=0

This ZIP file contains an illustrative field and my Devawriter.ttf font as it stands at the moment (i.e. not final release version).

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Hanging from the washing line.

Post by [-hh] » Fri Dec 30, 2016 11:47 pm

This font is OK, displays correctly for example in Mac's TextEdit.

But LC cuts the large descenders and would similarly cut large ascenders, no matter the settings of fixedlineHeight, textHeight or spaceBelow/spaceAbove.

Once again: You should report this as bug.

p.s. You have a numToChar(13) in this line. LC doesn't display it, TextEdit does (I removed it for the screenshot, has no influence on the buggy LC display).
Attachments
richmondText.png
Display using TextEdit
richmondText.png (15.9 KiB) Viewed 10381 times
shiftLock happens

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

Re: Hanging from the washing line.

Post by richmond62 » Sat Dec 31, 2016 9:19 am

Thank you, -hh, for that valuable feedback.

Bug 19040

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

Re: Hanging from the washing line.

Post by jacque » Sat Dec 31, 2016 7:49 pm

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Hanging from the washing line.

Post by richmond62 » Sat Dec 31, 2016 8:30 pm

Messing around with spaceBelow ONLY makes more space between lines of text, what it
does NOT do is stop the bottom of the text being cut off.

Post Reply

Return to “Teaching with LiveCode”