Skip to content

Commit

Permalink
Fix up offset scaling for "top/sub" mark combination
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenAsJade committed Sep 17, 2024
1 parent dac25fe commit 0a0ff94
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Goban/SVGRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5353,15 +5353,10 @@ class GCell {
text.setAttribute("text-anchor", "middle");
text.setAttribute("x", cx.toString());

let yy = cy;
let yy = cy + ss * 0.3; /// subscript offset

// Adjust baseline based on the provided font size
yy += font_size * 0.35;
if (room_for_letter) {
yy += ss * 0.6;
} else {
yy += ss * 0.31;
}

if (room_for_sub_triangle) {
yy -= ss * 0.08;
Expand Down

0 comments on commit 0a0ff94

Please sign in to comment.