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
8bcdac04
Commit
8bcdac04
authored
Mar 30, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Move outline dumping helpers.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
afaf35b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
dwrite_private.h
dlls/dwrite/dwrite_private.h
+5
-5
font.c
dlls/dwrite/font.c
+0
-27
freetype.c
dlls/dwrite/freetype.c
+27
-0
No files found.
dlls/dwrite/dwrite_private.h
View file @
8bcdac04
...
...
@@ -97,7 +97,11 @@ static inline BOOL dwrite_array_reserve(void **elements, size_t *capacity, size_
if
(
new_capacity
<
count
)
new_capacity
=
max_capacity
;
if
(
!
(
new_elements
=
heap_realloc
(
*
elements
,
new_capacity
*
size
)))
if
(
!*
elements
)
new_elements
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
new_capacity
*
size
);
else
new_elements
=
RtlReAllocateHeap
(
GetProcessHeap
(),
0
,
*
elements
,
new_capacity
*
size
);
if
(
!
new_elements
)
return
FALSE
;
*
elements
=
new_elements
;
...
...
@@ -481,10 +485,6 @@ struct dwrite_outline
}
points
;
};
extern
int
dwrite_outline_push_tag
(
struct
dwrite_outline
*
outline
,
unsigned
char
tag
)
DECLSPEC_HIDDEN
;
extern
int
dwrite_outline_push_points
(
struct
dwrite_outline
*
outline
,
const
D2D1_POINT_2F
*
points
,
unsigned
int
count
)
DECLSPEC_HIDDEN
;
/* Glyph shaping */
enum
SCRIPT_JUSTIFY
{
...
...
dlls/dwrite/font.c
View file @
8bcdac04
...
...
@@ -832,33 +832,6 @@ static void WINAPI dwritefontface_ReleaseFontTable(IDWriteFontFace5 *iface, void
IDWriteFontFileStream_ReleaseFileFragment
(
fontface
->
stream
,
table_context
);
}
int
dwrite_outline_push_tag
(
struct
dwrite_outline
*
outline
,
unsigned
char
tag
)
{
if
(
!
dwrite_array_reserve
((
void
**
)
&
outline
->
tags
.
values
,
&
outline
->
tags
.
size
,
outline
->
tags
.
count
+
1
,
sizeof
(
*
outline
->
tags
.
values
)))
{
return
1
;
}
outline
->
tags
.
values
[
outline
->
tags
.
count
++
]
=
tag
;
return
0
;
}
int
dwrite_outline_push_points
(
struct
dwrite_outline
*
outline
,
const
D2D1_POINT_2F
*
points
,
unsigned
int
count
)
{
if
(
!
dwrite_array_reserve
((
void
**
)
&
outline
->
points
.
values
,
&
outline
->
points
.
size
,
outline
->
points
.
count
+
count
,
sizeof
(
*
outline
->
points
.
values
)))
{
return
1
;
}
memcpy
(
&
outline
->
points
.
values
[
outline
->
points
.
count
],
points
,
sizeof
(
*
points
)
*
count
);
outline
->
points
.
count
+=
count
;
return
0
;
}
static
void
apply_outline_point_offset
(
const
D2D1_POINT_2F
*
src
,
const
D2D1_POINT_2F
*
offset
,
D2D1_POINT_2F
*
dst
)
{
...
...
dlls/dwrite/freetype.c
View file @
8bcdac04
...
...
@@ -267,6 +267,33 @@ static inline void ft_vector_to_d2d_point(const FT_Vector *v, D2D1_POINT_2F *p)
p
->
y
=
v
->
y
/
64
.
0
f
;
}
static
int
dwrite_outline_push_tag
(
struct
dwrite_outline
*
outline
,
unsigned
char
tag
)
{
if
(
!
dwrite_array_reserve
((
void
**
)
&
outline
->
tags
.
values
,
&
outline
->
tags
.
size
,
outline
->
tags
.
count
+
1
,
sizeof
(
*
outline
->
tags
.
values
)))
{
return
1
;
}
outline
->
tags
.
values
[
outline
->
tags
.
count
++
]
=
tag
;
return
0
;
}
static
int
dwrite_outline_push_points
(
struct
dwrite_outline
*
outline
,
const
D2D1_POINT_2F
*
points
,
unsigned
int
count
)
{
if
(
!
dwrite_array_reserve
((
void
**
)
&
outline
->
points
.
values
,
&
outline
->
points
.
size
,
outline
->
points
.
count
+
count
,
sizeof
(
*
outline
->
points
.
values
)))
{
return
1
;
}
memcpy
(
&
outline
->
points
.
values
[
outline
->
points
.
count
],
points
,
sizeof
(
*
points
)
*
count
);
outline
->
points
.
count
+=
count
;
return
0
;
}
static
int
decompose_beginfigure
(
struct
decompose_context
*
ctxt
)
{
D2D1_POINT_2F
point
;
...
...
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