Commit 20938e93 authored by Jonathan Watt's avatar Jonathan Watt
Browse files

Bug 939534 - Follow-up to address review comments. r=heycam

parent 20529bf0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -784,7 +784,7 @@ nsSVGGlyphFrame::GetCharacterPositions(nsTArray<CharacterPosition>* aCharacterPo
        Point offsetFromPath = normal * pos.y;
        cp[i].pos = ThebesPoint(pt + offsetFromPath) -
                      ThebesPoint(tangent) * halfAdvance;
        double glyphRotation = atan2(tangent.y, tangent.x);
        Float glyphRotation = atan2f(tangent.y, tangent.x);
        cp[i].angle = glyphRotation + angle;
      }
      pos.x += 2 * halfAdvance;
+2 −2
Original line number Diff line number Diff line
@@ -4809,13 +4809,13 @@ nsSVGTextFrame2::DoTextPathLayout()
      // Position the character on the path at the right angle.
      Point tangent; // Unit vector tangent to the point we find.
      Point pt = path->ComputePointAtLength(Float(midx), &tangent);
      double glyphRotation = atan2(tangent.y, tangent.x);
      Float rotation = atan2f(tangent.y, tangent.x);
      Point normal(-tangent.y, tangent.x); // Unit vector normal to the point.
      Point offsetFromPath = normal * mPositions[i].mPosition.y;
      pt += offsetFromPath;
      Point direction = tangent * sign;
      mPositions[i].mPosition = ThebesPoint(pt) - ThebesPoint(direction) * halfAdvance;
      mPositions[i].mAngle += glyphRotation;
      mPositions[i].mAngle += rotation;

      // Position any characters for a partial ligature.
      for (uint32_t j = i + 1;