Bug #416

pstext -M overflow handling

Added by Kristof over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:2013-10-19
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:-
Affected version:all Platform:Mac OS X

Description

Plotting text on a map in a box with a width smaller than the lenght of the longest word in text, thus overflowing the surrounding box.

  • In case the first word of the paragraph is longer than the surrounding box, the first word is plotted twice with a non-specified offset. See "Box-1" in attached example.
  • In case the longer word is not the first word in the paragraph, the behavior of pstext is as expected. See "Box-2" in attached example.

Expected behavior is as seen in "Box-2".

pstext-overflow.png - Screenshot of generated output of the test-script. (19.3 KB) Kristof, 2013-10-19 04:12

testcase-pstext.sh Magnifier - Test-script for described problem. (646 Bytes) Kristof, 2013-10-19 04:18

Associated revisions

Revision 12851
Added by Paul over 4 years ago

Address issue #416

History

#1 Updated by Paul over 4 years ago

  • Status changed from New to Feedback

We will see if we can fix teh box-1 bug. IN general though, these problems will be tricky to "fix". Possible approaches would be (a) introduce automatic hyphenation, (b) shrink fontsize to accommodate given width, or (c) expand the box width to the minimum needed for longest word. Because all the decisions about type-setting is coded in the PostScript language it is difficult to introduce these changes, but probably not impossible. Automatic hyphenation is probably not an option. What sort of solution would you be looking for?

#2 Updated by Kristof over 4 years ago

Hi Paul,

I would be happy with the behavior of Box-2 where the longest word simply spills over the box. The luxus version would be your expanding box where the width expands to the minimum width required to accommodate the largest word, if the required width is greater than the given one.

All the best,
Kristof

#3 Updated by Paul over 4 years ago

  • Status changed from Feedback to Resolved
  • Assignee set to Paul
  • Affected version changed from 5.0.1 to all

Hi Kristof-

I tried to implement the deluxe version as it was actually simpler. It seems to work. Let me know if it works for you. In r12851.

#4 Updated by Kristof over 4 years ago

Hi Paul,

thank you for solving this. I'm currently on a field trip in New Zealand until mid March and have only spotty to none connectivity. I'll test it when I'm back.

All the best,
Kristof

#5 Updated by Kristof over 4 years ago

Hi Paul,

short update: the folks back home assured me that it works as intended. As mentioned before I'll have a personal look at it mid March.

- Kristof

#6 Updated by Paul over 4 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

OK, closing this for now - resurrect if there are problems.

Also available in: Atom PDF