From 489eccfd6bf36474229c7be81468b0961a162683 Mon Sep 17 00:00:00 2001 From: ShadelessFox Date: Sun, 19 Jan 2025 06:12:23 +0300 Subject: [PATCH] Font Viewer: Fix locale-dependent formatting caused broken `.svg` output --- .../ui/data/viewer/font/exporter/FontExporterSVG.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/font/exporter/FontExporterSVG.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/font/exporter/FontExporterSVG.java index 8e8edf287..e8eb774c8 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/font/exporter/FontExporterSVG.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/font/exporter/FontExporterSVG.java @@ -83,11 +83,11 @@ private static String getSvgPath(@NotNull Path2D path, float ascent) { while (!it.isDone()) { switch (it.currentSegment(coords)) { - case PathIterator.SEG_MOVETO -> sb.append("M%.3f,%.3f".formatted( + case PathIterator.SEG_MOVETO -> sb.append("M%s,%s".formatted( coords[0], ascent - coords[1])); - case PathIterator.SEG_LINETO -> sb.append("L%.3f,%.3f".formatted( + case PathIterator.SEG_LINETO -> sb.append("L%s,%s".formatted( coords[0], ascent - coords[1])); - case PathIterator.SEG_CUBICTO -> sb.append("C%.3f,%.3f,%.3f,%.3f,%.3f,%.3f".formatted( + case PathIterator.SEG_CUBICTO -> sb.append("C%s,%s,%s,%s,%s,%s".formatted( coords[0], ascent - coords[1], coords[2], ascent - coords[3], coords[4], ascent - coords[5]));