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
f8e3cba7
Commit
f8e3cba7
authored
Mar 08, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Check for vertical variants only when asked.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a8e29f0e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
dwrite_private.h
dlls/dwrite/dwrite_private.h
+7
-6
font.c
dlls/dwrite/font.c
+1
-3
opentype.c
dlls/dwrite/opentype.c
+10
-2
No files found.
dlls/dwrite/dwrite_private.h
View file @
f8e3cba7
...
...
@@ -182,11 +182,12 @@ struct fontfacecached
enum
font_flags
{
FONT_IS_SYMBOL
=
1
<<
0
,
FONT_IS_MONOSPACED
=
1
<<
1
,
FONT_IS_COLORED
=
1
<<
2
,
/* CPAL/COLR support */
FONTFACE_HAS_KERNING_PAIRS
=
1
<<
3
,
FONTFACE_HAS_VERTICAL_VARIANTS
=
1
<<
4
FONT_IS_SYMBOL
=
0x00000001
,
FONT_IS_MONOSPACED
=
0x00000002
,
FONT_IS_COLORED
=
0x00000004
,
/* CPAL/COLR support */
FONTFACE_HAS_KERNING_PAIRS
=
0x00000008
,
FONTFACE_VERTICAL_VARIANTS
=
0x00000010
,
FONTFACE_NO_VERTICAL_VARIANTS
=
0x00000020
,
};
struct
dwrite_cmap
;
...
...
@@ -257,7 +258,7 @@ struct dwrite_fontface
unsigned
int
ascent
;
unsigned
int
descent
;
}
typo_metrics
;
UINT32
flags
;
unsigned
int
flags
;
struct
dwrite_cmap
cmap
;
...
...
dlls/dwrite/font.c
View file @
f8e3cba7
...
...
@@ -1217,7 +1217,7 @@ static BOOL WINAPI dwritefontface1_HasVerticalGlyphVariants(IDWriteFontFace5 *if
TRACE
(
"%p.
\n
"
,
iface
);
return
!!
(
fontface
->
flags
&
FONTFACE_HAS_VERTICAL_VARIANTS
);
return
opentype_has_vertical_variants
(
fontface
);
}
static
BOOL
WINAPI
dwritefontface2_IsColorFont
(
IDWriteFontFace5
*
iface
)
...
...
@@ -5004,8 +5004,6 @@ HRESULT create_fontface(const struct fontface_desc *desc, struct list *cached_li
if
(
freetype_has_kerning_pairs
(
&
fontface
->
IDWriteFontFace5_iface
))
fontface
->
flags
|=
FONTFACE_HAS_KERNING_PAIRS
;
if
(
opentype_has_vertical_variants
(
fontface
))
fontface
->
flags
|=
FONTFACE_HAS_VERTICAL_VARIANTS
;
fontface
->
glyph_image_formats
=
opentype_get_glyph_image_formats
(
&
fontface
->
IDWriteFontFace5_iface
);
/* Font properties are reused from font object when 'normal' face creation path is used:
...
...
dlls/dwrite/opentype.c
View file @
f8e3cba7
...
...
@@ -6342,6 +6342,9 @@ BOOL opentype_has_vertical_variants(struct dwrite_fontface *fontface)
struct
lookups
lookups
=
{
0
};
UINT16
format
;
if
(
fontface
->
flags
&
(
FONTFACE_VERTICAL_VARIANTS
|
FONTFACE_NO_VERTICAL_VARIANTS
))
return
!!
(
fontface
->
flags
&
FONTFACE_VERTICAL_VARIANTS
);
context
.
cache
=
fontface_get_shaping_cache
(
fontface
);
context
.
table
=
&
context
.
cache
->
gsub
;
...
...
@@ -6384,7 +6387,12 @@ BOOL opentype_has_vertical_variants(struct dwrite_fontface *fontface)
heap_free
(
lookups
.
lookups
);
return
!!
count
;
if
(
count
)
fontface
->
flags
|=
FONTFACE_VERTICAL_VARIANTS
;
else
fontface
->
flags
|=
FONTFACE_NO_VERTICAL_VARIANTS
;
return
!!
(
fontface
->
flags
&
FONTFACE_VERTICAL_VARIANTS
);
}
HRESULT
opentype_get_vertical_glyph_variants
(
struct
dwrite_fontface
*
fontface
,
unsigned
int
glyph_count
,
...
...
@@ -6398,7 +6406,7 @@ HRESULT opentype_get_vertical_glyph_variants(struct dwrite_fontface *fontface, u
memcpy
(
glyphs
,
nominal_glyphs
,
glyph_count
*
sizeof
(
*
glyphs
));
if
(
!
(
fontface
->
flags
&
FONTFACE_HAS_VERTICAL_VARIANTS
))
if
(
!
opentype_has_vertical_variants
(
fontface
))
return
S_OK
;
context
.
cache
=
fontface_get_shaping_cache
(
fontface
);
...
...
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