printf(" endchar");
}
+static void
+select_hints(int nstems, int stems[nstems])
+{
+
+ for (int i = 0; i < nstems; i++) {
+ if (stems[i] > 0) {
+ stems[i] = 1;
+ if (i + 1 < nstems) stems[i + 1] = 0;
+ }
+ }
+}
+
static void
emit_hints(int vstems[XSIZE], int hstems[YSIZE])
{
int i, start, size, cur;
bool printed;
+ select_hints(YSIZE, hstems);
cur = DESCENT * YPIX; printed = false;
size = YPIX_S;
for (i = YSIZE - 1; i >= 0; i--) {
(double)((start - cur) / YSCALE),
(double)(size / YSCALE));
cur = start + size;
- i--; /* Avoid overlapping stems. */
printed = true;
}
}
if (printed) printf(" hstem");
+ select_hints(XSIZE, vstems);
cur = 0; printed = false;
size = XPIX_S + weight->weight;
for (i = 0; i < XSIZE; i++) {
(double)((start - cur) / XSCALE),
(double)(size / XSCALE));
cur = start + size;
- i++; /* Avoid overlapping stems. */
printed = true;
}
}