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
f6bc3568
Commit
f6bc3568
authored
Jan 10, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jan 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix ABC metrics for rotated font.
parent
b8f22f47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
freetype.c
dlls/gdi32/freetype.c
+16
-2
font.c
dlls/gdi32/tests/font.c
+0
-2
No files found.
dlls/gdi32/freetype.c
View file @
f6bc3568
...
...
@@ -6438,6 +6438,8 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
gm
.
gmCellIncY
=
0
;
origin_x
=
left
;
origin_y
=
top
;
abc
->
abcA
=
origin_x
>>
6
;
abc
->
abcB
=
metrics
.
width
>>
6
;
}
else
{
INT
xc
,
yc
;
FT_Vector
vec
;
...
...
@@ -6534,6 +6536,19 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
pFT_Vector_Transform
(
&
vec
,
&
transMatUnrotated
);
adv
=
pFT_MulFix
(
vec
.
x
,
em_scale
)
*
2
;
}
vec
.
x
=
metrics
.
horiBearingX
;
vec
.
y
=
0
;
pFT_Vector_Transform
(
&
vec
,
&
transMatUnrotated
);
abc
->
abcA
=
vec
.
x
>>
6
;
vec
.
x
=
metrics
.
width
;
vec
.
y
=
0
;
pFT_Vector_Transform
(
&
vec
,
&
transMatUnrotated
);
if
(
vec
.
x
>=
0
)
abc
->
abcB
=
vec
.
x
>>
6
;
else
abc
->
abcB
=
-
vec
.
x
>>
6
;
}
width
=
(
right
-
left
)
>>
6
;
...
...
@@ -6542,8 +6557,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
gm
.
gmBlackBoxY
=
height
?
height
:
1
;
gm
.
gmptGlyphOrigin
.
x
=
origin_x
>>
6
;
gm
.
gmptGlyphOrigin
.
y
=
origin_y
>>
6
;
abc
->
abcA
=
left
>>
6
;
abc
->
abcB
=
gm
.
gmBlackBoxX
;
if
(
!
abc
->
abcB
)
abc
->
abcB
=
1
;
abc
->
abcC
=
adv
-
abc
->
abcA
-
abc
->
abcB
;
TRACE
(
"%u,%u,%s,%d,%d
\n
"
,
gm
.
gmBlackBoxX
,
gm
.
gmBlackBoxY
,
...
...
dlls/gdi32/tests/font.c
View file @
f6bc3568
...
...
@@ -1325,14 +1325,12 @@ static void test_GetCharABCWidths(void)
ok
(
ret
,
"GetCharABCWidthsW should have succeeded
\n
"
);
/* 3) compare ABC results */
todo_wine
{
ok
(
match_off_by_1
(
abcw
[
0
].
abcA
,
abc
[
0
].
abcA
,
FALSE
),
"got %d, expected %d (A)
\n
"
,
abc
[
0
].
abcA
,
abcw
[
0
].
abcA
);
ok
(
match_off_by_1
(
abcw
[
0
].
abcB
,
abc
[
0
].
abcB
,
FALSE
),
"got %d, expected %d (B)
\n
"
,
abc
[
0
].
abcB
,
abcw
[
0
].
abcB
);
ok
(
match_off_by_1
(
abcw
[
0
].
abcC
,
abc
[
0
].
abcC
,
FALSE
),
"got %d, expected %d (C)
\n
"
,
abc
[
0
].
abcC
,
abcw
[
0
].
abcC
);
}
DeleteObject
(
SelectObject
(
hdc
,
hfont
));
ReleaseDC
(
NULL
,
hdc
);
...
...
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