4 * Copyright 1999 Patrik Stridvall
7 #include "debugtools.h"
12 DEFAULT_DEBUG_CHANNEL(ttydrv
)
14 /***********************************************************************
15 * TTYDRV_DC_GetCharWidth
17 BOOL
TTYDRV_DC_GetCharWidth(DC
*dc
, UINT firstChar
, UINT lastChar
,
21 TTYDRV_PDEVICE
*physDev
= (TTYDRV_PDEVICE
*) dc
->physDev
;
23 FIXME("(%p, %u, %u, %p): semistub\n", dc
, firstChar
, lastChar
, buffer
);
25 for(c
=firstChar
; c
<=lastChar
; c
++) {
26 buffer
[c
-firstChar
] = physDev
->cellWidth
;
32 /***********************************************************************
33 * TTYDRV_DC_GetTextExtentPoint
35 BOOL
TTYDRV_DC_GetTextExtentPoint(DC
*dc
, LPCWSTR str
, INT count
,
38 TTYDRV_PDEVICE
*physDev
= (TTYDRV_PDEVICE
*) dc
->physDev
;
40 TRACE("(%p, %s, %d, %p)\n", dc
, debugstr_wn(str
, count
), count
, size
);
42 size
->cx
= count
* physDev
->cellWidth
;
43 size
->cy
= physDev
->cellHeight
;
48 /***********************************************************************
49 * TTYDRV_DC_GetTextMetrics
51 BOOL
TTYDRV_DC_GetTextMetrics(DC
*dc
, LPTEXTMETRICA lptm
)
53 TTYDRV_PDEVICE
*physDev
= (TTYDRV_PDEVICE
*) dc
->physDev
;
55 TRACE("(%p, %p)\n", dc
, lptm
);
57 lptm
->tmHeight
= physDev
->cellHeight
;
60 lptm
->tmInternalLeading
= 0;
61 lptm
->tmExternalLeading
= 0;
62 lptm
->tmAveCharWidth
= physDev
->cellWidth
;
63 lptm
->tmMaxCharWidth
= physDev
->cellWidth
;
64 lptm
->tmWeight
= FW_MEDIUM
;
66 lptm
->tmDigitizedAspectX
= physDev
->cellWidth
;
67 lptm
->tmDigitizedAspectY
= physDev
->cellHeight
;
68 lptm
->tmFirstChar
= 32;
69 lptm
->tmLastChar
= 255;
70 lptm
->tmDefaultChar
= 0;
71 lptm
->tmBreakChar
= 32;
72 lptm
->tmItalic
= FALSE
;
73 lptm
->tmUnderlined
= FALSE
;
74 lptm
->tmStruckOut
= FALSE
;
75 lptm
->tmPitchAndFamily
= TMPF_FIXED_PITCH
|TMPF_DEVICE
;
76 lptm
->tmCharSet
= ANSI_CHARSET
;
81 /***********************************************************************
82 * TTYDRV_DC_FONT_SelectObject
84 HFONT
TTYDRV_DC_FONT_SelectObject(DC
* dc
, HFONT hfont
, FONTOBJ
*font
)
88 TRACE("(%p, 0x%04x, %p)\n", dc
, hfont
, font
);
90 hPreviousFont
= dc
->w
.hFont
;