Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
Tinderbox Users >> Moving to Tinderbox 6 >> Text rendering and shrink to fit

Message started by AndyDent on Mar 17th, 2015, 5:06am

Title: Text rendering and shrink to fit
Post by AndyDent on Mar 17th, 2015, 5:06am

Map view - Shrink to Fit puzzles me - is it documented anywhere or just very buggy? (revised after upgrading to 6.1.3)

I'm coming back to TB after dabbling off and on for years but being mostly Windows-based (working for other people). Now I'm working for myself again I'm happily Mac-based so resolved to give TB a good go.

My first impression of TB6 was that a lot of effort has gone into prettying up the UI but there seem to be weird things happening in font rendering.

I'm not sure what the intended behaviour is as I can't find any documentation of these features.

Behaviour under 6.1.3b121
It is a lot more predictable than the buggy behaviour described below in 6.1.1 but the end results are disappointingly still unusable.

Shrink to fit now seems determined to fit titles to one or two lines, regardless of the box height. It does properly word-wrap but the net result of applying it to a range of notes in the map is that most of them now have tiny titles with font sizes smaller than the Inspector allows (eg: 6.8 showing up in the "Show Fonts" standard Mac display).

I went looking through attributes to see if there was anything which might be triggering this max of two lines for a shrunk title but couldn't find anything.

I did realise I can do a Select All and use the Font dialog to set them all to a common size then manually resize individual notes to show all text. I'll try carrying on with that approach as I would really like to get my money's worth from TBX (I despise using paper sketches and otherwise am mostly using Doxygen and Graphviz for "visual" thinking).

So, colour me a bit happier but still rueful.

Behaviour under 6.1.1b114

Does "Shrink to Fit" apply to the size of a note or the text within? It mostly seems to affect font size but I've also seen notes contract.

I thought it might change its behaviour if you have changed the Document Settings - Maps option for "If note name is long:"? but that seems to have no effect.

As a general bug, it seems to have a problem with text measurement where the last "item" is lost off the rectangle.

"A Touch of Skeumorphism" consistently wraps at the last "m" which then fails to disappear. If I size the note or adjust the font so it appears then choose Shrink to Fit, the title will expand in font size so that letter disappears. So it's not even word-wrapping as it's losing a letter from a contiguous word.

"Visual Identity across platforms" is OK if I have the proportions of the note adjusted so it's on three lines. When I make the note wider so it's two lines of text, then choose Shrink, the font size increases dramatically so I have three lines reading
and the fourth word has disappeared off the bottom

Has TB6 been this buggy since it shipped or are these relatively new bugs?

Overall, after a blast of brainstorming and typing in quick note titles, I now have lots of partly-readable items in the Map and have wasted a lot of time trying to make their text readable.

I'm going back to paper for now as I have software to ship and can't waste more time fiddling within something this painful, which is getting in the way of my sketching out ideas.

OS/X 10.10.2

(very disappointed) :'(

Title: Re: Text rendering and shrink to fit
Post by Mark Bernstein on Mar 17th, 2015, 10:37am

Well, I sure am sorry you're disappointed.  I canít answer your question about 6.1.1 offhand; I don't recall any changes in Note ▸ Shrink To Fit, but I may have forgotten something. See the release notes if you're interested.

I've checked the code, and see no way that Edit ▸ Shrink To Fit would change the $Width of a note.  It does force an update of the view, so if there were some change in note appearance that had not yet been reflected on screen, I suppose it could be reflected there.

Shrink To Fit performs a binary search in the range of 4pt to 144pt, seeking to identify the largest font size that will not overflow the height of the display area. That display area in turn is calculated based on the note size, the presence or absence of a subtitle, the presence or absence of a badge, and also the shape of the note.

Itís a bagatelle. Weíve had Note ▸ Expand Vertically and Note ▸ Expand Horizontally for some time, and a backstage crew member asked "could we have this, too?"  I donít believe we have pending issues with it.

One likely catch is that the size estimate in Shrink To Fit is based on Core Text, while the actual display typography is done by an NSTextField subclass. That leaves potential for mismatches, especially (a) in edge cases where a pixel or two matters, (b) with challenging typography, complex ligatures and swashes and adaptive type, and (c) in interactions with badges, borders, and shapes, all of which are numerous and, in the nature of things, lightly tested.

Title: Re: Text rendering and shrink to fit
Post by AndyDent on Mar 17th, 2015, 12:22pm

Hi Mark

In 6.1.3 it is not changing the size of the note but (just) the font sizes within, and as I said I only thought it may have changed the size of a note previously.

Something awesomely weird is happening on my systems. I thought it might have been a side-effect of using a Macbook Retina but on my desktop I get the same thing. A simple note with the title "Touch bounded area(s)" when I apply Shrink to Fit reduces to 4.1pt font at a single line.

I created a brand new document with a single note sized to show that text at 14pt Helvetica Neu. This time when I choose Shrink to Fit, it resizes it down to two lines at 11pt.

The effect is not font-dependent - similar results with Garamond and Gill Sans.

I just did a few minutes more experimenting and one interesting point is if I have entered text into the note, it seems to work normally both when the text is entered (it shrinks to show the first line of the text) and after I erase the text so there's just a note title again.

I tried creating another note and I think I've identified a common factor, maybe something I misunderstood. There's an area at the top of the note on the map which is kept clear by the Shrink to Fit. Here you can see I duplicated a note and applied StF to the duplicate alongside.

I'm sympathetic as I've written lots of text layout code including report-writer and various other page layout apps. So I know how nasty it can be especially when you have different contexts for measurement vs rendering. I've recently been working on an iOS app which has its own database-driven localisations so I've got my own scars when it comes to weird text rendering :-/

Title: Re: Text rendering and shrink to fit
Post by Mark Bernstein on Mar 19th, 2015, 2:26pm

Yes, Tinderbox was being too conservative -- way too conservative -- in estimating the available width and height of the note.  Shrink To Fit will avoid excessive shrinkage in the next release.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.