cc32130045
compile when using gcc 2.95.
86 lines
2.3 KiB
Text
86 lines
2.3 KiB
Text
$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;
|
|
}
|