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
18bcec0d
Commit
18bcec0d
authored
May 05, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
May 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Copy GetTextExtentExPoint implementation to unixlib.
parent
df041783
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
init.c
dlls/wineps.drv/init.c
+0
-1
unixlib.c
dlls/wineps.drv/unixlib.c
+23
-0
No files found.
dlls/wineps.drv/init.c
View file @
18bcec0d
...
...
@@ -693,7 +693,6 @@ static struct gdi_dc_funcs psdrv_funcs =
.
pCreateCompatibleDC
=
PSDRV_CreateCompatibleDC
,
.
pCreateDC
=
PSDRV_CreateDC
,
.
pDeleteDC
=
PSDRV_DeleteDC
,
.
pGetTextExtentExPoint
=
PSDRV_GetTextExtentExPoint
,
.
priority
=
GDI_PRIORITY_GRAPHICS_DRV
};
...
...
dlls/wineps.drv/unixlib.c
View file @
18bcec0d
...
...
@@ -1206,6 +1206,28 @@ static BOOL CDECL get_text_metrics(PHYSDEV dev, TEXTMETRICW *metrics)
return
TRUE
;
}
static
BOOL
CDECL
get_text_extent_ex_point
(
PHYSDEV
dev
,
const
WCHAR
*
str
,
int
count
,
int
*
dx
)
{
PSDRV_PDEVICE
*
pdev
=
get_psdrv_dev
(
dev
);
int
i
;
float
width
=
0
.
0
;
if
(
pdev
->
font
.
fontloc
==
Download
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPoint
);
return
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
str
,
count
,
dx
);
}
TRACE
(
"%s %i
\n
"
,
debugstr_wn
(
str
,
count
),
count
);
for
(
i
=
0
;
i
<
count
;
++
i
)
{
width
+=
uv_metrics
(
str
[
i
],
pdev
->
font
.
fontinfo
.
Builtin
.
afm
)
->
WX
;
dx
[
i
]
=
width
*
pdev
->
font
.
fontinfo
.
Builtin
.
scale
;
}
return
TRUE
;
}
static
NTSTATUS
init_dc
(
void
*
arg
)
{
struct
init_dc_params
*
params
=
arg
;
...
...
@@ -1217,6 +1239,7 @@ static NTSTATUS init_dc(void *arg)
params
->
funcs
->
pEnumFonts
=
enum_fonts
;
params
->
funcs
->
pGetCharWidth
=
get_char_width
;
params
->
funcs
->
pGetTextMetrics
=
get_text_metrics
;
params
->
funcs
->
pGetTextExtentExPoint
=
get_text_extent_ex_point
;
return
TRUE
;
}
...
...
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