Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
282678cc
Commit
282678cc
authored
Feb 04, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Return static axis values for weight/width/italic properties.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
05e335c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
font.c
dlls/dwrite/font.c
+26
-2
font.c
dlls/dwrite/tests/font.c
+0
-1
No files found.
dlls/dwrite/font.c
View file @
282678cc
...
...
@@ -80,6 +80,8 @@ struct dwrite_font_data
FONTSIGNATURE
fontsig
;
UINT32
flags
;
/* enum font_flags */
struct
dwrite_font_propvec
propvec
;
/* Static axis for weight/width/italic. */
DWRITE_FONT_AXIS_VALUE
axis
[
3
];
DWRITE_FONT_METRICS1
metrics
;
IDWriteLocalizedStrings
*
info_strings
[
DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG
+
1
];
...
...
@@ -2061,8 +2063,9 @@ static HRESULT WINAPI dwritefont3_GetFontFaceReference(IDWriteFont3 *iface, IDWr
TRACE
(
"%p, %p.
\n
"
,
iface
,
reference
);
return
IDWriteFactory5_CreateFontFaceReference_
((
IDWriteFactory5
*
)
font
->
family
->
collection
->
factory
,
font
->
data
->
file
,
font
->
data
->
face_index
,
font
->
data
->
simulations
,
reference
);
return
IDWriteFactory7_CreateFontFaceReference
(
font
->
family
->
collection
->
factory
,
font
->
data
->
file
,
font
->
data
->
face_index
,
font
->
data
->
simulations
,
font
->
data
->
axis
,
ARRAY_SIZE
(
font
->
data
->
axis
),
(
IDWriteFontFaceReference1
**
)
reference
);
}
static
BOOL
WINAPI
dwritefont3_HasCharacter
(
IDWriteFont3
*
iface
,
UINT32
ch
)
...
...
@@ -3857,6 +3860,20 @@ static BOOL font_apply_differentiation_rules(struct dwrite_font_data *font, WCHA
static
HRESULT
init_font_data
(
const
struct
fontface_desc
*
desc
,
struct
dwrite_font_data
**
ret
)
{
static
const
float
width_axis_values
[]
=
{
0
.
0
f
,
/* DWRITE_FONT_STRETCH_UNDEFINED */
50
.
0
f
,
/* DWRITE_FONT_STRETCH_ULTRA_CONDENSED */
62
.
5
f
,
/* DWRITE_FONT_STRETCH_EXTRA_CONDENSED */
75
.
0
f
,
/* DWRITE_FONT_STRETCH_CONDENSED */
87
.
5
f
,
/* DWRITE_FONT_STRETCH_SEMI_CONDENSED */
100
.
0
f
,
/* DWRITE_FONT_STRETCH_NORMAL */
112
.
5
f
,
/* DWRITE_FONT_STRETCH_SEMI_EXPANDED */
125
.
0
f
,
/* DWRITE_FONT_STRETCH_EXPANDED */
150
.
0
f
,
/* DWRITE_FONT_STRETCH_EXTRA_EXPANDED */
200
.
0
f
,
/* DWRITE_FONT_STRETCH_ULTRA_EXPANDED */
};
struct
file_stream_desc
stream_desc
;
struct
dwrite_font_props
props
;
struct
dwrite_font_data
*
data
;
...
...
@@ -3910,6 +3927,13 @@ static HRESULT init_font_data(const struct fontface_desc *desc, struct dwrite_fo
init_font_prop_vec
(
data
->
weight
,
data
->
stretch
,
data
->
style
,
&
data
->
propvec
);
data
->
axis
[
0
].
axisTag
=
DWRITE_FONT_AXIS_TAG_WEIGHT
;
data
->
axis
[
0
].
value
=
props
.
weight
;
data
->
axis
[
1
].
axisTag
=
DWRITE_FONT_AXIS_TAG_WIDTH
;
data
->
axis
[
1
].
value
=
width_axis_values
[
props
.
stretch
];
data
->
axis
[
2
].
axisTag
=
DWRITE_FONT_AXIS_TAG_ITALIC
;
data
->
axis
[
2
].
value
=
data
->
style
==
DWRITE_FONT_STYLE_ITALIC
?
1
.
0
f
:
0
.
0
f
;
*
ret
=
data
;
return
S_OK
;
}
...
...
dlls/dwrite/tests/font.c
View file @
282678cc
...
...
@@ -7929,7 +7929,6 @@ todo_wine
(
void
**
)
&
ref2
)))
{
UINT32
axis_count
=
IDWriteFontFaceReference1_GetFontAxisValueCount
(
ref2
);
todo_wine
ok
(
axis_count
>
0
,
"Unexpected axis value count.
\n
"
);
IDWriteFontFaceReference1_Release
(
ref2
);
}
...
...
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