From 261ab4692d3c75ec5e6ec664e5fb7bafe7fa5de7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Oct 2026 00:34:24 +0000 Subject: [PATCH] fix(ui): charts build their European-digit substitution without an invariant culture override NumberSubstitution refuses the invariant culture as an override, so DrawingElement's type initializer threw and no chart could be created: the screen tests and the capture failed at the first chart. The substitution now keeps the default culture source and only sets the European method, which ignores the culture anyway. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC --- src/Titano.Ui/Visuals/DrawingElement.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Titano.Ui/Visuals/DrawingElement.cs b/src/Titano.Ui/Visuals/DrawingElement.cs index 9268485b..26b2b90d 100644 --- a/src/Titano.Ui/Visuals/DrawingElement.cs +++ b/src/Titano.Ui/Visuals/DrawingElement.cs @@ -1,5 +1,4 @@ using System.Collections.Specialized; -using System.Globalization; using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; @@ -403,7 +402,7 @@ public abstract class DrawingElement : FrameworkElement /// Digits as the rest of the UI shows them: with the UI culture alone, Arabic text before a number would turn its /// digits into Arabic-Indic ones in charts only. /// - private static readonly NumberSubstitution EuropeanDigits = new(NumberCultureSource.Override, CultureInfo.InvariantCulture, NumberSubstitutionMethod.European); + private static readonly NumberSubstitution EuropeanDigits = new() { Substitution = NumberSubstitutionMethod.European }; private FormattedText Format(string text, double emSize, Brush brush, bool semiBold, FlowDirection direction) {