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
48b1e663
Commit
48b1e663
authored
Nov 16, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Nov 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use an array of masks to simplify the bitmap conversion.
parent
6c9c9107
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
freetype.c
dlls/gdi32/freetype.c
+4
-2
No files found.
dlls/gdi32/freetype.c
View file @
48b1e663
...
...
@@ -5049,6 +5049,8 @@ static inline BYTE get_max_level( UINT format )
return
255
;
}
static
const
BYTE
masks
[
8
]
=
{
0x80
,
0x40
,
0x20
,
0x10
,
0x08
,
0x04
,
0x02
,
0x01
};
static
DWORD
get_glyph_outline
(
GdiFont
*
incoming_font
,
UINT
glyph
,
UINT
format
,
LPGLYPHMETRICS
lpgm
,
DWORD
buflen
,
LPVOID
buf
,
const
MAT2
*
lpmat
)
...
...
@@ -5367,7 +5369,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
memset
(
buf
,
0
,
needed
);
while
(
h
--
)
{
for
(
x
=
0
;
x
<
pitch
&&
x
<
ft_face
->
glyph
->
bitmap
.
width
;
x
++
)
if
(
src
[
x
/
8
]
&
(
1
<<
(
(
7
-
(
x
%
8
))))
)
dst
[
x
]
=
max_level
;
if
(
src
[
x
/
8
]
&
masks
[
x
%
8
]
)
dst
[
x
]
=
max_level
;
src
+=
ft_face
->
glyph
->
bitmap
.
pitch
;
dst
+=
pitch
;
}
...
...
@@ -5439,7 +5441,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
{
for
(
x
=
0
;
x
<
width
&&
x
<
ft_face
->
glyph
->
bitmap
.
width
;
x
++
)
{
if
(
src
[
x
/
8
]
&
(
1
<<
(
(
7
-
(
x
%
8
))))
)
if
(
src
[
x
/
8
]
&
masks
[
x
%
8
]
)
((
unsigned
int
*
)
dst
)[
x
]
=
~
0u
;
}
src
+=
src_pitch
;
...
...
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