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
a0b4ce60
Commit
a0b4ce60
authored
Apr 01, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Add support for TrueType composite glyph transforms.
parent
8c0c09e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
type1.c
dlls/wineps.drv/type1.c
+20
-13
No files found.
dlls/wineps.drv/type1.c
View file @
a0b4ce60
...
...
@@ -423,7 +423,7 @@ static BOOL append_complex_glyph(HDC hdc, const BYTE *data, glyph_outline *outli
const
BYTE
*
ptr
=
data
;
WORD
flags
,
index
;
short
arg1
,
arg2
;
WORD
scale_xx
=
1
<<
14
,
scale_xy
=
0
,
scale_yx
=
0
,
scale_yy
=
1
<<
14
;
FLOAT
scale_xx
=
1
,
scale_xy
=
0
,
scale_yx
=
0
,
scale_yy
=
1
;
WORD
start_pt
,
end_pt
;
ptr
+=
10
;
...
...
@@ -447,37 +447,44 @@ static BOOL append_complex_glyph(HDC hdc, const BYTE *data, glyph_outline *outli
}
if
(
flags
&
WE_HAVE_A_SCALE
)
{
scale_xx
=
scale_yy
=
get_be_word
(
ptr
)
;
scale_xx
=
scale_yy
=
(
FLOAT
)(
short
)
get_be_word
(
ptr
)
/
0x4000
;
ptr
+=
2
;
}
else
if
(
flags
&
WE_HAVE_AN_X_AND_Y_SCALE
)
{
scale_xx
=
get_be_word
(
ptr
)
;
scale_xx
=
(
FLOAT
)(
short
)
get_be_word
(
ptr
)
/
0x4000
;
ptr
+=
2
;
scale_yy
=
get_be_word
(
ptr
)
;
scale_yy
=
(
FLOAT
)(
short
)
get_be_word
(
ptr
)
/
0x4000
;
ptr
+=
2
;
}
else
if
(
flags
&
WE_HAVE_A_TWO_BY_TWO
)
{
scale_xx
=
get_be_word
(
ptr
)
;
scale_xx
=
(
FLOAT
)(
short
)
get_be_word
(
ptr
)
/
0x4000
;
ptr
+=
2
;
scale_xy
=
get_be_word
(
ptr
)
;
scale_xy
=
(
FLOAT
)(
short
)
get_be_word
(
ptr
)
/
0x4000
;
ptr
+=
2
;
scale_yx
=
get_be_word
(
ptr
)
;
scale_yx
=
(
FLOAT
)(
short
)
get_be_word
(
ptr
)
/
0x4000
;
ptr
+=
2
;
scale_yy
=
get_be_word
(
ptr
)
;
scale_yy
=
(
FLOAT
)(
short
)
get_be_word
(
ptr
)
/
0x4000
;
ptr
+=
2
;
}
if
((
flags
&
(
WE_HAVE_A_SCALE
|
WE_HAVE_AN_X_AND_Y_SCALE
|
WE_HAVE_A_TWO_BY_TWO
))
&&
(
scale_xx
!=
1
<<
14
||
scale_yy
!=
1
<<
14
||
scale_xy
||
scale_yx
))
FIXME
(
"unhandled scaling %x,%x,%x,%x of glyph %x
\n
"
,
scale_xx
,
scale_xy
,
scale_yx
,
scale_yy
,
index
);
start_pt
=
pts_in_outline
(
outline
);
append_glyph_outline
(
hdc
,
index
,
outline
);
end_pt
=
pts_in_outline
(
outline
);
if
(
flags
&
(
WE_HAVE_A_SCALE
|
WE_HAVE_AN_X_AND_Y_SCALE
|
WE_HAVE_A_TWO_BY_TWO
))
{
WORD
i
;
TRACE
(
"transform %f,%f,%f,%f of glyph %x
\n
"
,
scale_xx
,
scale_xy
,
scale_yx
,
scale_yy
,
index
);
for
(
i
=
start_pt
;
i
<
end_pt
;
i
++
)
{
LONG
x
=
outline
->
pts
[
i
].
x
,
y
=
outline
->
pts
[
i
].
y
;
outline
->
pts
[
i
].
x
=
x
*
scale_xx
+
y
*
scale_yx
;
outline
->
pts
[
i
].
y
=
x
*
scale_xy
+
y
*
scale_yy
;
}
}
if
((
flags
&
ARGS_ARE_XY_VALUES
)
==
0
)
{
WORD
orig_pt
=
arg1
,
new_pt
=
arg2
;
...
...
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