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
f6475ace
Commit
f6475ace
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: Improve vertical writing metrics.
parent
a221654a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
32 deletions
+14
-32
freetype.c
dlls/gdi32/freetype.c
+14
-30
font.c
dlls/gdi32/tests/font.c
+0
-2
No files found.
dlls/gdi32/freetype.c
View file @
f6475ace
...
...
@@ -6443,6 +6443,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
}
else
{
INT
xc
,
yc
;
FT_Vector
vec
;
FT_Pos
lsb
;
left
=
right
=
0
;
...
...
@@ -6468,41 +6469,24 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
bottom
=
bottom
&
-
64
;
top
=
(
top
+
63
)
&
-
64
;
if
(
tategaki
)
if
(
tategaki
&&
(
font
->
potm
||
get_outline_text_metrics
(
font
))
)
{
for
(
xc
=
0
;
xc
<
2
;
xc
++
)
{
for
(
yc
=
0
;
yc
<
2
;
yc
++
)
{
if
(
vertical_metrics
)
{
vec
.
x
=
metrics
.
vertBearingY
+
xc
*
metrics
.
height
;
vec
.
y
=
metrics
.
horiBearingX
-
yc
*
(
metrics
.
vertBearingX
*
2
);
}
else
{
vec
.
x
=
metrics
.
horiBearingY
-
xc
*
metrics
.
height
;
vec
.
y
=
metrics
.
horiBearingX
+
yc
*
metrics
.
width
;
}
TRACE
(
"Vec %ld,%ld
\n
"
,
vec
.
x
>>
6
,
vec
.
y
>>
6
);
pFT_Vector_Transform
(
&
vec
,
&
transMat
);
if
(
xc
==
0
&&
yc
==
0
)
{
origin_x
=
vec
.
x
;
origin_y
=
vec
.
y
;
}
else
{
if
(
vec
.
x
<
origin_x
)
origin_x
=
vec
.
x
;
if
(
vec
.
y
>
origin_y
)
origin_y
=
vec
.
y
;
}
}
}
origin_x
=
origin_x
&
-
64
;
origin_y
=
(
origin_y
+
63
)
&
-
64
;
if
(
vertical_metrics
)
lsb
=
metrics
.
horiBearingY
+
metrics
.
vertBearingY
;
else
lsb
=
metrics
.
vertAdvance
+
(
font
->
potm
->
otmDescent
<<
6
);
vec
.
x
=
lsb
;
vec
.
y
=
font
->
potm
->
otmDescent
<<
6
;
TRACE
(
"Vec %ld,%ld
\n
"
,
vec
.
x
>>
6
,
vec
.
y
>>
6
);
pFT_Vector_Transform
(
&
vec
,
&
transMat
);
origin_x
=
(
vec
.
x
+
left
)
&
-
64
;
origin_y
=
(
vec
.
y
+
top
+
63
)
&
-
64
;
}
else
{
origin_x
=
left
;
origin_y
=
top
;
lsb
=
metrics
.
horiBearingX
;
}
TRACE
(
"transformed box: (%d,%d - %d,%d)
\n
"
,
left
,
top
,
right
,
bottom
);
...
...
@@ -6537,7 +6521,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
adv
=
pFT_MulFix
(
vec
.
x
,
em_scale
)
*
2
;
}
vec
.
x
=
metrics
.
horiBearingX
;
vec
.
x
=
lsb
;
vec
.
y
=
0
;
pFT_Vector_Transform
(
&
vec
,
&
transMatUnrotated
);
abc
->
abcA
=
vec
.
x
>>
6
;
...
...
dlls/gdi32/tests/font.c
View file @
f6475ace
...
...
@@ -5294,13 +5294,11 @@ static void check_vertical_metrics(const char *face)
}
else
{
todo_wine
ok
(
vgm
.
gmptGlyphOrigin
.
x
==
rgm
.
gmptGlyphOrigin
.
x
+
vgm
.
gmCellIncX
+
otm
.
otmDescent
,
"got %d, expected rgm.origin.x(%d) + vgm.cellIncX(%d) + descent(%d)
\n
"
,
vgm
.
gmptGlyphOrigin
.
x
,
rgm
.
gmptGlyphOrigin
.
x
,
vgm
.
gmCellIncX
,
otm
.
otmDescent
);
}
todo_wine
ok
(
vgm
.
gmptGlyphOrigin
.
y
==
abc
.
abcA
+
abc
.
abcB
+
otm
.
otmDescent
,
"got %d, expected abcA(%d) + abcB(%u) + descent(%d)
\n
"
,
(
INT
)
vgm
.
gmptGlyphOrigin
.
y
,
abc
.
abcA
,
abc
.
abcB
,
otm
.
otmDescent
);
...
...
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