       textAnchor = CGPoint(x: size.width * 0.5, y: baselinePosition)
     }
     let anchor = textAnchor + anchorPoint.pointValue
-  
-    textLayer.anchorPoint = CGPoint(x: anchor.x.remap(fromLow: 0, fromHigh: size.width, toLow: 0, toHigh: 1),
-                                    y: anchor.y.remap(fromLow: 0, fromHigh: size.height, toLow: 0, toHigh: 1))
+    let normalizedAnchor = CGPoint(x: anchor.x.remap(fromLow: 0, fromHigh: size.width, toLow: 0, toHigh: 1),
+                                   y: anchor.y.remap(fromLow: 0, fromHigh: size.height, toLow: 0, toHigh: 1))
+    
+    if textStrokeLayer.isHidden == false {
+      if text.strokeOverFill ?? false {
+        textStrokeLayer.removeFromSuperlayer()
+        contentsLayer.addSublayer(textStrokeLayer)
+      } else {
+        textLayer.removeFromSuperlayer()
+        contentsLayer.addSublayer(textLayer)
+      }
+      textStrokeLayer.anchorPoint = normalizedAnchor
+      textStrokeLayer.opacity = Float(rootNode?.textOutputNode.opacity ?? 1)
+      textStrokeLayer.transform = CATransform3DIdentity
+      textStrokeLayer.frame = CGRect(origin: .zero, size: size)
+      textStrokeLayer.position = CGPoint.zero
+      textStrokeLayer.transform = matrix
+      textStrokeLayer.string = attributedString
+      textStrokeLayer.alignmentMode = text.justification.caTextAlignement
+    }
+    
+    textLayer.anchorPoint = normalizedAnchor
     textLayer.opacity = Float(rootNode?.textOutputNode.opacity ?? 1)
     textLayer.transform = CATransform3DIdentity
     textLayer.frame = CGRect(origin: .zero, size: size)
     textLayer.position = CGPoint.zero
     textLayer.transform = matrix
-    textLayer.string = attributedString
+    textLayer.string = baseAttributedString
     textLayer.alignmentMode = text.justification.caTextAlignement
   }
 }

    
    super.init(layer: textLayer, size: .zero)
    contentsLayer.addSublayer(self.textLayer)
    self.textLayer.masksToBounds = false
    
  }
  
  required init?(coder aDecoder: NSCoder) {

    }
    self.rootNode = nil
    self.textDocument = nil
    
    self.textProvider = DefaultTextProvider()
    
    self.interpolatableAnchorPoint = nil
    self.interpolatableScale = nil
    
    super.init(layer: layer)
  }
  
  override func displayContentsWithFrame(frame: CGFloat, forceUpdates: Bool) {
    guard let textDocument = textDocument else { return }
    
    textLayer.contentsScale = self.renderScale
    textStrokeLayer.contentsScale = self.renderScale
    
    let documentUpdate = textDocument.hasUpdate(frame: frame)
    let animatorUpdate = rootNode?.updateContents(frame, forceLocalUpdate: forceUpdates) ?? false
    guard documentUpdate == true || animatorUpdate == true else { return }
