+ bbox[BBOX_GLOBAL_DESCENT] = tm.tmDescent;
+ bbox[BBOX_DESCENT] = min_descent == size ? tm.tmDescent : min_descent;
+ bbox[BBOX_POS_WIDTH] = sz.cx;
+ bbox[BBOX_ADVANCE_WIDTH] = sz.cx;
+ bbox[BBOX_GLOBAL_ASCENT] = tm.tmAscent;
+ bbox[BBOX_ASCENT] = max_ascent == -size ? tm.tmAscent : max_ascent;
+
+ if (length
+ && GetCharABCWidths(dc, text[0], text[0], &first)
+ && GetCharABCWidths(dc, text[length-1], text[length-1], &last)) {
+ mm_log((1, "first: %d A: %d B: %d C: %d\n", text[0],
+ first.abcA, first.abcB, first.abcC));
+ mm_log((1, "last: %d A: %d B: %d C: %d\n", text[length-1],
+ last.abcA, last.abcB, last.abcC));
+ bbox[BBOX_NEG_WIDTH] = first.abcA;
+ bbox[BBOX_RIGHT_BEARING] = last.abcC;
+ if (last.abcC < 0)
+ bbox[BBOX_POS_WIDTH] -= last.abcC;
+ }
+ else {
+ bbox[BBOX_NEG_WIDTH] = 0;
+ bbox[BBOX_RIGHT_BEARING] = 0;
+ }