GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Text boxes clip text

Click to view RSS...
Author Text or label boxes show clipped text on screen, regardless of how much text padding is added
Posted Tuesday, February 1, 2011 - Post #27511
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Customers
GenoPro version: 2.5.4.1

Last Login: Wednesday, February 29, 2012
Posts: 3, Visits: 21
Text or label boxes show clipped text on screen, regardless of how much text padding is added. Similar bug was present in Genopro 2007 and is actually worse in the new version. What can be done to stop this? (Improvement: 2007 version reformatted text box layout when printing -- seems to be fixed in new version).

Edited: Tuesday, February 1, 2011 by GenoProSupport
Posted Tuesday, February 1, 2011 - Post #27513
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 2:09 PM
Posts: 4,887, Visits: 22,761
This is a known issue that has been haunted me for years (since 1998 to be more precise).

The problem is with the GenoPro zoom. In a nutshell, GenoPro use GetTextExtentEx() to determine the text length of each character so it can split a paragraph into lines.  Each word is then appended until there is no more space to fit on the line, and then the text is wrapped on the next line.  The problem is the API GetTextExtentEx() is not consistent, and depending of the zoom may return a different value.  I have seen up to 6 pixels difference in text height depending on the zoom, so if drawing the name "Jim" at normal size, the text height would be 15 pixels, however changing the zoom may give 12 pixels up to 18 pixels for the same text.  Well, 6 pixels on 15 is a 40% error, and if you have a lot of text, the text may not fit in the label rectangle when printing.

Before GenoPro 2011, I was recalculating the text length almost each time the zoom would change or before printing.  This would make sure the text would not be clipped, however changing the zoom (or printing) would result in a different text layout.  For instance, on the screen, a comment in a text label would appear on two lines, however once printed on paper, would appear on 3 lines (or worse, on two lines, because the third line would be excluded / clipped out because the text box was too small to fit 3 lines).

During the time of GenoPro Monica, I worked with a publisher to produce a book about genogram.  The publisher needed reliable screenshots.  As I wrote in previous posts Problem with Text Labels cutting off parts of words at end of lines and The text layout is inconsistent depending on the zoom, I had been toying the idea of using a Display Context to measure the text and one to draw the text.  Therefore the text is always measured at 100% of the zoom, so the text layout is consistent regardless of the zoom and printing.  The problem however is Windows sometimes would clip the text because the API ExtTextOut() draws the text larger than what was measured.

There are plenty of articles on the web about this problem.  It is ironic I cannot find the exact article I found.  I am sure I saved the whole article on my harddisk, however I cannot find it now.

One solution I have in mind for GenoPro Gamma is to use a new scaling of GenoPro for drawing.  At the moment, the internal scale is the same as what you see on the screen.  If GenoPro uses a scale 10 times bigger, then the error would be relatively smaller.  So instead of using a 9 point font, giving about 15 pixels height, GenoPro would use a 90 point font producing a font height of 150 pixels.  The error of 3 pixels would be negligible on a 150 pixel measurement, compared to the current measurement of 15 pixels.

Edited: Tuesday, February 1, 2011 by GenoProSupport


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse