-/*
- "-^_~\xad\xaf+`\xac\xb7\xf7" //chars for which to detect one y value
- "#=:;\xb1" //chars for which to detect two y values
- "\"\xa8" //chars for which to detect two x values
-*/
+ 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(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);
+ }
+ }