mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-02 06:35:04 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user