Skip to content

SP5: Add international font detection to labels #3184

@prime167

Description

@prime167

image

Issue:

  • Left Label show Chinese as rectangles
  • .Bold = false does not work

Reproducing:

        WpfPlot1.MouseDoubleClick += WpfPlot1_MouseDoubleClick;
        WpfPlot1.Plot.Benchmark.IsVisible = false;
        WpfPlot1.Plot.Axes.DateTimeTicks(Edge.Bottom);

        WpfPlot1.Plot.Style.SetFontFromText("中文");
        WpfPlot1.Plot.Title("测试");

        WpfPlot1.Plot.Axes.Bottom.Label.Text = "时间";
        WpfPlot1.Plot.Axes.Left.Label.Text = "已占用 (GB)"; // does not work
        WpfPlot1.Plot.Axes.Bottom.Label.Alignment = Alignment.MiddleCenter;
        WpfPlot1.Plot.Axes.Bottom.Label.Rotation = 0;
        WpfPlot1.Plot.Axes.Bottom.Label.AntiAlias = true;
        WpfPlot1.Plot.Axes.Bottom.Label.Bold = false;

        WpfPlot1.Plot.Axes.Left.Label.OffsetX = -8;
        WpfPlot1.Plot.Axes.Left.Label.Alignment = Alignment.MiddleCenter;
        WpfPlot1.Plot.Axes.Left.Label.AntiAlias = true;
        WpfPlot1.Plot.Axes.Left.Label.Bold = false; // does not work
        WpfPlot1.Refresh();

System Details

  • ScottPlot Version: 5.0.14-beta
  • Operating System: Windows 10
  • Application Type: WPF
  • .NET Version: .NET 8.01

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions