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
d7ea24d5
Commit
d7ea24d5
authored
Mar 18, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Rewrite ScriptStringCPtoX to make use of ScriptCPtoX.
parent
289005a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
20 deletions
+30
-20
usp10.c
dlls/usp10/usp10.c
+30
-20
No files found.
dlls/usp10/usp10.c
View file @
d7ea24d5
...
...
@@ -202,6 +202,7 @@ typedef struct {
SCRIPT_VISATTR
*
psva
;
GOFFSET
*
pGoffset
;
ABC
*
abc
;
int
iMaxPosX
;
}
StringGlyphs
;
typedef
struct
{
...
...
@@ -824,6 +825,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
analysis
->
glyphs
[
i
].
psva
=
psva
;
analysis
->
glyphs
[
i
].
pGoffset
=
pGoffset
;
analysis
->
glyphs
[
i
].
abc
=
abc
;
analysis
->
glyphs
[
i
].
iMaxPosX
=
-
1
;
}
*
pssa
=
analysis
;
...
...
@@ -932,11 +934,9 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa,
*/
HRESULT
WINAPI
ScriptStringCPtoX
(
SCRIPT_STRING_ANALYSIS
ssa
,
int
icp
,
BOOL
fTrailing
,
int
*
pX
)
{
int
i
,
j
;
int
i
;
int
runningX
=
0
;
int
runningCp
=
0
;
StringAnalysis
*
analysis
=
ssa
;
BOOL
itemTrailing
;
TRACE
(
"(%p), %d, %d, (%p)
\n
"
,
ssa
,
icp
,
fTrailing
,
pX
);
...
...
@@ -951,25 +951,35 @@ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrai
for
(
i
=
0
;
i
<
analysis
->
numItems
;
i
++
)
{
if
(
analysis
->
pItem
[
i
].
a
.
fRTL
)
itemTrailing
=
!
fTrailing
;
else
itemTrailing
=
fTrailing
;
for
(
j
=
0
;
j
<
analysis
->
glyphs
[
i
].
numGlyphs
;
j
++
)
int
CP
=
analysis
->
pItem
[
i
+
1
].
iCharPos
-
analysis
->
pItem
[
i
].
iCharPos
;
int
offset
;
/* initialize max extents for uninitialized runs */
if
(
analysis
->
glyphs
[
i
].
iMaxPosX
==
-
1
)
{
if
(
runningCp
==
icp
&&
itemTrailing
==
FALSE
)
{
*
pX
=
runningX
;
return
S_OK
;
}
runningX
+=
analysis
->
glyphs
[
i
].
piAdvance
[
j
];
if
(
runningCp
==
icp
&&
itemTrailing
==
TRUE
)
{
*
pX
=
runningX
;
return
S_OK
;
}
runningCp
++
;
if
(
analysis
->
pItem
[
i
].
a
.
fRTL
)
ScriptCPtoX
(
0
,
FALSE
,
CP
,
analysis
->
glyphs
[
i
].
numGlyphs
,
analysis
->
glyphs
[
i
].
pwLogClust
,
analysis
->
glyphs
[
i
].
psva
,
analysis
->
glyphs
[
i
].
piAdvance
,
&
analysis
->
pItem
[
i
].
a
,
&
analysis
->
glyphs
[
i
].
iMaxPosX
);
else
ScriptCPtoX
(
CP
,
TRUE
,
CP
,
analysis
->
glyphs
[
i
].
numGlyphs
,
analysis
->
glyphs
[
i
].
pwLogClust
,
analysis
->
glyphs
[
i
].
psva
,
analysis
->
glyphs
[
i
].
piAdvance
,
&
analysis
->
pItem
[
i
].
a
,
&
analysis
->
glyphs
[
i
].
iMaxPosX
);
}
if
(
icp
>=
CP
)
{
runningX
+=
analysis
->
glyphs
[
i
].
iMaxPosX
;
icp
-=
CP
;
continue
;
}
ScriptCPtoX
(
icp
,
fTrailing
,
CP
,
analysis
->
glyphs
[
i
].
numGlyphs
,
analysis
->
glyphs
[
i
].
pwLogClust
,
analysis
->
glyphs
[
i
].
psva
,
analysis
->
glyphs
[
i
].
piAdvance
,
&
analysis
->
pItem
[
i
].
a
,
&
offset
);
runningX
+=
offset
;
*
pX
=
runningX
;
return
S_OK
;
}
/* icp out of range */
...
...
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