[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/video font.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/video font.c |
Date: |
22 Dec 2003 18:47:56 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 03/12/22 18:47:56
Modified files:
src/video : font.c
Log message:
disable the character count between two '~' chars (from Carlos Marin)
Patches:
Index: stratagus/src/video/font.c
diff -u stratagus/src/video/font.c:1.66 stratagus/src/video/font.c:1.67
--- stratagus/src/video/font.c:1.66 Sat Dec 20 16:33:48 2003
+++ stratagus/src/video/font.c Mon Dec 22 18:47:55 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: font.c,v 1.66 2003/12/20 05:33:48 jsalmon3 Exp $
+// $Id: font.c,v 1.67 2003/12/22 07:47:55 wizzard Exp $
//@{
@@ -511,10 +511,13 @@
int width;
const unsigned char* s;
const char* widths;
+ int isformat;
widths = Fonts[font].CharWidth;
+ isformat = 0;
for (width = 0, s = text; *s; ++s) {
if (*s == '~') {
+ isformat = !isformat;
if (!*++s) { // bad formated
string
break;
}
@@ -522,7 +525,9 @@
continue;
}
}
+ if (!isformat) {
width += widths[*s - 32] + 1;
+ }
}
return width;
}
- [Stratagus-CVS] stratagus/src/video font.c,
address@hidden <=