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
f2e1b254
Commit
f2e1b254
authored
Dec 27, 2008
by
Byeongsik Jeon
Committed by
Alexandre Julliard
Dec 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Restore the trimmed bitmap image by FT_Render_Glyph().
parent
29b826b3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
freetype.c
dlls/gdi32/freetype.c
+20
-4
No files found.
dlls/gdi32/freetype.c
View file @
f2e1b254
...
...
@@ -4776,7 +4776,8 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
{
unsigned
int
*
dst
;
BYTE
*
src
;
INT
x
,
src_pitch
,
rgb_interval
,
hmul
,
vmul
;
INT
x
,
src_pitch
,
src_width
,
src_height
,
rgb_interval
,
hmul
,
vmul
;
INT
x_shift
,
y_shift
;
BOOL
rgb
;
FT_LcdFilter
lcdfilter
=
FT_LCD_FILTER_DEFAULT
;
FT_Render_Mode
render_mode
=
...
...
@@ -4810,13 +4811,16 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
if
(
needsTransform
)
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
);
pFT_Outline_Translate
(
&
ft_face
->
glyph
->
outline
,
-
left
,
-
bottom
);
if
(
pFT_Library_SetLcdFilter
)
pFT_Library_SetLcdFilter
(
library
,
lcdfilter
);
pFT_Render_Glyph
(
ft_face
->
glyph
,
render_mode
);
src
=
ft_face
->
glyph
->
bitmap
.
buffer
;
src_pitch
=
ft_face
->
glyph
->
bitmap
.
pitch
;
src_width
=
ft_face
->
glyph
->
bitmap
.
width
;
src_height
=
ft_face
->
glyph
->
bitmap
.
rows
;
if
(
render_mode
==
FT_RENDER_MODE_LCD
)
{
rgb_interval
=
1
;
...
...
@@ -4830,9 +4834,20 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
vmul
=
3
;
}
while
(
height
--
)
x_shift
=
ft_face
->
glyph
->
bitmap_left
-
lpgm
->
gmptGlyphOrigin
.
x
;
if
(
x_shift
<
0
)
x_shift
=
0
;
if
(
x_shift
+
(
src_width
/
hmul
)
>
width
)
x_shift
=
width
-
(
src_width
/
hmul
);
y_shift
=
lpgm
->
gmptGlyphOrigin
.
y
-
ft_face
->
glyph
->
bitmap_top
;
if
(
y_shift
<
0
)
y_shift
=
0
;
if
(
y_shift
+
(
src_height
/
vmul
)
>
height
)
y_shift
=
height
-
(
src_height
/
vmul
);
dst
+=
x_shift
+
y_shift
*
(
pitch
/
4
);
while
(
src_height
)
{
for
(
x
=
0
;
x
<
width
;
x
++
)
for
(
x
=
0
;
x
<
src_width
/
hmul
;
x
++
)
{
if
(
rgb
)
{
...
...
@@ -4851,6 +4866,7 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
}
src
+=
src_pitch
*
vmul
;
dst
+=
pitch
/
4
;
src_height
-=
vmul
;
}
break
;
...
...
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