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
dc75b34d
Commit
dc75b34d
authored
Aug 02, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix outline translation before rendering.
parent
9da369b4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
freetype.c
dlls/dwrite/freetype.c
+14
-4
No files found.
dlls/dwrite/freetype.c
View file @
dc75b34d
...
...
@@ -70,7 +70,10 @@ MAKE_FUNCPTR(FT_Init_FreeType);
MAKE_FUNCPTR
(
FT_Library_Version
);
MAKE_FUNCPTR
(
FT_Load_Glyph
);
MAKE_FUNCPTR
(
FT_New_Memory_Face
);
MAKE_FUNCPTR
(
FT_Outline_Copy
);
MAKE_FUNCPTR
(
FT_Outline_Done
);
MAKE_FUNCPTR
(
FT_Outline_Get_Bitmap
);
MAKE_FUNCPTR
(
FT_Outline_New
);
MAKE_FUNCPTR
(
FT_Outline_Transform
);
MAKE_FUNCPTR
(
FT_Outline_Translate
);
MAKE_FUNCPTR
(
FTC_CMapCache_Lookup
);
...
...
@@ -148,7 +151,10 @@ BOOL init_freetype(void)
LOAD_FUNCPTR
(
FT_Library_Version
)
LOAD_FUNCPTR
(
FT_Load_Glyph
)
LOAD_FUNCPTR
(
FT_New_Memory_Face
)
LOAD_FUNCPTR
(
FT_Outline_Copy
)
LOAD_FUNCPTR
(
FT_Outline_Done
)
LOAD_FUNCPTR
(
FT_Outline_Get_Bitmap
)
LOAD_FUNCPTR
(
FT_Outline_New
)
LOAD_FUNCPTR
(
FT_Outline_Transform
)
LOAD_FUNCPTR
(
FT_Outline_Translate
)
LOAD_FUNCPTR
(
FTC_CMapCache_Lookup
)
...
...
@@ -509,8 +515,9 @@ void freetype_get_glyph_bitmap(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16
if
(
glyph
->
format
==
FT_GLYPH_FORMAT_OUTLINE
)
{
FT_OutlineGlyph
outline
=
(
FT_OutlineGlyph
)
glyph
;
const
FT_Outline
*
src
=
&
outline
->
outline
;
FT_Bitmap
ft_bitmap
;
FT_Outline
copy
;
ft_bitmap
.
width
=
width
;
ft_bitmap
.
rows
=
height
;
...
...
@@ -518,11 +525,14 @@ void freetype_get_glyph_bitmap(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16
ft_bitmap
.
pixel_mode
=
FT_PIXEL_MODE_MONO
;
ft_bitmap
.
buffer
=
buf
;
pFT_Outline_Translate
(
&
outline
->
outline
,
-
bbox
->
left
,
-
bbox
->
bottom
);
/* Note: FreeType will only set 'black' bits for us. */
memset
(
buf
,
0
,
height
*
pitch
);
pFT_Outline_Get_Bitmap
(
library
,
&
outline
->
outline
,
&
ft_bitmap
);
if
(
pFT_Outline_New
(
library
,
src
->
n_points
,
src
->
n_contours
,
&
copy
)
==
0
)
{
pFT_Outline_Copy
(
src
,
&
copy
);
pFT_Outline_Translate
(
&
copy
,
-
bbox
->
left
<<
6
,
bbox
->
bottom
<<
6
);
pFT_Outline_Get_Bitmap
(
library
,
&
copy
,
&
ft_bitmap
);
pFT_Outline_Done
(
library
,
&
copy
);
}
}
else
if
(
glyph
->
format
==
FT_GLYPH_FORMAT_BITMAP
)
{
FT_Bitmap
*
bitmap
=
&
((
FT_BitmapGlyph
)
glyph
)
->
bitmap
;
...
...
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