summaryrefslogtreecommitdiff
path: root/x11/xfstt/patches/patch-at
blob: e9be7e93ef41c5db14800695fde8999b61bed5d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
$NetBSD: patch-at,v 1.1 2004/02/14 22:27:30 kristerw Exp $

--- libfstt/ttfont.cc.orig	Thu Aug  7 08:20:44 2003
+++ libfstt/ttfont.cc	Sat Feb 14 23:17:22 2004
@@ -37,7 +37,7 @@
 	ebdtTable(0), eblcTable(0),
 	mortTable(0), vheaTable(0)
 {
-	debug("TTFont(\"%s\");\n", fileName);
+	debug1("TTFont(\"%s\");\n", fileName);
 
 	if (openError())
 		return;
@@ -296,7 +296,7 @@
 		maxWidth = headTable->xmax - headTable->xmin;
 		maxWidth += headTable->emUnits >> 5;	// +3%
 		maxWidth = maxWidth * mppemx / headTable->emUnits;
-		debug("using maxWidth %d instead\n", maxWidth);
+		debug1("using maxWidth %d instead\n", maxWidth);
 	}
 
 	return maxWidth;
@@ -317,7 +317,7 @@
 		// XXX: 	width = getMaxWidth(mppemx):
 		width += headTable->emUnits >> 5;	// +3%
 		width = width * mppemx / headTable->emUnits;
-		debug("using width %d instead\n", width);
+		debug1("using width %d instead\n", width);
 	}
 
 	return width;
@@ -352,7 +352,7 @@
 	U8 *headTable = 0;
 	int nTables = (buf[4] << 8) + buf[5];
 
-	debug("nTables = %d\n", nTables);
+	debug1("nTables = %d\n", nTables);
 
 	for (int i = 0; i < nTables; ++i) {
 		U8 *b = &buf[12 + i * 16];
@@ -361,24 +361,24 @@
 		int length = (b[12] << 24) + (b[13] << 16) + (b[14] << 8) + b[15];
 		int check = checksum(buf + offset, length);
 
-		debug("offset = %08X, length = %08X\n", offset, length);
+		debug2("offset = %08X, length = %08X\n", offset, length);
 
 		b[4] = (U8)(check >> 24);
 		b[5] = (U8)(check >> 16);
 		b[6] = (U8)(check >> 8);
 		b[7] = (U8)check;
 
-		debug("checksum[%d] = %08X\n", i, check);
+		debug2("checksum[%d] = %08X\n", i, check);
 
 		if (name == 0x68656164) {
 			headTable = buf + offset;
-			debug("headOffset = %08X\n", offset);
+			debug1("headOffset = %08X\n", offset);
 		}
 	}
 
 	int check = checksum(buf, getLength()) - 0xB1B0AFBA;
 
-	debug("csAdjust = %08X\n", check);
+	debug1("csAdjust = %08X\n", check);
 
 	headTable[8] = (U8)(check >> 24);
 	headTable[9] = (U8)(check >> 16);
@@ -458,14 +458,14 @@
 	xlfd += "-normal-" + strSubFamily + '-';
 
 	for (i = xlfd.begin(); i < xlfd.end(); i++)
-		*i = std::tolower(*i);
+		*i = tolower(*i);
 
 	if (p_strFamily)
 		delete p_strFamily;
 	if (p_strSubFamily)
 		delete p_strSubFamily;
 
-	debug("xlfd = \"%s\"\n", xlfd.c_str());
+	debug1("xlfd = \"%s\"\n", xlfd.c_str());
 
 	return xlfd;
 }