<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>23067</bug_id>
          
          <creation_ts>2009-01-01 13:51:59 -0800</creation_ts>
          <short_desc>[CG] Canvas: stroked text with pattern or gradient can have truncated miters</short_desc>
          <delta_ts>2025-12-26 11:16:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Canvas</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>krit</cc>
    
    <cc>mdelaney7</cc>
    
    <cc>oliver</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103988</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-01-01 13:51:59 -0800</bug_when>
    <thetext>CanvasRenderingContext2D::drawTextInternal() uses the computed textRect as the size of the mask image created for painting text stroke with a gradient or pattern.

textRect is too small if stroking text, because it does not take the bounds of the stroke into account; it fails to account for miters etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103990</commentid>
    <comment_count>1</comment_count>
      <attachid>26351</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-01-01 13:58:02 -0800</bug_when>
    <thetext>Created attachment 26351
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108479</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2009-02-05 12:39:51 -0800</bug_when>
    <thetext>Maybe Path::strokeBoundingRect() can help here. We moved it from SVG to Path. See SVGPaintServer.cpp and RenderObject.cpp for the usage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111407</commentid>
    <comment_count>3</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2009-02-27 00:25:47 -0800</bug_when>
    <thetext>Other platforms don&apos;t use clipToImageBuffer anymore. That means it&apos;s only a CG related bug.
My last suggestion can&apos;t work here. Text&apos;s are no paths :-P

But why using clipToImageBuffer for both, gradients and pattern. We just need it for gradients, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702854</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-10-29 14:02:43 -0700</bug_when>
    <thetext>&lt;rdar://problem/70824500&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>26351</attachid>
            <date>2009-01-01 13:58:02 -0800</date>
            <delta_ts>2009-01-01 13:58:02 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>canvas-stroked-text.html</filename>
            <type>text/html</type>
            <size>1313</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
Ly9FTiIKICAgImh0dHA6Ly93d3cudzMub3JnL1RSL2h0bWw0L2xvb3NlLmR0ZCI+Cgo8aHRtbCBs
YW5nPSJlbiI+CjxoZW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DEwMCk7CiAgICAgIGN0eC5maWxsVGV4dCgiVlciLCAzMCwg
MTAwKTsKCiAgICAgIGN0eC5zdHJva2VTdHlsZSA9IGdyYWRpZW50OwogICAgICBjdHguc3Ryb2tl
VGV4dCgiVlciLCAyMjAsIDEwMCk7CiAgICAgIGN0eC5maWxsVGV4dCgiVlciLCAyMjAsIDEwMCk7
CiAgICB9CiAgICAKICAgIGZ1bmN0aW9uIHBhZ2VMb2FkZWQoKQogICAgewogICAgICBpbml0aWFs
aXplQ2FudmFzKCk7CiAgICB9CiAgPC9zY3JpcHQ+CjwvaGVhZD4KPGJvZHkgb25sb2FkPSJwYWdl
TG9hZGVkKCkiPgoKPHA+TWl0ZXJzIG9uIGdyYWRpZW50IHN0cm9rZSBzaG91bGQgbm90IGJlIHRy
dW5jYXRlZDwvcD4KPGNhbnZhcyBpZD0iY2FudmFzIj48L2NhbnZhcz4KCjwvYm9keT4KPC9odG1s
Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>