Skip to content

Commit

Permalink
Fix #85
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Mar 7, 2024
1 parent e4b5d35 commit 3171ae9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# systemfonts (development version)

* Fix a bug in `shape_string()` using `vjust = 1` (#85)

# systemfonts 1.0.4

* Use Courier New as default mono font on macOS instead of Courier to avoid
Expand Down
2 changes: 1 addition & 1 deletion src/string_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ bool FreetypeShaper::finish_string() {
x_pos[i] += left_border;
}
}
if (cur_vjust != 1.0) {
if (cur_vjust != 0.0) {
long just_height = top_border - pen_y;
for (unsigned int i = 0; i < x_pos.size(); ++i) {
y_pos[i] += - pen_y - cur_vjust * just_height;
Expand Down

0 comments on commit 3171ae9

Please sign in to comment.