- width = state->getFontSize() * state->getHorizScaling() *
- font->getWidth16(c16) +
- state->getCharSpace();
- if (c16 == ' ')
- width += state->getWordSpace();
- state->textTransformDelta(width, 0, &w, &h);
+ if (enc->wMode == 0) {
+ width = state->getFontSize() * state->getHorizScaling() *
+ font->getWidth16(c16) +
+ state->getCharSpace();
+ if (c16 == ' ') {
+ width += state->getWordSpace();
+ }
+ height = 0;
+ } else {
+ width = 0;
+ height = state->getFontSize() * font->getHeight16(c16);
+ }
+ state->textTransformDelta(width, height, &w, &h);