Implement kerning, ligatures, etc., and cleanup; in ios.

Implement hasGlyph ligature helper.

Export view property setters for:
 text: textLength, baselineShift, lengthAdjust, alignmentBaseline,
 textPath: side, method, midLine, spacing.

Attempt to fix alignmentBaseline and baselineShift,
but both properties are nil at all times, I must be missing something.
This commit is contained in:
Mikael Sand
2017-08-29 02:34:56 +03:00
parent 0dbddcc2b4
commit 04887af278
15 changed files with 505 additions and 916 deletions
-2
View File
@@ -13,7 +13,6 @@
#import "RNSVGSvgView.h"
#import "RNSVGPath.h"
#import "GlyphContext.h"
#import "RNSVGGlyphContext.h"
@interface RNSVGGroup : RNSVGPath <RNSVGContainer>
@@ -22,7 +21,6 @@
- (void)renderPathTo:(CGContextRef)context;
- (void)renderGroupTo:(CGContextRef)context;
- (RNSVGGlyphContext *)getRNSVGGlyphContext;
- (GlyphContext *)getGlyphContext;
- (void)pushGlyphContext;
- (void)popGlyphContext;
-10
View File
@@ -11,7 +11,6 @@
@implementation RNSVGGroup
{
GlyphContext *_glyphContext;
RNSVGGlyphContext *_RNSVGGlyphContext;
}
- (void)renderLayerTo:(CGContextRef)context
@@ -52,17 +51,10 @@
CGFloat width = CGRectGetWidth(clipBounds);
CGFloat height = CGRectGetHeight(clipBounds);
_RNSVGGlyphContext = [[RNSVGGlyphContext alloc] initWithDimensions:width
height:height];
_glyphContext = [[GlyphContext alloc] initWithScale:1 width:width
height:height];
}
- (RNSVGGlyphContext *)getRNSVGGlyphContext
{
return _RNSVGGlyphContext;
}
- (GlyphContext *)getGlyphContext
{
return _glyphContext;
@@ -70,13 +62,11 @@
- (void)pushGlyphContext
{
//[[[self getTextRoot] getRNSVGGlyphContext] pushContext:self.font];
[[[self getTextRoot] getGlyphContext] pushContextWithRNSVGGroup:self font:self.font];
}
- (void)popGlyphContext
{
//[[[self getTextRoot] getRNSVGGlyphContext] popContext];
[[[self getTextRoot] getGlyphContext] popContext];
}