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
8f4fab24
Commit
8f4fab24
authored
Oct 17, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Handle the fNeedsCaretInfo flag in XtoCP and CPtoX.
parent
64fd6fa7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
4 deletions
+50
-4
usp10.c
dlls/usp10/usp10.c
+50
-4
No files found.
dlls/usp10/usp10.c
View file @
8f4fab24
...
@@ -1697,12 +1697,30 @@ HRESULT WINAPI ScriptCPtoX(int iCP,
...
@@ -1697,12 +1697,30 @@ HRESULT WINAPI ScriptCPtoX(int iCP,
iPosX
+=
special_size
;
iPosX
+=
special_size
;
}
}
else
else
iPosX
+=
piAdvance
[
clust
]
/
(
float
)
clust_size
;
{
if
(
scriptInformation
[
psa
->
eScript
].
props
.
fNeedsCaretInfo
)
{
clust_size
--
;
if
(
clust_size
==
0
)
iPosX
+=
piAdvance
[
clust
];
}
else
iPosX
+=
piAdvance
[
clust
]
/
(
float
)
clust_size
;
}
}
}
else
if
(
iSpecial
!=
-
1
)
else
if
(
iSpecial
!=
-
1
)
iPosX
+=
special_size
;
iPosX
+=
special_size
;
else
/* (iCluster != -1) */
else
/* (iCluster != -1) */
iPosX
+=
piAdvance
[
pwLogClust
[
iCluster
]]
/
(
float
)
clust_size
;
{
if
(
scriptInformation
[
psa
->
eScript
].
props
.
fNeedsCaretInfo
)
{
clust_size
--
;
if
(
clust_size
==
0
)
iPosX
+=
piAdvance
[
pwLogClust
[
iCluster
]];
}
else
iPosX
+=
piAdvance
[
pwLogClust
[
iCluster
]]
/
(
float
)
clust_size
;
}
}
}
if
(
iMaxPos
>
0
)
if
(
iMaxPos
>
0
)
...
@@ -1737,6 +1755,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
...
@@ -1737,6 +1755,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
int
iSpecial
=
-
1
;
int
iSpecial
=
-
1
;
int
iCluster
=
-
1
;
int
iCluster
=
-
1
;
int
clust_size
=
1
;
int
clust_size
=
1
;
int
cjump
=
0
;
float
special_size
=
0
.
0
;
float
special_size
=
0
.
0
;
int
direction
=
1
;
int
direction
=
1
;
...
@@ -1795,6 +1814,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
...
@@ -1795,6 +1814,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
clust_size
=
1
;
clust_size
=
1
;
iCluster
=
-
1
;
iCluster
=
-
1
;
cjump
=
0
;
for
(
check
=
item
+
direction
;
check
<
cChars
&&
check
>=
0
;
check
+=
direction
)
for
(
check
=
item
+
direction
;
check
<
cChars
&&
check
>=
0
;
check
+=
direction
)
{
{
...
@@ -1816,12 +1836,30 @@ HRESULT WINAPI ScriptXtoCP(int iX,
...
@@ -1816,12 +1836,30 @@ HRESULT WINAPI ScriptXtoCP(int iX,
iPosX
+=
special_size
;
iPosX
+=
special_size
;
}
}
else
else
iPosX
+=
piAdvance
[
clust
]
/
(
float
)
clust_size
;
{
if
(
scriptInformation
[
psa
->
eScript
].
props
.
fNeedsCaretInfo
)
{
if
(
!
cjump
)
iPosX
+=
piAdvance
[
clust
];
cjump
++
;
}
else
iPosX
+=
piAdvance
[
clust
]
/
(
float
)
clust_size
;
}
}
}
else
if
(
iSpecial
!=
-
1
)
else
if
(
iSpecial
!=
-
1
)
iPosX
+=
special_size
;
iPosX
+=
special_size
;
else
/* (iCluster != -1) */
else
/* (iCluster != -1) */
iPosX
+=
piAdvance
[
pwLogClust
[
iCluster
]]
/
(
float
)
clust_size
;
{
if
(
scriptInformation
[
psa
->
eScript
].
props
.
fNeedsCaretInfo
)
{
if
(
!
cjump
)
iPosX
+=
piAdvance
[
pwLogClust
[
iCluster
]];
cjump
++
;
}
else
iPosX
+=
piAdvance
[
pwLogClust
[
iCluster
]]
/
(
float
)
clust_size
;
}
}
}
if
(
direction
>
0
)
if
(
direction
>
0
)
...
@@ -1829,7 +1867,11 @@ HRESULT WINAPI ScriptXtoCP(int iX,
...
@@ -1829,7 +1867,11 @@ HRESULT WINAPI ScriptXtoCP(int iX,
if
(
iPosX
>
iX
)
if
(
iPosX
>
iX
)
item
--
;
item
--
;
if
(
item
<
cChars
&&
((
iPosX
-
iLastPosX
)
/
2
.
0
)
+
iX
>=
iPosX
)
if
(
item
<
cChars
&&
((
iPosX
-
iLastPosX
)
/
2
.
0
)
+
iX
>=
iPosX
)
{
if
(
scriptInformation
[
psa
->
eScript
].
props
.
fNeedsCaretInfo
&&
clust_size
>
1
)
item
+=
(
clust_size
-
1
);
*
piTrailing
=
1
;
*
piTrailing
=
1
;
}
else
else
*
piTrailing
=
0
;
*
piTrailing
=
0
;
}
}
...
@@ -1843,7 +1885,11 @@ HRESULT WINAPI ScriptXtoCP(int iX,
...
@@ -1843,7 +1885,11 @@ HRESULT WINAPI ScriptXtoCP(int iX,
if
(
iLastPosX
==
iX
)
if
(
iLastPosX
==
iX
)
*
piTrailing
=
0
;
*
piTrailing
=
0
;
else
if
(
item
<
0
||
((
iLastPosX
-
iPosX
)
/
2
.
0
)
+
iX
<=
iLastPosX
)
else
if
(
item
<
0
||
((
iLastPosX
-
iPosX
)
/
2
.
0
)
+
iX
<=
iLastPosX
)
{
if
(
scriptInformation
[
psa
->
eScript
].
props
.
fNeedsCaretInfo
&&
clust_size
>
1
)
item
-=
(
clust_size
-
1
);
*
piTrailing
=
1
;
*
piTrailing
=
1
;
}
else
else
*
piTrailing
=
0
;
*
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