mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
130 lines
4.0 KiB
Plaintext
130 lines
4.0 KiB
Plaintext
$NetBSD: patch-aj,v 1.2 2012/06/13 08:15:14 mef Exp $
|
|
|
|
Convert varargs-macros to old-style macros, to make the package
|
|
compile when using gcc 2.95.
|
|
|
|
--- libfstt/raster_scale.cc.orig 2010-10-04 23:22:48.000000000 +0900
|
|
+++ libfstt/raster_scale.cc 2011-10-17 12:43:12.000000000 +0900
|
|
@@ -103,8 +103,8 @@
|
|
void
|
|
Rasterizer::setPointSize(int _xx, int _xy, int _yx, int _yy, int xres, int yres)
|
|
{
|
|
- debug("_xx = %d,\t_xy = %d\n", _xx, _xy);
|
|
- debug("_yx = %d,\t_yy = %d\n", _xy, _yy);
|
|
+ debug2("_xx = %d,\t_xy = %d\n", _xx, _xy);
|
|
+ debug2("_yx = %d,\t_yy = %d\n", _xy, _yy);
|
|
|
|
if (!(_xx | _xy) || !(_yx | _yy))
|
|
_xx = _yy = 12;
|
|
@@ -136,9 +136,9 @@
|
|
xx >>= 1; xy >>= 1;
|
|
yx >>= 1; yy >>= 1;
|
|
}
|
|
- debug("xx = %d, xy = %d\n", xx, xy);
|
|
- debug("yx = %d, yy = %d\n", yx, yy);
|
|
- debug("exp = %d\n", xxexp);
|
|
+ debug2("xx = %d, xy = %d\n", xx, xy);
|
|
+ debug2("yx = %d, yy = %d\n", yx, yy);
|
|
+ debug1("exp = %d\n", xxexp);
|
|
|
|
if (ttFont)
|
|
applyTransformation();
|
|
@@ -154,7 +154,7 @@
|
|
Rasterizer::applyTransformation()
|
|
{
|
|
int emUnits = ttFont->getEmUnits();
|
|
- debug("emUnits = %d\n", emUnits);
|
|
+ debug1("emUnits = %d\n", emUnits);
|
|
|
|
for (; emUnits > 2048 && xxexp > 0; --xxexp)
|
|
emUnits >>= 1;
|
|
@@ -169,11 +169,11 @@
|
|
|
|
mppem = (mppemx + mppemy) >> 1;
|
|
|
|
- debug("xx = %d, xy = %d\n", xx, xy);
|
|
- debug("yx = %d, yy = %d\n", yx, yy);
|
|
- debug("exp = %d\n", xxexp);
|
|
+ debug2("xx = %d, xy = %d\n", xx, xy);
|
|
+ debug2("yx = %d, yy = %d\n", yx, yy);
|
|
+ debug1("exp = %d\n", xxexp);
|
|
|
|
- debug("mppem = %d, mppemx = %d, mppemy = %d\n", mppem, mppemx, mppemy);
|
|
+ debug3("mppem = %d, mppemx = %d, mppemy = %d\n", mppem, mppemx, mppemy);
|
|
|
|
if (grid_fitting)
|
|
calcCVT();
|
|
@@ -267,7 +267,7 @@
|
|
Rasterizer::putChar8Bitmap(char c, uint8_t *bmp, uint8_t *endbmp,
|
|
GlyphMetrics *gm)
|
|
{
|
|
- debug("charNo8 = %d", c);
|
|
+ debug1("charNo8 = %d", c);
|
|
int glyphNo = ttFont->getGlyphNo8(c);
|
|
return putGlyphBitmap(glyphNo, bmp, endbmp, gm);
|
|
}
|
|
@@ -278,7 +278,7 @@
|
|
GlyphMetrics *gm)
|
|
{
|
|
int glyphNo = ttFont->getGlyphNo16(c);
|
|
- debug("charNo16 = %d", c);
|
|
+ debug1("charNo16 = %d", c);
|
|
return putGlyphBitmap(glyphNo, bmp, endbmp, gm);
|
|
}
|
|
|
|
@@ -287,7 +287,7 @@
|
|
Rasterizer::putGlyphBitmap(int glyphNo, uint8_t *bmp, uint8_t *endbmp,
|
|
GlyphMetrics *gm)
|
|
{
|
|
- debug("\n=============== glyphNo %d ==================\n", glyphNo);
|
|
+ debug1("\n=============== glyphNo %d ==================\n", glyphNo);
|
|
|
|
GlyphTable *g = ttFont->glyphTable;
|
|
g->setupGlyph(ttFont->points, ttFont->endPoints);
|
|
@@ -378,8 +378,8 @@
|
|
gm->xAdvance = hdmx;
|
|
}
|
|
|
|
- debug("width = %d, dX = %d, height = %d\n", width, dX, height);
|
|
- debug("gn=%d, length= %d\n", glyphNo, length);
|
|
+ debug3("width = %d, dX = %d, height = %d\n", width, dX, height);
|
|
+ debug2("gn=%d, length= %d\n", glyphNo, length);
|
|
|
|
drawGlyph(bmp, endbmp);
|
|
|
|
@@ -404,7 +404,7 @@
|
|
int val = xmin - lsb;
|
|
pp->xold = scaleX(val, 0);
|
|
pp->yold = scaleY(0, val);
|
|
- debug("xmin = %d, adv = %d, lsb = %d\n", xmin, advanceWidth, lsb);
|
|
+ debug3("xmin = %d, adv = %d, lsb = %d\n", xmin, advanceWidth, lsb);
|
|
pp->xnow = (pp->xold + 32) & -64;
|
|
pp->ynow = (pp->yold + 32) & -64;
|
|
#if 0
|
|
@@ -412,7 +412,7 @@
|
|
val = pp->xnow = pp->ynow = 0;
|
|
pp->xold = pp->yold = 0;
|
|
#endif
|
|
- debug("phantom[0] = %5d -> %5d -> %5d\n", val, pp->xold, pp->xnow);
|
|
+ debug3("phantom[0] = %5d -> %5d -> %5d\n", val, pp->xold, pp->xnow);
|
|
|
|
// prepare phantom point 1
|
|
val += advanceWidth;
|
|
@@ -457,12 +457,12 @@
|
|
debug("\n=== grid fitted outline ===\n");
|
|
Point *pp = p[1];
|
|
for (int i = 0, j = 0; i < nPoints[1] + 2; ++i, ++pp) {
|
|
- debug("p[%d]\t%6d %6d ", i, pp->xold, pp->yold);
|
|
- debug("-> %6d %6d", pp->xnow, pp->ynow);
|
|
- debug(" %d%d", (pp->flags & X_TOUCHED) != 0,
|
|
+ debug3("p[%d]\t%6d %6d ", i, pp->xold, pp->yold);
|
|
+ debug2("-> %6d %6d", pp->xnow, pp->ynow);
|
|
+ debug2(" %d%d", (pp->flags & X_TOUCHED) != 0,
|
|
(pp->flags & Y_TOUCHED) != 0);
|
|
|
|
- debug(" %c", (pp->flags & ON_CURVE) ? '*' : ' ');
|
|
+ debug1(" %c", (pp->flags & ON_CURVE) ? '*' : ' ');
|
|
|
|
debug("\n");
|
|
if (i == endPoints[j]) {
|