Thomas >uhm, now it gets crude. I haven't looked in detail into the code, but a >quick inspection led me to this hack: > > vardef p_label@#(expr txt,pos,rot,mode) = > if abs(llcorner txt - ulcorner txt) > 5pt: > p_label_orig@#(txt,pos,rot,mode) > else: > last_write := charcode > fi; > enddef; > >Has to do with the temporary file written by write_circ_bbox, which >might not be created if the label gets skipped.
Thanks for those comments. They make sense. Since modifying the code as above I have no errors, but predicting which labels will be hidden becomes harder to predict. For example, considering only single line labels, if ... if abs(llcorner txt - ulcorner txt ) > 3pt: then labels with fonts of 5pt are printed, but not 4.5pt, 3pt or less. This at least is fairly constant, so I imagined there could be a linear scale factor affecting the behaviour. If I use scale 1 2000 and base-scale 1 1000 then the output is less predictable on the basis of font pts alone. All my samples were lower case. If ... if abs(llcorner txt - ulcorner txt ) > 3pt: then labels with fonts of 9pt are always printed, labels with fonts of 8pt are generally printed, labels with fonts of 7 are printed in some cases, and labels with fonts of 6pt are never printed. I am guessing it relates to the specific character size and shape within the label text. Ie p, q, g, ( push the boundaries of the label further than some other characters. So my tentative conclusion is that the test above may hide text smaller than size = 3pt * 1.5 * scale / base-scale, And is certain to hide text with font size = 3pt * scale / base-scale or less. So one needs to set the test limit and font sizes to avoid having too many labels in this 'ambiguous' zone. Rather crude, but it does enable setting up layouts that give fairly automatic text visibility based on scale of the output. Bruce
