Alexandre Julliard | 0e270f4 | 1996-08-24 18:26:35 +0000 | [diff] [blame] | 1 | /* |
| 2 | * X11 driver font functions |
| 3 | * |
| 4 | * Copyright 1996 Alexandre Julliard |
| 5 | */ |
| 6 | |
| 7 | #include "windows.h" |
| 8 | #include "x11drv.h" |
| 9 | #include "gdi.h" |
| 10 | |
| 11 | /*********************************************************************** |
| 12 | * X11DRV_GetTextExtentPoint |
| 13 | */ |
| 14 | BOOL32 X11DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT32 count, |
| 15 | LPSIZE32 size ) |
| 16 | { |
| 17 | int dir, ascent, descent; |
| 18 | XCharStruct info; |
| 19 | |
| 20 | XTextExtents( dc->u.x.font.fstruct, str, count, &dir, |
| 21 | &ascent, &descent, &info ); |
| 22 | size->cx = abs((info.width + dc->w.breakRem + count * dc->w.charExtra) |
Alexandre Julliard | 7ebe1a4 | 1996-12-22 18:27:48 +0000 | [diff] [blame] | 23 | * dc->wndExtX / dc->vportExtX); |
Alexandre Julliard | 0e270f4 | 1996-08-24 18:26:35 +0000 | [diff] [blame] | 24 | size->cy = abs((dc->u.x.font.fstruct->ascent+dc->u.x.font.fstruct->descent) |
Alexandre Julliard | 7ebe1a4 | 1996-12-22 18:27:48 +0000 | [diff] [blame] | 25 | * dc->wndExtY / dc->vportExtY); |
Alexandre Julliard | 0e270f4 | 1996-08-24 18:26:35 +0000 | [diff] [blame] | 26 | return TRUE; |
| 27 | } |