Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
39f54283
Commit
39f54283
authored
Mar 16, 2001
by
Huw D M Davies
Committed by
Alexandre Julliard
Mar 16, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved GetTextMetrics to unicode.
parent
07b6e6e6
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
34 additions
and
33 deletions
+34
-33
graphics.c
dlls/ttydrv/graphics.c
+1
-1
ttydrv.h
dlls/ttydrv/ttydrv.h
+1
-1
font.c
dlls/wineps/font.c
+1
-1
psdrv.h
dlls/wineps/psdrv.h
+2
-2
font.c
graphics/win16drv/font.c
+2
-2
xfont.c
graphics/x11drv/xfont.c
+4
-3
gdi.h
include/gdi.h
+1
-1
win16drv.h
include/win16drv.h
+1
-1
x11drv.h
include/x11drv.h
+1
-1
font.c
objects/font.c
+20
-20
No files found.
dlls/ttydrv/graphics.c
View file @
39f54283
...
...
@@ -442,7 +442,7 @@ BOOL TTYDRV_DC_GetTextExtentPoint(DC *dc, LPCWSTR str, INT count,
/***********************************************************************
* TTYDRV_DC_GetTextMetrics
*/
BOOL
TTYDRV_DC_GetTextMetrics
(
DC
*
dc
,
LPTEXTMETRIC
A
lptm
)
BOOL
TTYDRV_DC_GetTextMetrics
(
DC
*
dc
,
LPTEXTMETRIC
W
lptm
)
{
TTYDRV_PDEVICE
*
physDev
=
(
TTYDRV_PDEVICE
*
)
dc
->
physDev
;
...
...
dlls/ttydrv/ttydrv.h
View file @
39f54283
...
...
@@ -88,7 +88,7 @@ extern BOOL TTYDRV_DC_GetCharWidth(struct tagDC *dc, UINT firstChar, UINT lastCh
extern
COLORREF
TTYDRV_DC_GetPixel
(
struct
tagDC
*
dc
,
INT
x
,
INT
y
);
extern
BOOL
TTYDRV_DC_GetTextExtentPoint
(
struct
tagDC
*
dc
,
LPCWSTR
str
,
INT
count
,
LPSIZE
size
);
extern
BOOL
TTYDRV_DC_GetTextMetrics
(
struct
tagDC
*
dc
,
TEXTMETRIC
A
*
metrics
);
extern
BOOL
TTYDRV_DC_GetTextMetrics
(
struct
tagDC
*
dc
,
TEXTMETRIC
W
*
metrics
);
extern
BOOL
TTYDRV_DC_LineTo
(
struct
tagDC
*
dc
,
INT
x
,
INT
y
);
extern
BOOL
TTYDRV_DC_PaintRgn
(
struct
tagDC
*
dc
,
HRGN
hrgn
);
extern
BOOL
TTYDRV_DC_PatBlt
(
struct
tagDC
*
dc
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
);
...
...
dlls/wineps/font.c
View file @
39f54283
...
...
@@ -166,7 +166,7 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
/***********************************************************************
* PSDRV_GetTextMetrics
*/
BOOL
PSDRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
A
*
metrics
)
BOOL
PSDRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
W
*
metrics
)
{
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
...
...
dlls/wineps/psdrv.h
View file @
39f54283
...
...
@@ -193,7 +193,7 @@ typedef struct {
typedef
struct
{
AFM
*
afm
;
TEXTMETRIC
A
tm
;
TEXTMETRIC
W
tm
;
INT
size
;
float
scale
;
INT
escapement
;
...
...
@@ -339,7 +339,7 @@ extern BOOL PSDRV_GetCharWidth( DC *dc, UINT firstChar, UINT lastChar,
LPINT
buffer
);
extern
BOOL
PSDRV_GetTextExtentPoint
(
DC
*
dc
,
LPCWSTR
str
,
INT
count
,
LPSIZE
size
);
extern
BOOL
PSDRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
A
*
metrics
);
extern
BOOL
PSDRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
W
*
metrics
);
extern
BOOL
PSDRV_LineTo
(
DC
*
dc
,
INT
x
,
INT
y
);
extern
BOOL
PSDRV_PatBlt
(
DC
*
dc
,
INT
x
,
INT
y
,
INT
width
,
INT
height
,
DWORD
dwRop
);
...
...
graphics/win16drv/font.c
View file @
39f54283
...
...
@@ -50,13 +50,13 @@ BOOL WIN16DRV_GetTextExtentPoint( DC *dc, LPCWSTR wstr, INT count,
/***********************************************************************
* WIN16DRV_GetTextMetrics
*/
BOOL
WIN16DRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
A
*
metrics
)
BOOL
WIN16DRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
W
*
metrics
)
{
WIN16DRV_PDEVICE
*
physDev
=
(
WIN16DRV_PDEVICE
*
)
dc
->
physDev
;
TRACE
(
"%04x
\n
"
,
dc
->
hSelf
);
FONT_TextMetric16To
A
(
&
physDev
->
tm
,
metrics
);
FONT_TextMetric16To
W
(
&
physDev
->
tm
,
metrics
);
TRACE
(
"H %ld, A %ld, D %ld, Int %ld, Ext %ld, AW %ld, MW %ld, W %ld
\n
"
,
...
...
graphics/x11drv/xfont.c
View file @
39f54283
...
...
@@ -3176,15 +3176,16 @@ BOOL X11DRV_EnumDeviceFonts( HDC hdc, LPLOGFONTW plf,
/***********************************************************************
* X11DRV_GetTextMetrics
*/
BOOL
X11DRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
A
*
metrics
)
BOOL
X11DRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
W
*
metrics
)
{
X11DRV_PDEVICE
*
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
TEXTMETRICA
tmA
;
if
(
CHECK_PFONT
(
physDev
->
font
)
)
{
fontObject
*
pfo
=
__PFONT
(
physDev
->
font
);
X11DRV_cptable
[
pfo
->
fi
->
cptable
].
pGetTextMetricsA
(
pfo
,
metrics
);
X11DRV_cptable
[
pfo
->
fi
->
cptable
].
pGetTextMetricsA
(
pfo
,
&
tmA
);
FONT_TextMetricAToW
(
&
tmA
,
metrics
);
return
TRUE
;
}
return
FALSE
;
...
...
include/gdi.h
View file @
39f54283
...
...
@@ -202,7 +202,7 @@ typedef struct tagDC_FUNCS
COLORREF
(
*
pGetPixel
)(
DC
*
,
INT
,
INT
);
INT
(
*
pGetPixelFormat
)(
DC
*
);
BOOL
(
*
pGetTextExtentPoint
)(
DC
*
,
LPCWSTR
,
INT
,
LPSIZE
);
BOOL
(
*
pGetTextMetrics
)(
DC
*
,
TEXTMETRIC
A
*
);
BOOL
(
*
pGetTextMetrics
)(
DC
*
,
TEXTMETRIC
W
*
);
INT
(
*
pIntersectClipRect
)(
DC
*
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
*
pInvertRgn
)(
DC
*
,
HRGN
);
BOOL
(
*
pLineTo
)(
DC
*
,
INT
,
INT
);
...
...
include/win16drv.h
View file @
39f54283
...
...
@@ -211,7 +211,7 @@ extern BOOL WIN16DRV_GetCharWidth( struct tagDC *dc, UINT firstChar, UINT lastCh
extern
BOOL
WIN16DRV_GetTextExtentPoint
(
DC
*
dc
,
LPCWSTR
str
,
INT
count
,
LPSIZE
size
);
extern
BOOL
WIN16DRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
A
*
metrics
);
extern
BOOL
WIN16DRV_GetTextMetrics
(
DC
*
dc
,
TEXTMETRIC
W
*
metrics
);
extern
BOOL
WIN16DRV_ExtTextOut
(
DC
*
dc
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprect
,
LPCWSTR
str
,
UINT
count
,
...
...
include/x11drv.h
View file @
39f54283
...
...
@@ -99,7 +99,7 @@ extern BOOL X11DRV_GetCharWidth( struct tagDC *dc, UINT firstChar,
extern
BOOL
X11DRV_GetDCOrgEx
(
struct
tagDC
*
dc
,
LPPOINT
lpp
);
extern
BOOL
X11DRV_GetTextExtentPoint
(
struct
tagDC
*
dc
,
LPCWSTR
str
,
INT
count
,
LPSIZE
size
);
extern
BOOL
X11DRV_GetTextMetrics
(
struct
tagDC
*
dc
,
TEXTMETRIC
A
*
metrics
);
extern
BOOL
X11DRV_GetTextMetrics
(
struct
tagDC
*
dc
,
TEXTMETRIC
W
*
metrics
);
extern
BOOL
X11DRV_PatBlt
(
struct
tagDC
*
dc
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
);
extern
VOID
X11DRV_SetDeviceClipping
(
struct
tagDC
*
dc
);
...
...
objects/font.c
View file @
39f54283
...
...
@@ -1173,10 +1173,10 @@ done:
*/
BOOL16
WINAPI
GetTextMetrics16
(
HDC16
hdc
,
TEXTMETRIC16
*
metrics
)
{
TEXTMETRIC
A
tm32
;
TEXTMETRIC
W
tm32
;
if
(
!
GetTextMetrics
A
(
(
HDC
)
hdc
,
&
tm32
))
return
FALSE
;
FONT_TextMetric
A
To16
(
&
tm32
,
metrics
);
if
(
!
GetTextMetrics
W
(
(
HDC
)
hdc
,
&
tm32
))
return
FALSE
;
FONT_TextMetric
W
To16
(
&
tm32
,
metrics
);
return
TRUE
;
}
...
...
@@ -1185,7 +1185,19 @@ BOOL16 WINAPI GetTextMetrics16( HDC16 hdc, TEXTMETRIC16 *metrics )
* GetTextMetricsA (GDI32.@)
*/
BOOL
WINAPI
GetTextMetricsA
(
HDC
hdc
,
TEXTMETRICA
*
metrics
)
{
{
TEXTMETRICW
tm32
;
if
(
!
GetTextMetricsW
(
hdc
,
&
tm32
))
return
FALSE
;
FONT_TextMetricWToA
(
&
tm32
,
metrics
);
return
TRUE
;
}
/***********************************************************************
* GetTextMetricsW (GDI32.@)
*/
BOOL
WINAPI
GetTextMetricsW
(
HDC
hdc
,
TEXTMETRICW
*
metrics
)
{
BOOL
ret
=
FALSE
;
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
...
...
@@ -1213,10 +1225,10 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
ret
=
TRUE
;
TRACE
(
"text metrics:
\n
"
" Weight = %03li
\t
FirstChar = %
03
i
\t
AveCharWidth = %li
\n
"
" Italic = % 3i
\t
LastChar = %
03
i
\t\t
MaxCharWidth = %li
\n
"
" UnderLined = %01i
\t
DefaultChar = %
03
i
\t
Overhang = %li
\n
"
" StruckOut = %01i
\t
BreakChar = %
03
i
\t
CharSet = %i
\n
"
" Weight = %03li
\t
FirstChar = %i
\t
AveCharWidth = %li
\n
"
" Italic = % 3i
\t
LastChar = %i
\t\t
MaxCharWidth = %li
\n
"
" UnderLined = %01i
\t
DefaultChar = %i
\t
Overhang = %li
\n
"
" StruckOut = %01i
\t
BreakChar = %i
\t
CharSet = %i
\n
"
" PitchAndFamily = %02x
\n
"
" --------------------
\n
"
" InternalLeading = %li
\n
"
...
...
@@ -1239,18 +1251,6 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
/***********************************************************************
* GetTextMetricsW (GDI32.@)
*/
BOOL
WINAPI
GetTextMetricsW
(
HDC
hdc
,
TEXTMETRICW
*
metrics
)
{
TEXTMETRICA
tm
;
if
(
!
GetTextMetricsA
(
(
HDC16
)
hdc
,
&
tm
))
return
FALSE
;
FONT_TextMetricAToW
(
&
tm
,
metrics
);
return
TRUE
;
}
/***********************************************************************
* GetOutlineTextMetrics16 [GDI.308] Gets metrics for TrueType fonts.
*
* NOTES
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment