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
bbf3e862
Commit
bbf3e862
authored
Dec 18, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Remove from the GetTextExtentExPoint entry points parameters that can't…
gdi32: Remove from the GetTextExtentExPoint entry points parameters that can't be handled by the driver.
parent
1c2f23cf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
79 deletions
+28
-79
driver.c
dlls/gdi32/driver.c
+2
-4
font.c
dlls/gdi32/font.c
+2
-2
freetype.c
dlls/gdi32/freetype.c
+16
-46
builtin.c
dlls/wineps.drv/builtin.c
+4
-22
psdrv.h
dlls/wineps.drv/psdrv.h
+1
-2
gdi_driver.h
include/wine/gdi_driver.h
+3
-3
No files found.
dlls/gdi32/driver.c
View file @
bbf3e862
...
@@ -423,14 +423,12 @@ static UINT nulldrv_GetTextCharsetInfo( PHYSDEV dev, LPFONTSIGNATURE fs, DWORD f
...
@@ -423,14 +423,12 @@ static UINT nulldrv_GetTextCharsetInfo( PHYSDEV dev, LPFONTSIGNATURE fs, DWORD f
return
DEFAULT_CHARSET
;
return
DEFAULT_CHARSET
;
}
}
static
BOOL
nulldrv_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
INT
max_ext
,
static
BOOL
nulldrv_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
INT
*
dx
)
INT
*
fit
,
INT
*
dx
,
SIZE
*
size
)
{
{
return
FALSE
;
return
FALSE
;
}
}
static
BOOL
nulldrv_GetTextExtentExPointI
(
PHYSDEV
dev
,
const
WORD
*
indices
,
INT
count
,
INT
max_ext
,
static
BOOL
nulldrv_GetTextExtentExPointI
(
PHYSDEV
dev
,
const
WORD
*
indices
,
INT
count
,
INT
*
dx
)
INT
*
fit
,
INT
*
dx
,
SIZE
*
size
)
{
{
return
FALSE
;
return
FALSE
;
}
}
...
...
dlls/gdi32/font.c
View file @
bbf3e862
...
@@ -320,7 +320,7 @@ static BOOL get_char_positions( DC *dc, const WCHAR *str, INT count, INT *dx, SI
...
@@ -320,7 +320,7 @@ static BOOL get_char_positions( DC *dc, const WCHAR *str, INT count, INT *dx, SI
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextMetrics
);
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextMetrics
);
dev
->
funcs
->
pGetTextMetrics
(
dev
,
&
tm
);
dev
->
funcs
->
pGetTextMetrics
(
dev
,
&
tm
);
if
(
!
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
str
,
count
,
0
,
NULL
,
dx
,
size
))
return
FALSE
;
if
(
!
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
str
,
count
,
dx
))
return
FALSE
;
if
(
dc
->
breakExtra
||
dc
->
breakRem
)
if
(
dc
->
breakExtra
||
dc
->
breakRem
)
{
{
...
@@ -357,7 +357,7 @@ static BOOL get_char_positions_indices( DC *dc, const WORD *indices, INT count,
...
@@ -357,7 +357,7 @@ static BOOL get_char_positions_indices( DC *dc, const WORD *indices, INT count,
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextMetrics
);
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextMetrics
);
dev
->
funcs
->
pGetTextMetrics
(
dev
,
&
tm
);
dev
->
funcs
->
pGetTextMetrics
(
dev
,
&
tm
);
if
(
!
dev
->
funcs
->
pGetTextExtentExPointI
(
dev
,
indices
,
count
,
0
,
NULL
,
dx
,
size
))
return
FALSE
;
if
(
!
dev
->
funcs
->
pGetTextExtentExPointI
(
dev
,
indices
,
count
,
dx
))
return
FALSE
;
if
(
dc
->
breakExtra
||
dc
->
breakRem
)
if
(
dc
->
breakExtra
||
dc
->
breakRem
)
{
{
...
...
dlls/gdi32/freetype.c
View file @
bbf3e862
...
@@ -7134,97 +7134,67 @@ static BOOL freetype_GetCharABCWidthsI( PHYSDEV dev, UINT firstChar, UINT count,
...
@@ -7134,97 +7134,67 @@ static BOOL freetype_GetCharABCWidthsI( PHYSDEV dev, UINT firstChar, UINT count,
/*************************************************************
/*************************************************************
* freetype_GetTextExtentExPoint
* freetype_GetTextExtentExPoint
*/
*/
static
BOOL
freetype_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
wstr
,
INT
count
,
static
BOOL
freetype_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
wstr
,
INT
count
,
LPINT
dxs
)
INT
max_ext
,
LPINT
pnfit
,
LPINT
dxs
,
LPSIZE
size
)
{
{
static
const
MAT2
identity
=
{
{
0
,
1
},{
0
,
0
},{
0
,
0
},{
0
,
1
}
};
static
const
MAT2
identity
=
{
{
0
,
1
},{
0
,
0
},{
0
,
0
},{
0
,
1
}
};
INT
idx
;
INT
idx
,
pos
;
INT
nfit
=
0
,
ext
;
ABC
abc
;
ABC
abc
;
GLYPHMETRICS
gm
;
GLYPHMETRICS
gm
;
TEXTMETRICW
tm
;
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
if
(
!
physdev
->
font
)
if
(
!
physdev
->
font
)
{
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPoint
);
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPoint
);
return
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
wstr
,
count
,
max_ext
,
pnfit
,
dxs
,
size
);
return
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
wstr
,
count
,
dxs
);
}
}
TRACE
(
"%p, %s, %d
, %d, %p
\n
"
,
physdev
->
font
,
debugstr_wn
(
wstr
,
count
),
count
,
max_ext
,
size
);
TRACE
(
"%p, %s, %d
\n
"
,
physdev
->
font
,
debugstr_wn
(
wstr
,
count
),
count
);
GDI_CheckNotLock
();
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
EnterCriticalSection
(
&
freetype_cs
);
size
->
cx
=
0
;
for
(
idx
=
pos
=
0
;
idx
<
count
;
idx
++
)
get_text_metrics
(
physdev
->
font
,
&
tm
);
{
size
->
cy
=
tm
.
tmHeight
;
for
(
idx
=
0
;
idx
<
count
;
idx
++
)
{
get_glyph_outline
(
physdev
->
font
,
wstr
[
idx
],
GGO_METRICS
,
&
gm
,
&
abc
,
0
,
NULL
,
&
identity
);
get_glyph_outline
(
physdev
->
font
,
wstr
[
idx
],
GGO_METRICS
,
&
gm
,
&
abc
,
0
,
NULL
,
&
identity
);
size
->
cx
+=
abc
.
abcA
+
abc
.
abcB
+
abc
.
abcC
;
pos
+=
abc
.
abcA
+
abc
.
abcB
+
abc
.
abcC
;
ext
=
size
->
cx
;
dxs
[
idx
]
=
pos
;
if
(
!
pnfit
||
ext
<=
max_ext
)
{
++
nfit
;
if
(
dxs
)
dxs
[
idx
]
=
ext
;
}
}
}
if
(
pnfit
)
*
pnfit
=
nfit
;
LeaveCriticalSection
(
&
freetype_cs
);
LeaveCriticalSection
(
&
freetype_cs
);
TRACE
(
"return %d, %d, %d
\n
"
,
size
->
cx
,
size
->
cy
,
nfit
);
return
TRUE
;
return
TRUE
;
}
}
/*************************************************************
/*************************************************************
* freetype_GetTextExtentExPointI
* freetype_GetTextExtentExPointI
*/
*/
static
BOOL
freetype_GetTextExtentExPointI
(
PHYSDEV
dev
,
const
WORD
*
indices
,
INT
count
,
static
BOOL
freetype_GetTextExtentExPointI
(
PHYSDEV
dev
,
const
WORD
*
indices
,
INT
count
,
LPINT
dxs
)
INT
max_ext
,
LPINT
pnfit
,
LPINT
dxs
,
LPSIZE
size
)
{
{
static
const
MAT2
identity
=
{
{
0
,
1
},{
0
,
0
},{
0
,
0
},{
0
,
1
}
};
static
const
MAT2
identity
=
{
{
0
,
1
},{
0
,
0
},{
0
,
0
},{
0
,
1
}
};
INT
idx
;
INT
idx
,
pos
;
INT
nfit
=
0
,
ext
;
ABC
abc
;
ABC
abc
;
GLYPHMETRICS
gm
;
GLYPHMETRICS
gm
;
TEXTMETRICW
tm
;
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
if
(
!
physdev
->
font
)
if
(
!
physdev
->
font
)
{
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPointI
);
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPointI
);
return
dev
->
funcs
->
pGetTextExtentExPointI
(
dev
,
indices
,
count
,
max_ext
,
pnfit
,
dxs
,
size
);
return
dev
->
funcs
->
pGetTextExtentExPointI
(
dev
,
indices
,
count
,
dxs
);
}
}
TRACE
(
"%p, %p, %d
, %d, %p
\n
"
,
physdev
->
font
,
indices
,
count
,
max_ext
,
size
);
TRACE
(
"%p, %p, %d
\n
"
,
physdev
->
font
,
indices
,
count
);
GDI_CheckNotLock
();
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
EnterCriticalSection
(
&
freetype_cs
);
size
->
cx
=
0
;
for
(
idx
=
pos
=
0
;
idx
<
count
;
idx
++
)
get_text_metrics
(
physdev
->
font
,
&
tm
);
{
size
->
cy
=
tm
.
tmHeight
;
for
(
idx
=
0
;
idx
<
count
;
idx
++
)
{
get_glyph_outline
(
physdev
->
font
,
indices
[
idx
],
GGO_METRICS
|
GGO_GLYPH_INDEX
,
get_glyph_outline
(
physdev
->
font
,
indices
[
idx
],
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
&
abc
,
0
,
NULL
,
&
identity
);
&
gm
,
&
abc
,
0
,
NULL
,
&
identity
);
size
->
cx
+=
abc
.
abcA
+
abc
.
abcB
+
abc
.
abcC
;
pos
+=
abc
.
abcA
+
abc
.
abcB
+
abc
.
abcC
;
ext
=
size
->
cx
;
dxs
[
idx
]
=
pos
;
if
(
!
pnfit
||
ext
<=
max_ext
)
{
++
nfit
;
if
(
dxs
)
dxs
[
idx
]
=
ext
;
}
}
}
if
(
pnfit
)
*
pnfit
=
nfit
;
LeaveCriticalSection
(
&
freetype_cs
);
LeaveCriticalSection
(
&
freetype_cs
);
TRACE
(
"return %d, %d, %d
\n
"
,
size
->
cx
,
size
->
cy
,
nfit
);
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/wineps.drv/builtin.c
View file @
bbf3e862
...
@@ -317,43 +317,25 @@ const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm)
...
@@ -317,43 +317,25 @@ const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm)
/***********************************************************************
/***********************************************************************
* PSDRV_GetTextExtentExPoint
* PSDRV_GetTextExtentExPoint
*/
*/
BOOL
PSDRV_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
BOOL
PSDRV_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
LPINT
alpDx
)
INT
maxExt
,
LPINT
lpnFit
,
LPINT
alpDx
,
LPSIZE
size
)
{
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
int
nfit
=
0
;
int
i
;
int
i
;
float
width
=
0
.
0
;
float
width
=
0
.
0
;
float
scale
;
if
(
physDev
->
font
.
fontloc
==
Download
)
if
(
physDev
->
font
.
fontloc
==
Download
)
{
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPoint
);
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPoint
);
return
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
str
,
count
,
maxExt
,
lpnFit
,
alpDx
,
size
);
return
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
str
,
count
,
alpDx
);
}
}
TRACE
(
"%s %i
\n
"
,
debugstr_wn
(
str
,
count
),
count
);
TRACE
(
"%s %i
\n
"
,
debugstr_wn
(
str
,
count
),
count
);
scale
=
physDev
->
font
.
fontinfo
.
Builtin
.
scale
;
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
count
&&
str
[
i
]
!=
'\0'
;
++
i
)
{
{
float
scaled_width
;
width
+=
PSDRV_UVMetrics
(
str
[
i
],
physDev
->
font
.
fontinfo
.
Builtin
.
afm
)
->
WX
;
width
+=
PSDRV_UVMetrics
(
str
[
i
],
physDev
->
font
.
fontinfo
.
Builtin
.
afm
)
->
WX
;
scaled_width
=
width
*
scale
;
alpDx
[
i
]
=
width
*
physDev
->
font
.
fontinfo
.
Builtin
.
scale
;
if
(
alpDx
)
alpDx
[
i
]
=
scaled_width
;
if
(
scaled_width
<=
maxExt
)
++
nfit
;
}
}
size
->
cx
=
width
*
physDev
->
font
.
fontinfo
.
Builtin
.
scale
;
size
->
cy
=
physDev
->
font
.
fontinfo
.
Builtin
.
tm
.
tmHeight
;
if
(
lpnFit
)
*
lpnFit
=
nfit
;
TRACE
(
"cx=%i cy=%i
\n
"
,
size
->
cx
,
size
->
cy
);
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/wineps.drv/psdrv.h
View file @
bbf3e862
...
@@ -425,8 +425,7 @@ extern BOOL PSDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
...
@@ -425,8 +425,7 @@ extern BOOL PSDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
const
RECT
*
lprect
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
lpDx
)
DECLSPEC_HIDDEN
;
const
RECT
*
lprect
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
lpDx
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_FillPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_FillPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetCharWidth
(
PHYSDEV
dev
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetCharWidth
(
PHYSDEV
dev
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
extern
BOOL
PSDRV_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
LPINT
alpDx
)
DECLSPEC_HIDDEN
;
INT
maxExt
,
LPINT
lpnFit
,
LPINT
alpDx
,
LPSIZE
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetTextMetrics
(
PHYSDEV
dev
,
TEXTMETRICW
*
metrics
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetTextMetrics
(
PHYSDEV
dev
,
TEXTMETRICW
*
metrics
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_LineTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_LineTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
...
...
include/wine/gdi_driver.h
View file @
bbf3e862
...
@@ -116,8 +116,8 @@ struct gdi_dc_funcs
...
@@ -116,8 +116,8 @@ struct gdi_dc_funcs
COLORREF
(
*
pGetPixel
)(
PHYSDEV
,
INT
,
INT
);
COLORREF
(
*
pGetPixel
)(
PHYSDEV
,
INT
,
INT
);
UINT
(
*
pGetSystemPaletteEntries
)(
PHYSDEV
,
UINT
,
UINT
,
LPPALETTEENTRY
);
UINT
(
*
pGetSystemPaletteEntries
)(
PHYSDEV
,
UINT
,
UINT
,
LPPALETTEENTRY
);
UINT
(
*
pGetTextCharsetInfo
)(
PHYSDEV
,
LPFONTSIGNATURE
,
DWORD
);
UINT
(
*
pGetTextCharsetInfo
)(
PHYSDEV
,
LPFONTSIGNATURE
,
DWORD
);
BOOL
(
*
pGetTextExtentExPoint
)(
PHYSDEV
,
LPCWSTR
,
INT
,
INT
,
LPINT
,
LPINT
,
LPSIZE
);
BOOL
(
*
pGetTextExtentExPoint
)(
PHYSDEV
,
LPCWSTR
,
INT
,
LPINT
);
BOOL
(
*
pGetTextExtentExPointI
)(
PHYSDEV
,
const
WORD
*
,
INT
,
INT
,
LPINT
,
LPINT
,
LPSIZE
);
BOOL
(
*
pGetTextExtentExPointI
)(
PHYSDEV
,
const
WORD
*
,
INT
,
LPINT
);
INT
(
*
pGetTextFace
)(
PHYSDEV
,
INT
,
LPWSTR
);
INT
(
*
pGetTextFace
)(
PHYSDEV
,
INT
,
LPWSTR
);
BOOL
(
*
pGetTextMetrics
)(
PHYSDEV
,
TEXTMETRICW
*
);
BOOL
(
*
pGetTextMetrics
)(
PHYSDEV
,
TEXTMETRICW
*
);
BOOL
(
*
pGradientFill
)(
PHYSDEV
,
TRIVERTEX
*
,
ULONG
,
void
*
,
ULONG
,
ULONG
);
BOOL
(
*
pGradientFill
)(
PHYSDEV
,
TRIVERTEX
*
,
ULONG
,
void
*
,
ULONG
,
ULONG
);
...
@@ -197,7 +197,7 @@ struct gdi_dc_funcs
...
@@ -197,7 +197,7 @@ struct gdi_dc_funcs
};
};
/* increment this when you change the DC function table */
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 4
5
#define WINE_GDI_DRIVER_VERSION 4
6
#define GDI_PRIORITY_NULL_DRV 0
/* null driver */
#define GDI_PRIORITY_NULL_DRV 0
/* null driver */
#define GDI_PRIORITY_FONT_DRV 100
/* any font driver */
#define GDI_PRIORITY_FONT_DRV 100
/* any font driver */
...
...
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