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
b91548d0
Commit
b91548d0
authored
Feb 11, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix setting canBreakShapingAfter when applying ligatures.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2d8add43
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
opentype.c
dlls/dwrite/opentype.c
+22
-6
No files found.
dlls/dwrite/opentype.c
View file @
b91548d0
...
@@ -5126,10 +5126,28 @@ static BOOL opentype_layout_context_match_input(const struct match_context *mc,
...
@@ -5126,10 +5126,28 @@ static BOOL opentype_layout_context_match_input(const struct match_context *mc,
return
TRUE
;
return
TRUE
;
}
}
static
void
opentype_layout_unsafe_to_break
(
struct
scriptshaping_context
*
context
,
unsigned
int
idx
)
/* Marks text segment as unsafe to break between [start, end) glyphs. */
static
void
opentype_layout_unsafe_to_break
(
struct
scriptshaping_context
*
context
,
unsigned
int
start
,
unsigned
int
end
)
{
{
if
(
context
->
u
.
buffer
.
glyph_props
[
idx
].
isClusterStart
)
unsigned
int
i
;
context
->
u
.
buffer
.
text_props
[
context
->
glyph_infos
[
idx
].
start_text_idx
].
canBreakShapingAfter
=
0
;
while
(
start
&&
!
context
->
u
.
buffer
.
glyph_props
[
start
].
isClusterStart
)
--
start
;
while
(
--
end
&&
!
context
->
u
.
buffer
.
glyph_props
[
end
].
isClusterStart
)
;
if
(
start
==
end
)
{
context
->
u
.
buffer
.
text_props
[
context
->
glyph_infos
[
start
].
start_text_idx
].
canBreakShapingAfter
=
0
;
return
;
}
for
(
i
=
context
->
glyph_infos
[
start
].
start_text_idx
;
i
<
context
->
glyph_infos
[
end
].
start_text_idx
;
++
i
)
{
context
->
u
.
buffer
.
text_props
[
i
].
canBreakShapingAfter
=
0
;
}
}
}
static
void
opentype_layout_delete_glyph
(
struct
scriptshaping_context
*
context
,
unsigned
int
idx
)
static
void
opentype_layout_delete_glyph
(
struct
scriptshaping_context
*
context
,
unsigned
int
idx
)
...
@@ -5194,10 +5212,8 @@ static BOOL opentype_layout_apply_ligature(struct scriptshaping_context *context
...
@@ -5194,10 +5212,8 @@ static BOOL opentype_layout_apply_ligature(struct scriptshaping_context *context
{
{
context
->
u
.
buffer
.
glyph_props
[
j
++
].
lig_component
=
comp_count
-
i
;
context
->
u
.
buffer
.
glyph_props
[
j
++
].
lig_component
=
comp_count
-
i
;
}
}
opentype_layout_unsafe_to_break
(
context
,
i
);
context
->
u
.
buffer
.
glyph_props
[
i
].
isClusterStart
=
0
;
context
->
glyph_infos
[
i
].
start_text_idx
=
0
;
}
}
opentype_layout_unsafe_to_break
(
context
,
match_positions
[
0
],
match_positions
[
comp_count
-
1
]
+
1
);
/* Delete ligated glyphs, backwards to preserve index. */
/* Delete ligated glyphs, backwards to preserve index. */
for
(
i
=
1
;
i
<
comp_count
;
++
i
)
for
(
i
=
1
;
i
<
comp_count
;
++
i
)
...
...
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