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
e24ed540
Commit
e24ed540
authored
Nov 13, 2002
by
Huw Davies
Committed by
Alexandre Julliard
Nov 13, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We can't cache the unscaled font's hfont, since the mapping mode may
change. This resulted in some glyphs being downloaded at the wrong size.
parent
98f12a0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
type1.c
dlls/wineps/type1.c
+12
-12
No files found.
dlls/wineps/type1.c
View file @
e24ed540
...
...
@@ -34,7 +34,6 @@ struct tagTYPE1 {
DWORD
glyph_sent_size
;
BOOL
*
glyph_sent
;
DWORD
emsize
;
HFONT
unscaled_font
;
};
#define GLYPH_SENT_INC 128
...
...
@@ -55,8 +54,6 @@ TYPE1 *T1_download_header(PSDRV_PDEVICE *physDev, LPOUTLINETEXTMETRICA potm,
{
char
*
buf
;
TYPE1
*
t1
;
LOGFONTW
lf
;
RECT
rc
;
char
dict
[]
=
/* name, emsquare, fontbbox */
"25 dict begin
\n
"
...
...
@@ -85,12 +82,6 @@ TYPE1 *T1_download_header(PSDRV_PDEVICE *physDev, LPOUTLINETEXTMETRICA potm,
t1
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
t1
));
t1
->
emsize
=
potm
->
otmEMSquare
;
GetObjectW
(
GetCurrentObject
(
physDev
->
hdc
,
OBJ_FONT
),
sizeof
(
lf
),
&
lf
);
rc
.
left
=
rc
.
right
=
rc
.
bottom
=
0
;
rc
.
top
=
t1
->
emsize
;
DPtoLP
(
physDev
->
hdc
,
(
POINT
*
)
&
rc
,
2
);
lf
.
lfHeight
=
-
abs
(
rc
.
top
-
rc
.
bottom
);
t1
->
unscaled_font
=
CreateFontIndirectW
(
&
lf
);
t1
->
glyph_sent_size
=
GLYPH_SENT_INC
;
t1
->
glyph_sent
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
t1
->
glyph_sent_size
*
...
...
@@ -189,12 +180,15 @@ BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
TYPE1
*
t1
;
STR
*
charstring
;
BYTE
*
bytes
;
HFONT
old_font
;
HFONT
old_font
,
unscaled_font
;
GLYPHMETRICS
gm
;
char
*
glyph_buf
;
POINT
curpos
;
TTPOLYGONHEADER
*
pph
;
TTPOLYCURVE
*
ppc
;
LOGFONTW
lf
;
RECT
rc
;
char
glyph_def_begin
[]
=
"/%s findfont dup
\n
"
"/Private get begin
\n
"
...
...
@@ -218,7 +212,13 @@ BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
t1
->
glyph_sent_size
*
sizeof
(
*
(
t1
->
glyph_sent
)));
}
old_font
=
SelectObject
(
physDev
->
hdc
,
t1
->
unscaled_font
);
GetObjectW
(
GetCurrentObject
(
physDev
->
hdc
,
OBJ_FONT
),
sizeof
(
lf
),
&
lf
);
rc
.
left
=
rc
.
right
=
rc
.
bottom
=
0
;
rc
.
top
=
t1
->
emsize
;
DPtoLP
(
physDev
->
hdc
,
(
POINT
*
)
&
rc
,
2
);
lf
.
lfHeight
=
-
abs
(
rc
.
top
-
rc
.
bottom
);
unscaled_font
=
CreateFontIndirectW
(
&
lf
);
old_font
=
SelectObject
(
physDev
->
hdc
,
unscaled_font
);
len
=
GetGlyphOutlineW
(
physDev
->
hdc
,
index
,
GGO_GLYPH_INDEX
|
GGO_BEZIER
,
&
gm
,
0
,
NULL
,
NULL
);
if
(
len
==
GDI_ERROR
)
return
FALSE
;
...
...
@@ -227,6 +227,7 @@ BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
&
gm
,
len
,
glyph_buf
,
NULL
);
SelectObject
(
physDev
->
hdc
,
old_font
);
DeleteObject
(
unscaled_font
);
charstring
=
str_init
(
100
);
...
...
@@ -297,7 +298,6 @@ BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
void
T1_free
(
TYPE1
*
t1
)
{
HeapFree
(
GetProcessHeap
(),
0
,
t1
->
glyph_sent
);
DeleteObject
(
t1
->
unscaled_font
);
HeapFree
(
GetProcessHeap
(),
0
,
t1
);
return
;
}
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