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
082f9895
Commit
082f9895
authored
Jan 08, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Jan 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Simplify the offset calculation by always using ETO_PDY.
parent
a1648ac5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
31 deletions
+9
-31
usp10.c
dlls/usp10/usp10.c
+9
-31
No files found.
dlls/usp10/usp10.c
View file @
082f9895
...
...
@@ -3253,41 +3253,19 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
fuOptions
|=
ETO_GLYPH_INDEX
;
/* Say don't do translation to glyph */
lpDx
=
heap_alloc
(
cGlyphs
*
sizeof
(
INT
)
*
2
);
fuOptions
|=
ETO_PDY
;
if
(
pGoffset
)
{
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
if
(
!
(
fuOptions
&
ETO_PDY
)
&&
pGoffset
[
i
].
dv
)
fuOptions
|=
ETO_PDY
;
}
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
{
int
idx
=
i
;
if
(
fuOptions
&
ETO_PDY
)
{
idx
*=
2
;
lpDx
[
idx
+
1
]
=
0
;
}
lpDx
[
idx
]
=
piAdvance
[
i
];
}
if
(
pGoffset
)
{
for
(
i
=
1
;
i
<
cGlyphs
;
i
++
)
lpDx
[
i
*
2
]
=
piAdvance
[
i
];
lpDx
[
i
*
2
+
1
]
=
0
;
if
(
pGoffset
&&
i
>
0
)
{
int
idx
=
i
;
int
prev_idx
=
i
-
1
;
if
(
fuOptions
&
ETO_PDY
)
{
idx
*=
2
;
prev_idx
=
idx
-
2
;
}
lpDx
[
prev_idx
]
+=
pGoffset
[
i
].
du
;
lpDx
[
idx
]
-=
pGoffset
[
i
].
du
;
if
(
fuOptions
&
ETO_PDY
)
{
lpDx
[
prev_idx
+
1
]
+=
pGoffset
[
i
].
dv
;
lpDx
[
idx
+
1
]
-=
pGoffset
[
i
].
dv
;
}
lpDx
[(
i
-
1
)
*
2
]
+=
pGoffset
[
i
].
du
;
lpDx
[(
i
-
1
)
*
2
+
1
]
+=
pGoffset
[
i
].
dv
;
lpDx
[
i
*
2
]
-=
pGoffset
[
i
].
du
;
lpDx
[
i
*
2
+
1
]
-=
pGoffset
[
i
].
dv
;
}
}
...
...
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