Closed hawson closed 8 years ago
Thanks for your pull request!
Two things: first, this pull request should be against the 0.97-maintenance branch. master is dramatically changed from the recent 0.98 release. Your patch currently shows as changing 222 files! :-)
The other: I can't see the actual change, because 222 files, but what does this do with angled text (e.g. link comments, or bwlabels in 'angled' style)? Still a vertical offset, or an offset at a right-angle to the text baseline? Because I think it should be the second to be intuitive.
because 222 files
Yeah, oops. :-/
request should be against the 0.97-maintenance branch
Okay. I'll close this one out, and submit it against that branch.
bq. what does this do with angled text
It "just works". :-D The "fudge" only affects the height of the text box, so anything else that uses that for calculations should work correctly:
This small patch adds a new attribute to defined fonts, allowing for a vertical offset anywhere a font is used. The patch is against the git commit 70c3212 (tagged with "version-0.98").
I have a number of links that have poor bounding boxes, and they display poorly in links, as shown in this example:
However, with the patch, and adding a small offset, it looks much better:
Note that this can be (ab)used to allow for BWLABELs that are rendered above or below the link line, instead directly on top of it...similar to how BWLABELPOS can move the label to the left and right. A quick example that shows the BWLABEL text rendered just "below" it's link: .
In the configuration file, the offset is noted as a new, optional, element to
FONTDEFINE
. To create the 2nd image (with less overhead whitespace):FONTDEFINE 200 docs/example/Vera 8 -6
The 3rd image uses an offset in the other direction, plus a using existing BW* options:
Unfortunately, the offset will depend entirely on the font used. An offset of
-6
looks good for this font (Bitstream Vera Sans), it may not for other fonts. It also depends on the size of the font: using a pt size of 12, needs a different offset.