+ int width = bounds.xmax - bounds.xmin;
+ int height = bounds.ymax - bounds.ymin;
+ float*row = rfx_calloc(sizeof(float)*(width+1));
+ float*column_global = rfx_calloc(sizeof(float)*(height+1));
+ float*column = rfx_calloc(sizeof(float)*(height+1));
+
+ for(t=0;t<f->numchars;t++) {
+ draw_char(f, t, row, column_global, bounds);
+ }
+ for(t=0;t<=height;t++) {column_global[t]/=f->numchars/2;}
+
+ for(t=0;t<f->numchars;t++) {
+ //memcpy(column, column_global, sizeof(float)*(height+1));
+
+ memset(column, 0, sizeof(float)*(height+1));
+ int s;
+ int drawn = 0;
+ printf("[font %d] pairing %c with ", f->id, f->glyph2ascii[t]);
+ for(s=0;s<f->use->num_neighbors;s++) {
+ if(f->use->neighbors[s].char2 == t) {
+ printf("%c (%d) ", f->glyph2ascii[f->use->neighbors[s].char1], f->use->neighbors[s].num);
+ draw_char(f, f->use->neighbors[s].char1, row, column, bounds);
+ drawn++;
+ }
+ }
+ printf("\n");
+
+ for(s=0;s<=height;s++) {
+ column[t] /= drawn*2;
+ }
+
+ memset(row, 0, sizeof(float)*(width+1));
+ draw_char(f, t, row, column, bounds);
+
+ SRECT b = f->layout->bounds[t];
+ negate_y(&b);
+ f->alignzones[t] = detect_for_char(f, t, row, column, bounds, b);
+ }
+ free(row);
+ free(column_global);
+ free(column);
+ }