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
112d20e8
Commit
112d20e8
authored
May 29, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Forward GetGdiCompatibleGlyphPlacements() to corresponding font methods.
parent
ffabfd49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
8 deletions
+41
-8
analyzer.c
dlls/dwrite/analyzer.c
+41
-7
layout.c
dlls/dwrite/tests/layout.c
+0
-1
No files found.
dlls/dwrite/analyzer.c
View file @
112d20e8
...
...
@@ -1058,22 +1058,56 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
}
/* FIXME: actually apply features */
IDWriteFontFace1_Release
(
fontface1
);
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextanalyzer_GetGdiCompatibleGlyphPlacements
(
IDWriteTextAnalyzer2
*
iface
,
WCHAR
const
*
text
,
UINT16
const
*
clustermap
,
DWRITE_SHAPING_TEXT_PROPERTIES
*
props
,
UINT32
text_len
,
UINT16
const
*
glyph
_indice
s
,
DWRITE_SHAPING_GLYPH_PROPERTIES
const
*
glyph_props
,
UINT32
glyph_count
,
IDWriteFontFace
*
font_face
,
FLOAT
fontE
mSize
,
FLOAT
pixels_per_dip
,
UINT32
text_len
,
UINT16
const
*
glyphs
,
DWRITE_SHAPING_GLYPH_PROPERTIES
const
*
glyph_props
,
UINT32
glyph_count
,
IDWriteFontFace
*
fontface
,
FLOAT
e
mSize
,
FLOAT
pixels_per_dip
,
DWRITE_MATRIX
const
*
transform
,
BOOL
use_gdi_natural
,
BOOL
is_sideways
,
BOOL
is_rtl
,
DWRITE_SCRIPT_ANALYSIS
const
*
analysis
,
WCHAR
const
*
locale
,
DWRITE_TYPOGRAPHIC_FEATURES
const
**
features
,
UINT32
const
*
feature_range_lengths
,
UINT32
feature_ranges
,
FLOAT
*
glyph_advances
,
DWRITE_GLYPH_OFFSET
*
glyph_
offsets
)
UINT32
const
*
feature_range_lengths
,
UINT32
feature_ranges
,
FLOAT
*
advances
,
DWRITE_GLYPH_OFFSET
*
offsets
)
{
FIXME
(
"(%s %p %p %u %p %p %u %p %f %f %p %d %d %d %p %s %p %p %u %p %p): stub
\n
"
,
debugstr_wn
(
text
,
text_len
),
clustermap
,
props
,
text_len
,
glyph_indices
,
glyph_props
,
glyph_count
,
font_face
,
fontEmSize
,
pixels_per_dip
,
DWRITE_FONT_METRICS
metrics
;
IDWriteFontFace1
*
fontface1
;
HRESULT
hr
;
UINT32
i
;
TRACE
(
"(%s %p %p %u %p %p %u %p %.2f %.2f %p %d %d %d %p %s %p %p %u %p %p)
\n
"
,
debugstr_wn
(
text
,
text_len
),
clustermap
,
props
,
text_len
,
glyphs
,
glyph_props
,
glyph_count
,
fontface
,
emSize
,
pixels_per_dip
,
transform
,
use_gdi_natural
,
is_sideways
,
is_rtl
,
analysis
,
debugstr_w
(
locale
),
features
,
feature_range_lengths
,
feature_ranges
,
glyph_advances
,
glyph_offsets
);
return
E_NOTIMPL
;
feature_ranges
,
advances
,
offsets
);
if
(
glyph_count
==
0
)
return
S_OK
;
hr
=
IDWriteFontFace_QueryInterface
(
fontface
,
&
IID_IDWriteFontFace1
,
(
void
**
)
&
fontface1
);
if
(
FAILED
(
hr
))
{
WARN
(
"failed to get IDWriteFontFace1.
\n
"
);
return
hr
;
}
IDWriteFontFace_GetGdiCompatibleMetrics
(
fontface
,
emSize
,
pixels_per_dip
,
transform
,
&
metrics
);
for
(
i
=
0
;
i
<
glyph_count
;
i
++
)
{
INT32
a
;
hr
=
IDWriteFontFace1_GetGdiCompatibleGlyphAdvances
(
fontface1
,
emSize
,
pixels_per_dip
,
transform
,
use_gdi_natural
,
is_sideways
,
1
,
&
glyphs
[
i
],
&
a
);
if
(
FAILED
(
hr
))
a
=
0
;
advances
[
i
]
=
get_scaled_advance_width
(
a
,
emSize
,
&
metrics
);
offsets
[
i
].
advanceOffset
=
0
.
0
;
offsets
[
i
].
ascenderOffset
=
0
.
0
;
}
/* FIXME: actually apply features */
IDWriteFontFace1_Release
(
fontface1
);
return
S_OK
;
}
static
inline
FLOAT
get_cluster_advance
(
const
FLOAT
*
advances
,
UINT32
start
,
UINT32
end
)
...
...
dlls/dwrite/tests/layout.c
View file @
112d20e8
...
...
@@ -921,7 +921,6 @@ static void test_Draw(void)
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
NULL
,
&
testrenderer
,
0
.
0
,
0
.
0
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_seq
,
"draw test"
,
TRUE
);
IDWriteTextLayout_Release
(
layout
);
...
...
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