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
45a081f1
Commit
45a081f1
authored
Dec 24, 2008
by
Byeongsik Jeon
Committed by
Alexandre Julliard
Dec 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Don't truncate the added pixels with FT_LCD_FILTER_DEFAULT.
parent
1399d14e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
19 deletions
+42
-19
freetype.c
dlls/gdi32/freetype.c
+42
-19
No files found.
dlls/gdi32/freetype.c
View file @
45a081f1
...
...
@@ -4578,9 +4578,7 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
wine_dbgstr_point
(
&
lpgm
->
gmptGlyphOrigin
),
lpgm
->
gmCellIncX
,
lpgm
->
gmCellIncY
);
if
((
format
==
GGO_METRICS
||
format
==
GGO_BITMAP
||
format
==
WINE_GGO_GRAY16_BITMAP
||
format
==
WINE_GGO_HRGB_BITMAP
||
format
==
WINE_GGO_HBGR_BITMAP
||
format
==
WINE_GGO_VRGB_BITMAP
||
format
==
WINE_GGO_VBGR_BITMAP
)
&&
if
((
format
==
GGO_METRICS
||
format
==
GGO_BITMAP
||
format
==
WINE_GGO_GRAY16_BITMAP
)
&&
(
!
lpmat
||
is_identity_MAT2
(
lpmat
)))
/* don't cache custom transforms */
{
FONT_GM
(
font
,
original_index
)
->
gm
=
*
lpgm
;
...
...
@@ -4741,22 +4739,24 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
case
WINE_GGO_VBGR_BITMAP
:
#ifdef HAVE_FREETYPE_FTLCDFIL_H
{
width
=
lpgm
->
gmBlackBoxX
;
height
=
lpgm
->
gmBlackBoxY
;
pitch
=
width
*
4
;
needed
=
pitch
*
height
;
if
(
!
buf
||
!
buflen
)
break
;
memset
(
buf
,
0
,
buflen
);
switch
(
ft_face
->
glyph
->
format
)
{
case
FT_GLYPH_FORMAT_BITMAP
:
{
BYTE
*
src
=
ft_face
->
glyph
->
bitmap
.
buffer
,
*
dst
=
buf
;
INT
src_pitch
=
ft_face
->
glyph
->
bitmap
.
pitch
;
INT
x
;
BYTE
*
src
,
*
dst
;
INT
src_pitch
,
x
;
width
=
lpgm
->
gmBlackBoxX
;
height
=
lpgm
->
gmBlackBoxY
;
pitch
=
width
*
4
;
needed
=
pitch
*
height
;
if
(
!
buf
||
!
buflen
)
break
;
memset
(
buf
,
0
,
buflen
);
dst
=
buf
;
src
=
ft_face
->
glyph
->
bitmap
.
buffer
;
src_pitch
=
ft_face
->
glyph
->
bitmap
.
pitch
;
while
(
height
--
)
{
...
...
@@ -4774,15 +4774,40 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
case
FT_GLYPH_FORMAT_OUTLINE
:
{
unsigned
int
*
dst
=
(
unsigned
int
*
)
buf
;
unsigned
int
*
dst
;
BYTE
*
src
;
INT
x
,
src_pitch
,
rgb_interval
,
hmul
,
vmul
;
BOOL
rgb
=
(
format
==
WINE_GGO_HRGB_BITMAP
||
format
==
WINE_GGO_VRGB_BITMAP
)
;
BOOL
rgb
;
FT_LcdFilter
lcdfilter
=
FT_LCD_FILTER_DEFAULT
;
FT_Render_Mode
render_mode
=
(
format
==
WINE_GGO_HRGB_BITMAP
||
format
==
WINE_GGO_HBGR_BITMAP
)
?
FT_RENDER_MODE_LCD:
FT_RENDER_MODE_LCD_V
;
if
(
lcdfilter
==
FT_LCD_FILTER_DEFAULT
||
lcdfilter
==
FT_LCD_FILTER_LIGHT
)
{
if
(
render_mode
==
FT_RENDER_MODE_LCD
)
{
lpgm
->
gmBlackBoxX
+=
2
;
lpgm
->
gmptGlyphOrigin
.
x
-=
1
;
}
else
{
lpgm
->
gmBlackBoxY
+=
2
;
lpgm
->
gmptGlyphOrigin
.
y
+=
1
;
}
}
width
=
lpgm
->
gmBlackBoxX
;
height
=
lpgm
->
gmBlackBoxY
;
pitch
=
width
*
4
;
needed
=
pitch
*
height
;
if
(
!
buf
||
!
buflen
)
break
;
memset
(
buf
,
0
,
buflen
);
dst
=
(
unsigned
int
*
)
buf
;
rgb
=
(
format
==
WINE_GGO_HRGB_BITMAP
||
format
==
WINE_GGO_VRGB_BITMAP
);
if
(
needsTransform
)
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
);
pFT_Outline_Translate
(
&
ft_face
->
glyph
->
outline
,
-
left
,
-
bottom
);
...
...
@@ -4805,8 +4830,6 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
vmul
=
3
;
}
if
(
lcdfilter
==
FT_LCD_FILTER_DEFAULT
||
lcdfilter
==
FT_LCD_FILTER_LIGHT
)
src
+=
rgb_interval
*
3
;
while
(
height
--
)
{
for
(
x
=
0
;
x
<
width
;
x
++
)
...
...
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