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
74a0a3fd
Commit
74a0a3fd
authored
Aug 22, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Aug 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: In ScriptXtoX use cChars as the item is the character index.
parent
126c7798
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
usp10.c
dlls/usp10/usp10.c
+12
-12
No files found.
dlls/usp10/usp10.c
View file @
74a0a3fd
...
...
@@ -1320,7 +1320,7 @@ HRESULT WINAPI ScriptCPtoX(int iCP,
}
iPosX
=
0
.
0
;
for
(
item
=
0
;
item
<
iCP
&&
item
<
c
Glyph
s
;
item
++
)
for
(
item
=
0
;
item
<
iCP
&&
item
<
c
Char
s
;
item
++
)
{
if
(
iSpecial
==
-
1
&&
(
iCluster
==
-
1
||
(
iCluster
!=
-
1
&&
iCluster
+
clust_size
<=
item
)))
{
...
...
@@ -1330,7 +1330,7 @@ HRESULT WINAPI ScriptCPtoX(int iCP,
clust_size
=
1
;
iCluster
=
-
1
;
for
(
check
=
item
+
1
;
check
<
c
Glyph
s
;
check
++
)
for
(
check
=
item
+
1
;
check
<
c
Char
s
;
check
++
)
{
if
(
pwLogClust
[
check
]
==
clust
)
{
...
...
@@ -1341,9 +1341,9 @@ HRESULT WINAPI ScriptCPtoX(int iCP,
else
break
;
}
if
(
check
>=
c
Glyph
s
&&
!
iMaxPos
)
if
(
check
>=
c
Char
s
&&
!
iMaxPos
)
{
for
(
check
=
clust
;
check
<
c
Glyph
s
;
check
++
)
for
(
check
=
clust
;
check
<
c
Char
s
;
check
++
)
special_size
+=
piAdvance
[
check
];
iSpecial
=
item
;
special_size
/=
(
cChars
-
item
);
...
...
@@ -1406,12 +1406,12 @@ HRESULT WINAPI ScriptXtoCP(int iX,
if
(
iX
<
0
)
{
*
piCP
=
c
Glyph
s
;
*
piCP
=
c
Char
s
;
*
piTrailing
=
0
;
return
S_OK
;
}
for
(
item
=
0
;
item
<
c
Glyph
s
;
item
++
)
for
(
item
=
0
;
item
<
c
Char
s
;
item
++
)
if
(
pwLogClust
[
item
]
>
max_clust
)
{
ERR
(
"We do not handle non reversed clusters properly
\n
"
);
...
...
@@ -1430,8 +1430,8 @@ HRESULT WINAPI ScriptXtoCP(int iX,
if
(
direction
>
0
)
item
=
0
;
else
item
=
c
Glyph
s
-
1
;
for
(;
iPosX
<=
iX
&&
item
<
c
Glyph
s
&&
item
>=
0
;
item
+=
direction
)
item
=
c
Char
s
-
1
;
for
(;
iPosX
<=
iX
&&
item
<
c
Char
s
&&
item
>=
0
;
item
+=
direction
)
{
iLastPosX
=
iPosX
;
if
(
iSpecial
==
-
1
&&
...
...
@@ -1449,7 +1449,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
clust_size
=
1
;
iCluster
=
-
1
;
for
(
check
=
item
+
direction
;
check
<
c
Glyph
s
&&
check
>=
0
;
check
+=
direction
)
for
(
check
=
item
+
direction
;
check
<
c
Char
s
&&
check
>=
0
;
check
+=
direction
)
{
if
(
pwLogClust
[
check
]
==
clust
)
{
...
...
@@ -1460,9 +1460,9 @@ HRESULT WINAPI ScriptXtoCP(int iX,
else
break
;
}
if
(
check
>=
c
Glyph
s
&&
direction
>
0
)
if
(
check
>=
c
Char
s
&&
direction
>
0
)
{
for
(
check
=
clust
;
check
<
c
Glyph
s
;
check
++
)
for
(
check
=
clust
;
check
<
c
Char
s
;
check
++
)
special_size
+=
piAdvance
[
check
];
iSpecial
=
item
;
special_size
/=
(
cChars
-
item
);
...
...
@@ -1481,7 +1481,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
{
if
(
iPosX
>
iX
)
item
--
;
if
(
item
<
c
Glyph
s
&&
((
iPosX
-
iLastPosX
)
/
2
.
0
)
+
iX
>
iPosX
)
if
(
item
<
c
Char
s
&&
((
iPosX
-
iLastPosX
)
/
2
.
0
)
+
iX
>
iPosX
)
*
piTrailing
=
1
;
else
*
piTrailing
=
0
;
...
...
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