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
d1199995
Commit
d1199995
authored
Jul 18, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Trace user-provided OpenType feature set.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2999123f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
analyzer.c
dlls/dwrite/analyzer.c
+26
-4
No files found.
dlls/dwrite/analyzer.c
View file @
d1199995
...
...
@@ -1096,11 +1096,27 @@ static DWRITE_NUMBER_SUBSTITUTION_METHOD get_number_substitutes(IDWriteNumberSub
return
method
;
}
static
void
analyzer_dump_user_features
(
DWRITE_TYPOGRAPHIC_FEATURES
const
**
features
,
UINT32
const
*
feature_range_lengths
,
UINT32
feature_ranges
)
{
UINT32
i
,
j
,
start
;
if
(
!
TRACE_ON
(
dwrite
)
||
!
features
)
return
;
for
(
i
=
0
,
start
=
0
;
i
<
feature_ranges
;
i
++
,
start
+=
feature_range_lengths
[
i
])
{
TRACE
(
"feature range [%u,%u)
\n
"
,
start
,
start
+
feature_range_lengths
[
i
]);
for
(
j
=
0
;
j
<
features
[
i
]
->
featureCount
;
j
++
)
TRACE
(
"feature %s, parameter %u
\n
"
,
debugstr_an
((
char
*
)
&
features
[
i
]
->
features
[
j
].
nameTag
,
4
),
features
[
i
]
->
features
[
j
].
parameter
);
}
}
static
HRESULT
WINAPI
dwritetextanalyzer_GetGlyphs
(
IDWriteTextAnalyzer2
*
iface
,
WCHAR
const
*
text
,
UINT32
length
,
IDWriteFontFace
*
fontface
,
BOOL
is_sideways
,
BOOL
is_rtl
,
DWRITE_SCRIPT_ANALYSIS
const
*
analysis
,
WCHAR
const
*
locale
,
IDWriteNumberSubstitution
*
substitution
,
DWRITE_TYPOGRAPHIC_FEATURES
const
**
features
,
UINT32
const
*
feature_range_len
,
UINT32
feature_ranges
,
UINT32
max_glyph_count
,
UINT32
const
*
feature_range_len
gths
,
UINT32
feature_ranges
,
UINT32
max_glyph_count
,
UINT16
*
clustermap
,
DWRITE_SHAPING_TEXT_PROPERTIES
*
text_props
,
UINT16
*
glyph_indices
,
DWRITE_SHAPING_GLYPH_PROPERTIES
*
glyph_props
,
UINT32
*
actual_glyph_count
)
{
...
...
@@ -1118,9 +1134,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
TRACE
(
"(%s:%u %p %d %d %s %s %p %p %p %u %u %p %p %p %p %p)
\n
"
,
debugstr_wn
(
text
,
length
),
length
,
fontface
,
is_sideways
,
is_rtl
,
debugstr_sa_script
(
analysis
->
script
),
debugstr_w
(
locale
),
substitution
,
features
,
feature_range_len
,
feature_ranges
,
max_glyph_count
,
clustermap
,
text_props
,
glyph_indices
,
features
,
feature_range_len
gths
,
feature_ranges
,
max_glyph_count
,
clustermap
,
text_props
,
glyph_indices
,
glyph_props
,
actual_glyph_count
);
analyzer_dump_user_features
(
features
,
feature_range_lengths
,
feature_ranges
);
script
=
analysis
->
script
>
Script_LastId
?
Script_Unknown
:
analysis
->
script
;
if
(
max_glyph_count
<
length
)
...
...
@@ -1252,7 +1270,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
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
,
UINT32
const
*
feature_range_len
,
UINT32
feature_ranges
,
FLOAT
*
advances
,
DWRITE_GLYPH_OFFSET
*
offsets
)
UINT32
const
*
feature_range_len
gths
,
UINT32
feature_ranges
,
FLOAT
*
advances
,
DWRITE_GLYPH_OFFSET
*
offsets
)
{
DWRITE_FONT_METRICS
metrics
;
IDWriteFontFace1
*
fontface1
;
...
...
@@ -1261,9 +1279,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
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
,
is_rtl
,
debugstr_sa_script
(
analysis
->
script
),
debugstr_w
(
locale
),
features
,
feature_range_len
,
is_rtl
,
debugstr_sa_script
(
analysis
->
script
),
debugstr_w
(
locale
),
features
,
feature_range_len
gths
,
feature_ranges
,
advances
,
offsets
);
analyzer_dump_user_features
(
features
,
feature_range_lengths
,
feature_ranges
);
if
(
glyph_count
==
0
)
return
S_OK
;
...
...
@@ -1313,6 +1333,8 @@ static HRESULT WINAPI dwritetextanalyzer_GetGdiCompatibleGlyphPlacements(IDWrite
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
);
if
(
glyph_count
==
0
)
return
S_OK
;
...
...
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