Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
dea3745e
Commit
dea3745e
authored
Apr 22, 2010
by
Huw Davies
Committed by
Alexandre Julliard
Apr 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Defer accessing the font metrics until we really need them.
parent
d99754ad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
download.c
dlls/wineps.drv/download.c
+12
-21
No files found.
dlls/wineps.drv/download.c
View file @
dea3745e
...
...
@@ -196,29 +196,9 @@ static BOOL get_bbox(HDC hdc, RECT *rc, UINT *emsize)
*/
BOOL
PSDRV_SelectDownloadFont
(
PSDRV_PDEVICE
*
physDev
)
{
char
*
ps_name
;
LPOUTLINETEXTMETRICA
potm
;
DWORD
len
=
GetOutlineTextMetricsA
(
physDev
->
hdc
,
0
,
NULL
);
if
(
!
len
)
return
FALSE
;
potm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
GetOutlineTextMetricsA
(
physDev
->
hdc
,
len
,
potm
);
get_download_name
(
physDev
,
potm
,
&
ps_name
);
physDev
->
font
.
fontloc
=
Download
;
physDev
->
font
.
fontinfo
.
Download
=
is_font_downloaded
(
physDev
,
ps_name
);
physDev
->
font
.
size
=
abs
(
PSDRV_YWStoDS
(
physDev
,
/* ppem */
potm
->
otmTextMetrics
.
tmAscent
+
potm
->
otmTextMetrics
.
tmDescent
-
potm
->
otmTextMetrics
.
tmInternalLeading
));
physDev
->
font
.
underlineThickness
=
potm
->
otmsUnderscoreSize
;
physDev
->
font
.
underlinePosition
=
potm
->
otmsUnderscorePosition
;
physDev
->
font
.
strikeoutThickness
=
potm
->
otmsStrikeoutSize
;
physDev
->
font
.
strikeoutPosition
=
potm
->
otmsStrikeoutPosition
;
physDev
->
font
.
fontinfo
.
Download
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
ps_name
);
HeapFree
(
GetProcessHeap
(),
0
,
potm
);
return
TRUE
;
}
...
...
@@ -241,6 +221,17 @@ BOOL PSDRV_WriteSetDownloadFont(PSDRV_PDEVICE *physDev)
GetOutlineTextMetricsA
(
physDev
->
hdc
,
len
,
potm
);
get_download_name
(
physDev
,
potm
,
&
ps_name
);
physDev
->
font
.
fontinfo
.
Download
=
is_font_downloaded
(
physDev
,
ps_name
);
physDev
->
font
.
size
=
abs
(
PSDRV_YWStoDS
(
physDev
,
/* ppem */
potm
->
otmTextMetrics
.
tmAscent
+
potm
->
otmTextMetrics
.
tmDescent
-
potm
->
otmTextMetrics
.
tmInternalLeading
));
physDev
->
font
.
underlineThickness
=
potm
->
otmsUnderscoreSize
;
physDev
->
font
.
underlinePosition
=
potm
->
otmsUnderscorePosition
;
physDev
->
font
.
strikeoutThickness
=
potm
->
otmsStrikeoutSize
;
physDev
->
font
.
strikeoutPosition
=
potm
->
otmsStrikeoutPosition
;
if
(
physDev
->
font
.
fontinfo
.
Download
==
NULL
)
{
RECT
bbox
;
...
...
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