Loading ...
Sorry, an error occurred while loading the content.

Text getBBox problem in Firefox

Expand Messages
  • Vincent Hardy
    Hello, I am running into a problem with getBBox on text elements where the bounds returned are the text s visual bounds, and do not account for the text s
    Message 1 of 3 , Mar 2, 2009
    • 0 Attachment
      Hello,

      I am running into a problem with getBBox on text elements where the bounds returned are the text's visual bounds, and do not account for the text's ascent and descent. From the SVG specification, section 7.11 (http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBox), I believe the full glyph cell should be accounted for:

      "For 'text' elements, for the purposes of the bounding box calculation, each glyph is treated as a separate graphics element. The calculations assume that all glyphs occupy the full glyph cell. For example, for horizontal text, the calculations assume that each glyph extends vertically to the full ascent and descent values for the font."

      Is there any way to get the text layout bounds in FireFox and not the thight bounds?

      Thanks in advance,
      Vincent.

      [Non-text portions of this message have been removed]
    • Helder Magalhães
      Hi Vincent, ... I tried to find relevant bug reports [1] or applicable threads [2] but wasn t able to so, in case no replies are received here in a couple of
      Message 2 of 3 , Mar 3, 2009
      • 0 Attachment
        Hi Vincent,

        > Is there any way to get the text layout bounds in FireFox
        > and not the thight bounds?

        I tried to find relevant bug reports [1] or applicable threads [2] but
        wasn't able to so, in case no replies are received here in a couple of
        days, I'd invite you to re-submit this into the mozilla.dev.tech.svg
        mailing list [2], as 1) I'm not sure if all users follow SVG
        Developers and as 2) according to your report this seems to be a
        Firefox-specific issue. Linking or pasting (SVG Developers and
        mozilla.dev.tech.svg don't accept attachments so pasting source code
        seems to be the most feasible alternative to using the Files [3]
        feature) a test case showing the problem should also help towards more
        interesting feedback.

        Regards,
        Helder Magalhães

        [1]
        https://bugzilla.mozilla.org/buglist.cgi?product=Core&component=SVG&bug_status=UNCONFIRMED&order=Bug+Number
        [2] http://groups.google.com/group/mozilla.dev.tech.svg
        [3] http://tech.groups.yahoo.com/group/svg-developers/files
      • Vincent Hardy
        Hi Helder, Thanks for your feedback and pointers. I ll do as you suggest in case there is no response from the Firefox team on this forum. Regards, Vincent. Hi
        Message 3 of 3 , Mar 3, 2009
        • 0 Attachment
          Hi Helder,

          Thanks for your feedback and pointers. I'll do as you suggest in case there is no response from the Firefox team on this forum.

          Regards,
          Vincent.

          Hi Vincent,

          > Is there any way to get the text layout bounds in FireFox
          > and not the thight bounds?

          I tried to find relevant bug reports [1] or applicable threads [2] but
          wasn't able to so, in case no replies are received here in a couple of
          days, I'd invite you to re-submit this into the mozilla.dev. tech.svg
          mailing list [2], as 1) I'm not sure if all users follow SVG
          Developers and as 2) according to your report this seems to be a
          Firefox-specific issue. Linking or pasting (SVG Developers and
          mozilla.dev. tech.svg don't accept attachments so pasting source code
          seems to be the most feasible alternative to using the Files [3]
          feature) a test case showing the problem should also help towards more
          interesting feedback.

          Regards,
          Helder Magalhães

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.