Skip to content

Commit

Permalink
Offsetting text on a curve.
Browse files Browse the repository at this point in the history
  • Loading branch information
grhowes committed May 3, 2015
1 parent 075c3bc commit d19dcdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SVGgh/SVGRenderer/GHGlyph.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ +(void) positionGlyphs:(NSArray*)listOfGlyphs alongCGPath:(CGPathRef)pathRef
else
{
CGFloat distanceIntoSegment = nextOffset-runningLength;
CGPoint thePoint = CGPointMake((distanceIntoSegment/segmentLength)*deltaX+currentPoint.x, (distanceIntoSegment/segmentLength)*deltaY+currentPoint.y);
CGPoint thePoint = CGPointMake((distanceIntoSegment/segmentLength)*deltaX+currentPoint.x,
(distanceIntoSegment/segmentLength)*deltaY+currentPoint.y+currentGlyph.offset.y);
[currentGlyph setMidRenderPoint:thePoint withPerpendicular:perpendicularVector];
lengthLeft -= distanceIntoSegment;
runningLength = nextOffset;
Expand Down

0 comments on commit d19dcdb

Please sign in to comment.