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
0aa30c46
Commit
0aa30c46
authored
Oct 18, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Handle multi-glyph clusters in ScriptStringOut.
parent
1172b810
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
5 deletions
+36
-5
usp10.c
dlls/usp10/usp10.c
+36
-5
No files found.
dlls/usp10/usp10.c
View file @
0aa30c46
...
@@ -1263,6 +1263,21 @@ error:
...
@@ -1263,6 +1263,21 @@ error:
return
hr
;
return
hr
;
}
}
static
inline
BOOL
does_glyph_start_cluster
(
const
SCRIPT_VISATTR
*
pva
,
const
WORD
*
pwLogClust
,
int
cChars
,
int
glyph
,
int
direction
)
{
int
i
;
if
(
pva
[
glyph
].
fClusterStart
)
return
TRUE
;
for
(
i
=
0
;
i
<
cChars
;
i
++
)
if
(
pwLogClust
[
i
]
==
glyph
)
break
;
if
(
i
!=
cChars
)
return
TRUE
;
return
FALSE
;
}
static
HRESULT
SS_ItemOut
(
SCRIPT_STRING_ANALYSIS
ssa
,
static
HRESULT
SS_ItemOut
(
SCRIPT_STRING_ANALYSIS
ssa
,
int
iX
,
int
iX
,
int
iY
,
int
iY
,
...
@@ -1344,6 +1359,25 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa,
...
@@ -1344,6 +1359,25 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa,
cGlyphs
++
;
cGlyphs
++
;
if
(
cEnd
<
0
||
scriptInformation
[
analysis
->
pItem
[
iItem
].
a
.
eScript
].
props
.
fNeedsCaretInfo
)
{
INT
direction
;
INT
clust_glyph
;
clust_glyph
=
iGlyph
+
cGlyphs
;
if
(
analysis
->
pItem
[
iItem
].
a
.
fRTL
)
direction
=
-
1
;
else
direction
=
1
;
while
(
clust_glyph
<
analysis
->
glyphs
[
iItem
].
numGlyphs
&&
!
does_glyph_start_cluster
(
analysis
->
glyphs
[
iItem
].
psva
,
analysis
->
glyphs
[
iItem
].
pwLogClust
,
(
analysis
->
pItem
[
iItem
+
1
].
iCharPos
-
analysis
->
pItem
[
iItem
].
iCharPos
),
clust_glyph
,
direction
))
{
cGlyphs
++
;
clust_glyph
++
;
}
}
hr
=
ScriptTextOut
(
analysis
->
hdc
,
hr
=
ScriptTextOut
(
analysis
->
hdc
,
(
SCRIPT_CACHE
*
)
&
analysis
->
glyphs
[
iItem
].
sc
,
iX
+
off_x
,
(
SCRIPT_CACHE
*
)
&
analysis
->
glyphs
[
iItem
].
sc
,
iX
+
off_x
,
iY
,
uOptions
,
prc
,
&
analysis
->
pItem
[
iItem
].
a
,
NULL
,
0
,
iY
,
uOptions
,
prc
,
&
analysis
->
pItem
[
iItem
].
a
,
NULL
,
0
,
...
@@ -1660,11 +1694,8 @@ static inline int get_glyph_cluster_advance(const int* piAdvance, const SCRIPT_V
...
@@ -1660,11 +1694,8 @@ static inline int get_glyph_cluster_advance(const int* piAdvance, const SCRIPT_V
for
(
glyph
+=
direction
;
glyph
<
cGlyphs
&&
glyph
>=
0
;
glyph
+=
direction
)
for
(
glyph
+=
direction
;
glyph
<
cGlyphs
&&
glyph
>=
0
;
glyph
+=
direction
)
{
{
if
(
pva
[
glyph
].
fClusterStart
)
break
;
if
(
does_glyph_start_cluster
(
pva
,
pwLogClust
,
cChars
,
glyph
,
direction
))
for
(
i
=
0
;
i
<
cChars
;
i
++
)
if
(
pwLogClust
[
i
]
==
glyph
)
break
;
if
(
i
!=
cChars
)
break
;
break
;
if
(
glyph
>
log_clust_max
)
if
(
glyph
>
log_clust_max
)
break
;
break
;
...
...
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