question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ClipBox too small with transformed reused shape (circus tent emoji example)

See original GitHub issue

Simplifying the circus tent emoji, in the Skia rendering, the second yellow patch of the vertical tent wall goes missing. This path seems to be a mirrored version of the left side left patch of the vertical wall.

Whether it gets shifted out of the viewport or whether something goes wrong with the color line coordinates, similar to issue #334 needs investigation.

tent

Simplified SVG

<svg enable-background="new 0 0 128 128" viewBox="0 0 128 128"
	xmlns="http://www.w3.org/2000/svg">
	<linearGradient id="g" x1="32.5" x2="32.5" y1="64.167" y2="125.94" gradientUnits="userSpaceOnUse">
		<stop stop-color="#FDD835" offset="0"/>
		<stop stop-color="#F9A825" offset="1"/>
	</linearGradient>
	<path d="m20 64s12 24 8 60h16s4-44-4-60h-20z" fill="url(#g)"/>
	<linearGradient id="f" x1="95.5" x2="95.5" y1="64.167" y2="125.94" gradientUnits="userSpaceOnUse">
		<stop stop-color="#FDD835" offset="0"/>
		<stop stop-color="#F9A825" offset="1"/>
	</linearGradient>
	<path d="m108 64s-12 24-8 60h-16s-4-44 4-60h20z" fill="url(#f)"/>
</svg>

COLR

 <COLR>
    <Version value="1"/>
    <!-- BaseGlyphRecordCount=0 -->
    <!-- LayerRecordCount=0 -->
    <BaseGlyphList>
      <!-- BaseGlyphCount=1 -->
      <BaseGlyphPaintRecord index="0">
        <BaseGlyph value="u1F3AA"/>
        <Paint Format="1"><!-- PaintColrLayers -->
          <NumLayers value="2"/>
          <FirstLayerIndex value="0"/>
        </Paint>
      </BaseGlyphPaintRecord>
    </BaseGlyphList>
    <LayerList>
      <!-- LayerCount=2 -->
      <Paint index="0" Format="10"><!-- PaintGlyph -->
        <Paint Format="4"><!-- PaintLinearGradient -->
          <ColorLine>
            <Extend value="pad"/>
            <!-- StopCount=2 -->
            <ColorStop index="0">
              <StopOffset value="0.0"/>
              <PaletteIndex value="1"/>
              <Alpha value="1.0"/>
            </ColorStop>
            <ColorStop index="1">
              <StopOffset value="1.0"/>
              <PaletteIndex value="0"/>
              <Alpha value="1.0"/>
            </ColorStop>
          </ColorLine>
          <x0 value="342"/>
          <y0 value="348"/>
          <x1 value="342"/>
          <y1 value="-231"/>
          <x2 value="-237"/>
          <y2 value="348"/>
        </Paint>
        <Glyph value="glyph00003"/>
      </Paint>
      <Paint index="1" Format="12"><!-- PaintTransform -->
        <Paint Format="10"><!-- PaintGlyph -->
          <Paint Format="4"><!-- PaintLinearGradient -->
            <ColorLine>
              <Extend value="pad"/>
              <!-- StopCount=2 -->
              <ColorStop index="0">
                <StopOffset value="0.0"/>
                <PaletteIndex value="1"/>
                <Alpha value="1.0"/>
              </ColorStop>
              <ColorStop index="1">
                <StopOffset value="1.0"/>
                <PaletteIndex value="0"/>
                <Alpha value="1.0"/>
              </ColorStop>
            </ColorLine>
            <x0 value="933"/>
            <y0 value="348"/>
            <x1 value="933"/>
            <y1 value="-231"/>
            <x2 value="354"/>
            <y2 value="348"/>
          </Paint>
          <Glyph value="glyph00003"/>
        </Paint>
        <Transform>
          <xx value="-1.0"/>
          <yx value="0.0"/>
          <xy value="0.0"/>
          <yy value="1.0"/>
          <dx value="1275.0"/>
          <dy value="0.0"/>
        </Transform>
      </Paint>
    </LayerList>
    <ClipList Format="1">
      <Clip>
        <Glyph value="u1F3AA"/>
        <ClipBox Format="1">
          <xMin value="220"/>
          <yMin value="-220"/>
          <xMax value="800"/>
          <yMax value="360"/>
        </ClipBox>
      </Clip>
    </ClipList>
  </COLR>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
anthrotypecommented, Sep 20, 2021

I can repro now

image

0reactions
anthrotypecommented, Sep 20, 2021

ok, I found where the issue is. When traversing the paint graph and unioning the bounding boxes of the various PaintGlyphs, when a reflection is found (e.g. negtive xx or yy whereby coordinates get flipped along the axes), the code was not normalizing the transformed bounding rectangle by turning it the right way up i.e. such that xMin <= xMax and yMin <= yMax FontTools arrayTools module has a normRect function that does just that. After using it, I get correct bounding boxes and no more unwanted clipping. I’ll make a PR now

Read more comments on GitHub >

github_iconTop Results From Across the Web

🎪 Circus Tent Emoji - Emojipedia
Emoji Meaning​​ A circular 'big top' circus tent, with a triangle flag on top. Circus Tent was approved as part of Unicode 6.0...
Read more >
Untitled
I see trees of green song download, Mysql archive examples, Andy hancock vat, Gameguyz magic barrage, Epic fail gif collection, Fast 73, Revenge...
Read more >
Emoji List - Miloush.net
Looking for emoji? Simple emoji and symbols list with decriptions taken from the Unicode standard. No more no less. Use browser to search....
Read more >
CAw - River Thames Conditions
Doenca celiaca pediatria, 2000 xlt ford ranger, Kari wauhkonen, Used ... Karlene aceto bio, Make gift tags, What is now time in india,...
Read more >
ISO/IEC JTC1/SC2/WG2 N3607 L2/09-114 - Unicode
It is our view that these characters are not “emoji symbols” despite their origin in coded character sets used in Japanese telephony.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found