Skip to content

SP5: String measurement ignores leading and trailing whitespace #3223

@lindpatr

Description

@lindpatr

Issue: (Text display is wrong when string to display contains spaces at start or at end.)

ScottPlot Version: (5.0.17)

Code Sample: Based on https://scottplot.net/cookbook/5.0/Text/Formatting/ sample code.

// Picture left side
var text = myPlot.Add.Text("Hello, World", 42, 69);

// Picture center
// 3 leading space characters
var text = myPlot.Add.Text("   Hello, World", 42, 69); 

// Picture  right side
// 3 trailing space characters
var text = myPlot.Add.Text("Hello, World   ", 42, 69); 

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedScott won't do this soon, but PRs from the community are welcome!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions