Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1219

Batik measures text height incorrectly

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: Bridge
    • Labels:

      Description

      Batik calculates the area behind text (e.g., for feFlood in a filter) by calculating a tight rectangle bound the character glyphs.

      Chrome, Firefox and Edge all calculate a somewhat looser rectangle, including the full line height. Their behavior seems correct, as it results in a much more pleasing and intuitive effect when multiple text segments are filtered in one line of text.

      Attached files:

      • tqbf2-outer.svg - a file demonstrating this problem. This can be loaded directly in any current browser
      • tqbf2.pdf - the results in Batik. This differs from the browser results.

      Proposed fix:
      https://github.com/deg/batik/commit/c0280311b692d5a43529c01a44450ad92fe692a9

        Attachments

        1. tqbf2-outer.svg
          3 kB
          David Goldfarb
        2. tqbf2.pdf
          31 kB
          David Goldfarb

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              davidgoldfarb David Goldfarb
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: