internal static Tuple<TextEntity, Curve, TextEntity> CreateTextEntity(Leader leader, string text, double scale)
{
    var doc = RhinoDoc.ActiveDoc;
    var Pt = leader.Points3D[2];
    double baseTextHeight = 2.5;
    if (Pt == Point3d.Unset)
        return null;

    var xAxis = doc.Views.ActiveView.ActiveViewport.ConstructionPlane().XAxis;
    var yAxis = doc.Views.ActiveView.ActiveViewport.ConstructionPlane().YAxis;

    var txtObj = new TextEntity
    {
        Text = text,
        Plane = new Plane(Pt, xAxis, yAxis),
        TextHeight = baseTextHeight * scale,
        Justification = TextJustification.MiddleCenter
    };

    var txtObj2 = new TextEntity
    {
        Text = text,
        Plane = new Plane(Pt, xAxis, yAxis),
        TextHeight = baseTextHeight * scale,
        Justification = TextJustification.MiddleCenter
    };

    Plane recplane;
    // Determine the text style based on scale
    string styleName = GetDimensionStyleName(scale, baseTextHeight);
    var textStyle = doc.DimStyles.FindName(styleName) ?? doc.DimStyles.Current;
    txtObj.ParentDimensionStyle = textStyle;

    // Calculate text dimensions
    var txtBbox = txtObj.GetBoundingBox(true);
    var xDim = txtObj.TextModelWidth;
    var yDim = txtObj.TextHeight;

    // Adjust the text position based on leader direction
    if (leader.Points3D[0].X > leader.Points3D[1].X)
    {
        txtObj.Plane = new Plane(Pt + new Vector3d((-1 * xDim* scale), 0, 0), xAxis, yAxis);
    }
    else
    {
        txtObj.Plane = new Plane(Pt + new Vector3d(0, 0, 0), xAxis, yAxis);
    }

    //// Create the surrounding rectangle
    //if (leader.Points3D[0].X > leader.Points3D[1].X)
    //     recplane = new Plane(Pt + new Vector3d(-Math.Max(xDim / 2 + 6, 6) * scale, 0, 0), xAxis, yAxis);
    //else
    //recplane = new Plane(Pt + new Vector3d(Math.Max(xDim / 2 + 6, 6) * scale, 0, 0), xAxis, yAxis);

    var rectWidth = (xDim  + 5 )* scale;
    var rectHeight = (yDim + 1.5) * scale;
    var rectangle = new Rectangle3d(txtObj.Plane, rectWidth, rectHeight);
    // Create filleted corners
    var filletRadius = rectHeight / 2;
    List<Curve> recsegments = new List<Curve>();
    recsegments.AddRange(rectangle.ToNurbsCurve().DuplicateSegments());
    var translation = new Vector3d(Point3d.Origin);
    var translation2 = new Vector3d(Point3d.Origin);
    if (leader.Points3D[0].X > leader.Points3D[1].X)
    {
        Point3d recMid1 = recsegments[1].PointAtLength(recsegments[1].GetLength() / 2);
        Vector3d transformRec = leader.Points3D[2] - recMid1;
        Vector3d transformText2 = new Vector3d(-1 * (2.5 * scale), (1.25 * scale), 0);
        translation = transformRec;
        translation2 = transformText2;
    }
    else
    {
        Point3d recMid2 = recsegments[3].PointAtLength(recsegments[3].GetLength() / 2);
        Vector3d transformRec2 = leader.Points3D[2] - recMid2;
        Vector3d transformText = new Vector3d(2.5 * scale, (1.25 * scale), 0);
        translation = transformRec2;
        translation2 = transformText;
    }



    //Transform the rectangle to center it around the text
    //var translation = new Vector3d(-1 * (rectHeight/2) * scale * yAxis);
    rectangle.Transform(Transform.Translation(translation));
    txtObj.Transform(Transform.Translation(translation2));

    var filletedCurve = Curve.CreateFilletCornersCurve(rectangle.ToNurbsCurve(), filletRadius, 0.01, 0.01);


    return new Tuple<TextEntity, Curve, TextEntity>(txtObj, filletedCurve.ToNurbsCurve(), txtObj2);
}

public void UpdateGeometry(GeometryData newData)
{
    geometryData = newData;
    Enabled = geometryData != null && (geometryData.DashedCurves.Count > 0 ||
                                       geometryData.Curves.Count > 0 ||
                                       geometryData.scale.Count > 0 ||
                                       geometryData.Leaders.Count > 0 ||
                                       geometryData.FilletRectangles.Count > 0);
}

public void Disable()
{
    Enabled = false;
}

protected override void DrawOverlay(DrawEventArgs e)
{
    if (geometryData == null)
        return;

    //Draw Dashed curves
    if (geometryData.DashedCurves != null)
    {
        foreach (var curve in geometryData.DashedCurves)
        {
            Line tempLine = new Line(curve.PointAtStart, curve.PointAtEnd);
            e.Display.DrawPatternedLine(tempLine, Color.Green, (int)LineTypePreview.Dashed, ThicknessPreview);
        }
    }

    // Draw curves
    if (geometryData.DashedCurves != null)
    {
        
        foreach (var curve in geometryData.Curves)
        {
            e.Display.DrawCurve(curve, Color.Green, ThicknessPreview);
        }
    }

    // Draw fillet rectangles
    foreach (var curve in geometryData.FilletRectangles)
    {
        e.Display.DrawCurve(curve, Color.Green, ThicknessPreview);
    }

    // Draw leaders
    foreach (var leader in geometryData.Leaders)
    {
        Line leaderShow = new Line(leader.Points3D[0], leader.Points3D[1]);
        Line leaderShow2 = new Line(leader.Points3D[1], leader.Points3D[2]);
        e.Display.DrawLine(leaderShow, Color.Green, ThicknessPreview);
        e.Display.DrawLine(leaderShow2, Color.Green, ThicknessPreview);
    }

    // Draw texts
    foreach (var text in geometryData.Texts)
    {
        e.Display.DrawText(text, Color.Green);
    }
}


I have these, is it possible to explode the text and previw them as Curves ? I think the there is a problem with Display.drawText() it dosent show the text with the asigned textstyled to the text or the text hieght eather