pkgsrc/x11/xfstt/patches/patch-aj
2004-02-14 22:27:30 +00:00

126 lines
3.9 KiB
Text

$NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
--- libfstt/raster_scale.cc.orig Sat Feb 14 22:41:45 2004
+++ libfstt/raster_scale.cc Sat Feb 14 22:48:38 2004
@@ -102,8 +102,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;
@@ -135,9 +135,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();
@@ -153,7 +153,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;
@@ -168,11 +168,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();
@@ -265,7 +265,7 @@
int
Rasterizer::putChar8Bitmap(char c, U8 *bmp, U8 *endbmp, GlyphMetrics *gm)
{
- debug("charNo8 = %d", c);
+ debug1("charNo8 = %d", c);
int glyphNo = ttFont->getGlyphNo8(c);
return putGlyphBitmap(glyphNo, bmp, endbmp, gm);
}
@@ -275,7 +275,7 @@
Rasterizer::putChar16Bitmap(int c, U8 *bmp, U8 *endbmp, GlyphMetrics *gm)
{
int glyphNo = ttFont->getGlyphNo16(c);
- debug("charNo16 = %d", c);
+ debug1("charNo16 = %d", c);
return putGlyphBitmap(glyphNo, bmp, endbmp, gm);
}
@@ -283,7 +283,7 @@
int
Rasterizer::putGlyphBitmap(int glyphNo, U8 *bmp, U8 *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);
@@ -374,8 +374,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);
@@ -400,7 +400,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
@@ -408,7 +408,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;
@@ -456,12 +456,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) ? '*' : ' ');
#ifdef WIN32
debug(" (%6d %6d)", pp->xgoal, pp->ygoal);