Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a81805
)
Fix os_string_width.
author
Timo Korvola
<tkorvola@iki.fi>
Sun, 4 Mar 2018 19:53:38 +0000
(21:53 +0200)
committer
David Griffith
<dave@661.org>
Sun, 11 Mar 2018 11:48:50 +0000
(
04:48
-0700)
Width was computed wrong for strings with more than one style or font
change.
src/sdl/sf_fonts.c
patch
|
blob
|
history
diff --git
a/src/sdl/sf_fonts.c
b/src/sdl/sf_fonts.c
index f7bda1e11d36a25c98eafada44b4b7217b512415..2a2a0398b2b6c40e74e8464f066bf5b93a270bcc 100644
(file)
--- a/
src/sdl/sf_fonts.c
+++ b/
src/sdl/sf_fonts.c
@@
-572,12
+572,12
@@
int os_string_width(const zchar *s)
{
if (c == ZC_NEW_STYLE)
{
- wacc
= width+oh; width = 0
;
+ wacc
+= oh
;
os_set_text_style(*s++);
}
else if (c == ZC_NEW_FONT)
{
- wacc
= width+oh; width = 0
;
+ wacc
+= oh
;
os_set_font(*s++);
}
else