Fix text on a path rendering accuracy

This commit is contained in:
Mikael Sand
2017-08-27 01:09:01 +03:00
parent 6cc3f76b24
commit 8dd795bdd7
6 changed files with 1 additions and 47 deletions
-8
View File
@@ -70,8 +70,6 @@
945A8AF81F4CE3E8004BBF6B /* AlignmentBaseline.m in Sources */ = {isa = PBXBuildFile; fileRef = 945A8AF71F4CE3E8004BBF6B /* AlignmentBaseline.m */; };
945A8AF91F4CE3E8004BBF6B /* AlignmentBaseline.m in Sources */ = {isa = PBXBuildFile; fileRef = 945A8AF71F4CE3E8004BBF6B /* AlignmentBaseline.m */; };
9494C47A1F47116800D5BCFD /* PerformanceBezier.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9494C4771F4710FE00D5BCFD /* PerformanceBezier.framework */; };
9494C4BB1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m in Sources */ = {isa = PBXBuildFile; fileRef = 9494C4BA1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m */; };
9494C4BC1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m in Sources */ = {isa = PBXBuildFile; fileRef = 9494C4BA1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m */; };
9494C4D81F473BA700D5BCFD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9494C4D71F473BA700D5BCFD /* QuartzCore.framework */; };
9494C4DA1F473BCB00D5BCFD /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9494C4D91F473BCB00D5BCFD /* CoreText.framework */; };
9494C4DC1F473BD900D5BCFD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9494C4DB1F473BD900D5BCFD /* CoreGraphics.framework */; };
@@ -313,8 +311,6 @@
945A8AF71F4CE3E8004BBF6B /* AlignmentBaseline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AlignmentBaseline.m; path = Text/AlignmentBaseline.m; sourceTree = "<group>"; };
945A8AFA1F4CE41E004BBF6B /* AlignmentBaseline.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AlignmentBaseline.h; path = Text/AlignmentBaseline.h; sourceTree = "<group>"; };
9494C4711F4710FE00D5BCFD /* PerformanceBezier.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PerformanceBezier.xcodeproj; path = PerformanceBezier/PerformanceBezier.xcodeproj; sourceTree = "<group>"; };
9494C4B91F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIBezierPath+getTransformAtDistance.h"; path = "Utils/UIBezierPath+getTransformAtDistance.h"; sourceTree = "<group>"; };
9494C4BA1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIBezierPath+getTransformAtDistance.m"; path = "Utils/UIBezierPath+getTransformAtDistance.m"; sourceTree = "<group>"; };
9494C4D71F473BA700D5BCFD /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
9494C4D91F473BCB00D5BCFD /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
9494C4DB1F473BD900D5BCFD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@@ -581,8 +577,6 @@
7F9CDAF91E1F809C00E0C805 /* RNSVGPathParser.m */,
1039D29B1CE72177001E90A8 /* RCTConvert+RNSVG.h */,
1039D29C1CE72177001E90A8 /* RCTConvert+RNSVG.m */,
9494C4B91F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.h */,
9494C4BA1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m */,
);
name = Utils;
sourceTree = "<group>";
@@ -730,7 +724,6 @@
9494C5051F4B5BE800D5BCFD /* FontWeight.m in Sources */,
1039D28B1CE71EB7001E90A8 /* RNSVGPath.m in Sources */,
7F08CEA01E23479700650F83 /* RNSVGTextPath.m in Sources */,
9494C4BB1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m in Sources */,
1023B4931D3DF5060051496D /* RNSVGUse.m in Sources */,
10BEC1C21D3F680F00FDCB19 /* RNSVGLinearGradientManager.m in Sources */,
1039D2951CE71EC2001E90A8 /* RNSVGText.m in Sources */,
@@ -798,7 +791,6 @@
A361E7751EB0C33D00646005 /* RNSVGEllipse.m in Sources */,
A361E7761EB0C33D00646005 /* RNSVGPath.m in Sources */,
A361E7771EB0C33D00646005 /* RNSVGTextPath.m in Sources */,
9494C4BC1F472DDA00D5BCFD /* UIBezierPath+getTransformAtDistance.m in Sources */,
A361E7781EB0C33D00646005 /* RNSVGUse.m in Sources */,
A361E7791EB0C33D00646005 /* RNSVGLinearGradientManager.m in Sources */,
9494C5061F4B5BE800D5BCFD /* FontWeight.m in Sources */,
-1
View File
@@ -1,4 +1,3 @@
#import <React/UIView+React.h>
#import <CoreText/CoreText.h>
#import "FontData.h"
-5
View File
@@ -1,8 +1,3 @@
//
// Generated by the J2ObjC translator. DO NOT EDIT!
// source: GlyphContext.java
//
#import "GlyphContext.h"
#import <React/RCTFont.h>
#import "RNSVGNode.h"
+1
View File
@@ -801,6 +801,7 @@ CGFloat getTextAnchorOffset(enum TextAnchor textAnchor, CGFloat width)
//_bezierTransformer = [textPath getBezierTransformer];
textPathPath = [textPath getPath];
_path = [UIBezierPath bezierPathWithCGPath:[textPathPath getPath:nil]];
_path = [_path bezierPathByFlatteningPathAndImmutable:YES];
pathLength = [_path length];
return NO;
}
@@ -1,15 +0,0 @@
//
// UIBezierPath+getTransformAtDistance.h
// RNSVG
//
// Created by Janne Gylling on 18/08/2017.
//
//
#import <UIKit/UIKit.h>
@interface UIBezierPath (getTransformAtDistance)
- (CGAffineTransform)getTransformAtDistance:(CGFloat)distance;
@end
@@ -1,18 +0,0 @@
//
// UIBezierPath+getTransformAtDistance.m
// RNSVG
//
// Created by Janne Gylling on 18/08/2017.
//
//
#import "UIBezierPath+getTransformAtDistance.h"
@implementation UIBezierPath (getTransformAtDistance)
- (CGAffineTransform)getTransformAtDistance:(CGFloat)distance
{
return CGAffineTransformIdentity;
}
@end