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
a6c0eab6
Commit
a6c0eab6
authored
Jun 11, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Set initial canBreakShapingAfter flags.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f7fc249e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
analyzer.c
dlls/dwrite/analyzer.c
+11
-11
dwrite_private.h
dlls/dwrite/dwrite_private.h
+3
-0
opentype.c
dlls/dwrite/opentype.c
+5
-1
No files found.
dlls/dwrite/analyzer.c
View file @
a6c0eab6
...
...
@@ -1167,9 +1167,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
get_number_substitutes
(
substitution
,
is_rtl
,
digits
);
/* FIXME: have the shaping engine set this */
memset
(
text_props
,
0
,
length
*
sizeof
(
*
text_props
));
font_obj
=
unsafe_impl_from_IDWriteFontFace
(
fontface
);
context
.
cache
=
fontface_get_shaping_cache
(
font_obj
);
...
...
@@ -1179,6 +1176,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
context
.
is_sideways
=
is_sideways
;
context
.
u
.
subst
.
glyphs
=
heap_calloc
(
max_glyph_count
,
sizeof
(
*
glyphs
));
context
.
u
.
subst
.
glyph_props
=
heap_calloc
(
max_glyph_count
,
sizeof
(
*
glyph_props
));
context
.
u
.
subst
.
text_props
=
text_props
;
context
.
u
.
subst
.
clustermap
=
clustermap
;
context
.
u
.
subst
.
max_glyph_count
=
max_glyph_count
;
context
.
u
.
subst
.
capacity
=
max_glyph_count
;
...
...
@@ -1208,7 +1206,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
}
static
HRESULT
WINAPI
dwritetextanalyzer_GetGlyphPlacements
(
IDWriteTextAnalyzer2
*
iface
,
WCHAR
const
*
text
,
UINT16
const
*
clustermap
,
DWRITE_SHAPING_TEXT_PROPERTIES
*
props
,
WCHAR
const
*
text
,
UINT16
const
*
clustermap
,
DWRITE_SHAPING_TEXT_PROPERTIES
*
text_
props
,
UINT32
text_len
,
UINT16
const
*
glyphs
,
DWRITE_SHAPING_GLYPH_PROPERTIES
const
*
glyph_props
,
UINT32
glyph_count
,
IDWriteFontFace
*
fontface
,
float
emSize
,
BOOL
is_sideways
,
BOOL
is_rtl
,
DWRITE_SCRIPT_ANALYSIS
const
*
analysis
,
WCHAR
const
*
locale
,
DWRITE_TYPOGRAPHIC_FEATURES
const
**
features
,
...
...
@@ -1220,8 +1218,8 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
unsigned
int
i
,
script
;
HRESULT
hr
;
TRACE
(
"
(%s %p %p %u %p %p %u %p %.2f %d %d %s %s %p %p %u %p %p)
\n
"
,
debugstr_wn
(
text
,
text_len
),
clustermap
,
props
,
text_len
,
glyphs
,
glyph_props
,
glyph_count
,
fontface
,
emSize
,
is_sideways
,
TRACE
(
"
%s, %p, %p, %u, %p, %p, %u, %p, %.2f, %d, %d, %s, %s, %p, %p, %u, %p, %p.
\n
"
,
debugstr_wn
(
text
,
text_len
),
clustermap
,
text_
props
,
text_len
,
glyphs
,
glyph_props
,
glyph_count
,
fontface
,
emSize
,
is_sideways
,
is_rtl
,
debugstr_sa_script
(
analysis
->
script
),
debugstr_w
(
locale
),
features
,
feature_range_lengths
,
feature_ranges
,
advances
,
offsets
);
...
...
@@ -1253,6 +1251,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
context
.
is_sideways
=
is_sideways
;
context
.
u
.
pos
.
glyphs
=
glyphs
;
context
.
u
.
pos
.
glyph_props
=
glyph_props
;
context
.
u
.
pos
.
text_props
=
text_props
;
context
.
u
.
pos
.
clustermap
=
clustermap
;
context
.
glyph_count
=
glyph_count
;
context
.
emsize
=
emSize
;
...
...
@@ -1274,7 +1273,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
}
static
HRESULT
WINAPI
dwritetextanalyzer_GetGdiCompatibleGlyphPlacements
(
IDWriteTextAnalyzer2
*
iface
,
WCHAR
const
*
text
,
UINT16
const
*
clustermap
,
DWRITE_SHAPING_TEXT_PROPERTIES
*
props
,
WCHAR
const
*
text
,
UINT16
const
*
clustermap
,
DWRITE_SHAPING_TEXT_PROPERTIES
*
text_
props
,
UINT32
text_len
,
UINT16
const
*
glyphs
,
DWRITE_SHAPING_GLYPH_PROPERTIES
const
*
glyph_props
,
UINT32
glyph_count
,
IDWriteFontFace
*
fontface
,
float
emSize
,
float
ppdip
,
DWRITE_MATRIX
const
*
transform
,
BOOL
use_gdi_natural
,
BOOL
is_sideways
,
BOOL
is_rtl
,
...
...
@@ -1288,10 +1287,10 @@ static HRESULT WINAPI dwritetextanalyzer_GetGdiCompatibleGlyphPlacements(IDWrite
unsigned
int
i
,
script
;
HRESULT
hr
;
TRACE
(
"
(%s %p %p %u %p %p %u %p %.2f %.2f %p %d %d %d %s %s %p %p %u %p %p)
\n
"
,
debugstr_wn
(
text
,
text_len
)
,
clustermap
,
props
,
text_len
,
glyphs
,
glyph_props
,
glyph_count
,
fontface
,
emSize
,
ppdip
,
transform
,
use_gdi_natural
,
is_sideways
,
is_rtl
,
debugstr_sa_script
(
analysis
->
script
),
debugstr_w
(
locale
),
features
,
feature_range_lengths
,
feature_ranges
,
advances
,
offsets
);
TRACE
(
"
%s, %p, %p, %u, %p, %p, %u, %p, %.2f, %.2f, %p, %d, %d, %d, %s, %s, %p, %p, %u, %p, %p.
\n
"
,
debugstr_wn
(
text
,
text_len
),
clustermap
,
text_props
,
text_len
,
glyphs
,
glyph_props
,
glyph_count
,
fontface
,
emSize
,
ppdip
,
transform
,
use_gdi_natural
,
is_sideways
,
is_rtl
,
debugstr_sa_script
(
analysis
->
script
),
debugstr_w
(
locale
),
features
,
feature_range_lengths
,
feature_ranges
,
advances
,
offsets
);
analyzer_dump_user_features
(
features
,
feature_range_lengths
,
feature_ranges
);
...
...
@@ -1323,6 +1322,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGdiCompatibleGlyphPlacements(IDWrite
context
.
is_sideways
=
is_sideways
;
context
.
u
.
pos
.
glyphs
=
glyphs
;
context
.
u
.
pos
.
glyph_props
=
glyph_props
;
context
.
u
.
pos
.
text_props
=
text_props
;
context
.
u
.
pos
.
clustermap
=
clustermap
;
context
.
glyph_count
=
glyph_count
;
context
.
emsize
=
emSize
*
ppdip
;
...
...
dlls/dwrite/dwrite_private.h
View file @
a6c0eab6
...
...
@@ -552,6 +552,7 @@ struct scriptshaping_context
{
const
UINT16
*
glyphs
;
const
DWRITE_SHAPING_GLYPH_PROPERTIES
*
glyph_props
;
DWRITE_SHAPING_TEXT_PROPERTIES
*
text_props
;
const
UINT16
*
clustermap
;
p_apply_context_lookup
apply_context_lookup
;
}
pos
;
...
...
@@ -559,6 +560,7 @@ struct scriptshaping_context
{
UINT16
*
glyphs
;
DWRITE_SHAPING_GLYPH_PROPERTIES
*
glyph_props
;
DWRITE_SHAPING_TEXT_PROPERTIES
*
text_props
;
UINT16
*
clustermap
;
p_apply_context_lookup
apply_context_lookup
;
unsigned
int
max_glyph_count
;
...
...
@@ -569,6 +571,7 @@ struct scriptshaping_context
{
UINT16
*
glyphs
;
struct
shaping_glyph_properties
*
glyph_props
;
DWRITE_SHAPING_TEXT_PROPERTIES
*
text_props
;
UINT16
*
clustermap
;
p_apply_context_lookup
apply_context_lookup
;
}
buffer
;
...
...
dlls/dwrite/opentype.c
View file @
a6c0eab6
...
...
@@ -5823,6 +5823,7 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c
BOOL
bmp
;
memset
(
context
->
u
.
subst
.
glyph_props
,
0
,
context
->
u
.
subst
.
max_glyph_count
*
sizeof
(
*
context
->
u
.
subst
.
glyph_props
));
memset
(
context
->
u
.
buffer
.
text_props
,
0
,
context
->
length
*
sizeof
(
*
context
->
u
.
buffer
.
text_props
));
for
(
i
=
0
;
i
<
context
->
length
;
++
i
)
{
...
...
@@ -5869,9 +5870,12 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c
/* Set initial cluster map here, it's used for setting user features masks. */
clustermap
[
i
]
=
cluster_start_idx
;
if
(
!
bmp
)
if
(
bmp
)
context
->
u
.
buffer
.
text_props
[
i
].
canBreakShapingAfter
=
1
;
else
{
clustermap
[
i
+
1
]
=
cluster_start_idx
;
context
->
u
.
buffer
.
text_props
[
i
+
1
].
canBreakShapingAfter
=
1
;
++
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