Skip to content

Commit

Permalink
Font Viewer: Fix locale-dependent formatting caused broken .svg output
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Jan 19, 2025
1 parent 0c18c10 commit 489eccf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down

0 comments on commit 489eccf

Please sign in to comment.