struct width const *width = &widths[0];
-/* Size of pixels in font design units (usually 1000/em) */
+/* Size of output pixels in font design units (usually 1000/em) */
#define XPIX (width->xpix)
#define YPIX 100
-/* We work internally in smaller units, though. */
-#define SCALE 2
-#define XPIX_S (XPIX * SCALE)
-#define YPIX_S (YPIX * SCALE)
+/* Internally, we work in pixels 100 design units square */
+#define XPIX_S 100
+#define YPIX_S 100
+
+#define XSCALE ((double)XPIX_S / (double)XPIX)
+#define YSCALE ((double)YPIX_S / (double)YPIX)
/* Position of diagonal lines within pixels */
#define XQTR_S (XPIX_S/4)
started = 1;
do {
printf(" %g %g %s 1\n",
- (double)p->v.x / SCALE,
- (double)p->v.y / SCALE - 3*YPIX,
+ (double)p->v.x / XSCALE,
+ (double)p->v.y / YSCALE - 3*YPIX,
p == &points[i] && p->next ? "m" : "l");
p1 = p->next;
p->prev = p->next = NULL;
* waveform of the SAA5050. This is implemented by moving all left
* edges left and right. The code below only handles cases where we
* don't run out of slack in horizontal lines, which limits weight to
- * the range (-50 * SCALE) < weight < (25 * SCALE).
+ * the range (-0.5 * XPIX) < weight < (0.25 * XPIX).
*/
-static int weight = 0 * SCALE;
+static int weight = 0;
static void
adjust_weight()