Репозитории ALT
S: | 5.1.2-alt7 |
D: | 5.1.2-alt1 |
5.1: | 5.1.2-alt3 |
4.1: | 5.0.2-alt2 |
4.0: | 5.0.2-alt1.M40.1 |
+backports: | 5.0.2-alt1.M40.1 |
3.0: | 5.0.2-alt1 |
Группа :: Система/Библиотеки
Пакет: t1lib
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: t1lib-5.1.2-deb-alt-fixes.patch
Скачать
Скачать
diff --git a/t1lib/lib/type1/type1.c b/t1lib/lib/type1/type1.c
index 3289436..2aabf13 100644
--- a/t1lib/lib/type1/type1.c
+++ b/t1lib/lib/type1/type1.c
@@ -1702,7 +1702,7 @@ static int RLineTo(dx, dy)
/* compute hinting for previous segment! */
if (ppoints == NULL || numppoints < 2) Error0i("RLineTo: No previous point!\n");
- FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx, dy);
+ FindStems( currx, curry, (numppoints > 1) ? currx-ppoints[numppoints-2].x : 0, (numppoints > 1) ? curry-ppoints[numppoints-2].y : 0, dx, dy);
/* Allocate a new path point and pre-setup data */
pindex = nextPPoint();
@@ -1731,7 +1731,7 @@ static int RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
/* compute hinting for previous point! */
if (ppoints == NULL || numppoints < 2) Error0i("RRCurveTo: No previous point!\n");
- FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx1, dy1);
+ FindStems( currx, curry, (numppoints > 1) ? currx-ppoints[numppoints-2].x : 0, (numppoints > 1) ? curry-ppoints[numppoints-2].y : 0, dx1, dy1);
/* Allocate three new path points and pre-setup data */
pindex = nextPPoint();
@@ -1747,7 +1747,7 @@ static int RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
curry += dy1;
/* compute hinting for previous point! */
- FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx2, dy2);
+ FindStems( currx, curry, (numppoints > 1) ? currx-ppoints[numppoints-2].x : 0, (numppoints > 1) ? curry-ppoints[numppoints-2].y : 0, dx2, dy2);
pindex = nextPPoint();
ppoints[pindex].x = currx + dx2;
@@ -1762,7 +1762,7 @@ static int RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
curry += dy2;
/* compute hinting for previous point! */
- FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx3, dy3);
+ FindStems( currx, curry, (numppoints > 1) ? currx-ppoints[numppoints-2].x : 0, (numppoints > 1) ? curry-ppoints[numppoints-2].y : 0, dx3, dy3);
pindex = nextPPoint();
ppoints[pindex].x = currx + dx3;
@@ -1817,7 +1817,7 @@ static int DoClosePath()
/* restore numppoints and setup hinting for current point */
numppoints = tmpind;
- FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y,
+ FindStems( currx, curry, (numppoints > 1) ? currx-ppoints[numppoints-2].x : 0, (numppoints > 1) ? curry-ppoints[numppoints-2].y : 0,
deltax, deltay);
}
diff --git a/t1lib/xglyph/xglyph.c b/t1lib/xglyph/xglyph.c
index f062132..3a5d523 100644
--- a/t1lib/xglyph/xglyph.c
+++ b/t1lib/xglyph/xglyph.c
@@ -526,10 +526,12 @@ int main( int argc, char **argv)
/* Check for environment entry. If not set, set it to current
directory so that configuration file is found there */
+ /* It is insecure. */
+#if 0
if (getenv("T1LIB_CONFIG")==NULL){
putenv( "T1LIB_CONFIG=./t1lib.config");
}
-
+#endif
/* Set log-level: */
T1_SetLogLevel( loglevel & (~(0x01<<8)));