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
cf891b04
Commit
cf891b04
authored
May 24, 2013
by
Aric Stewart
Committed by
Alexandre Julliard
May 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix Tategaki rotation.
Tategaki does not ignore orientation rotation, instead it always rotates affect glyphs by 90 degrees inside their cell.
parent
6bab3afc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
7 deletions
+36
-7
freetype.c
dlls/gdi32/freetype.c
+36
-7
No files found.
dlls/gdi32/freetype.c
View file @
cf891b04
...
...
@@ -5923,6 +5923,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
double
widthRatio
=
1
.
0
;
FT_Matrix
transMat
=
identityMat
;
FT_Matrix
transMatUnrotated
;
FT_Matrix
transMatTategaki
;
BOOL
needsTransform
=
FALSE
;
BOOL
tategaki
=
(
font
->
name
[
0
]
==
'@'
);
UINT
original_index
;
...
...
@@ -6015,10 +6016,23 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
/* Rotation transform */
transMatUnrotated
=
transMat
;
if
(
font
->
orientation
&&
!
tategaki
)
{
transMatTategaki
=
transMat
;
if
(
font
->
orientation
||
tategaki
)
{
FT_Matrix
rotationMat
;
FT_Matrix
taterotationMat
;
FT_Vector
vecAngle
;
angle
=
FT_FixedFromFloat
((
double
)
font
->
orientation
/
10
.
0
);
double
orient
=
font
->
orientation
/
10
.
0
;
double
tate_orient
=
0
.
f
;
if
(
tategaki
)
tate_orient
=
((
font
->
orientation
+
900
)
%
3600
)
/
10
.
0
;
else
tate_orient
=
font
->
orientation
/
10
.
0
;
if
(
orient
)
{
angle
=
FT_FixedFromFloat
(
orient
);
pFT_Vector_Unit
(
&
vecAngle
,
angle
);
rotationMat
.
xx
=
vecAngle
.
x
;
rotationMat
.
xy
=
-
vecAngle
.
y
;
...
...
@@ -6026,6 +6040,19 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
rotationMat
.
yy
=
rotationMat
.
xx
;
pFT_Matrix_Multiply
(
&
rotationMat
,
&
transMat
);
}
if
(
tate_orient
)
{
angle
=
FT_FixedFromFloat
(
tate_orient
);
pFT_Vector_Unit
(
&
vecAngle
,
angle
);
taterotationMat
.
xx
=
vecAngle
.
x
;
taterotationMat
.
xy
=
-
vecAngle
.
y
;
taterotationMat
.
yx
=
-
taterotationMat
.
xy
;
taterotationMat
.
yy
=
taterotationMat
.
xx
;
pFT_Matrix_Multiply
(
&
taterotationMat
,
&
transMatTategaki
);
}
needsTransform
=
TRUE
;
}
...
...
@@ -6039,6 +6066,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
worldMat
.
yy
=
FT_FixedFromFloat
(
font
->
font_desc
.
matrix
.
eM22
);
pFT_Matrix_Multiply
(
&
worldMat
,
&
transMat
);
pFT_Matrix_Multiply
(
&
worldMat
,
&
transMatUnrotated
);
pFT_Matrix_Multiply
(
&
worldMat
,
&
transMatTategaki
);
needsTransform
=
TRUE
;
}
...
...
@@ -6052,6 +6080,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
extraMat
.
yy
=
FT_FixedFromFIXED
(
lpmat
->
eM22
);
pFT_Matrix_Multiply
(
&
extraMat
,
&
transMat
);
pFT_Matrix_Multiply
(
&
extraMat
,
&
transMatUnrotated
);
pFT_Matrix_Multiply
(
&
extraMat
,
&
transMatTategaki
);
needsTransform
=
TRUE
;
}
...
...
@@ -6117,7 +6146,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
vec
.
x
=
metrics
.
horiBearingX
+
xc
*
metrics
.
width
;
vec
.
y
=
metrics
.
horiBearingY
-
yc
*
metrics
.
height
;
TRACE
(
"Vec %ld,%ld
\n
"
,
vec
.
x
,
vec
.
y
);
pFT_Vector_Transform
(
&
vec
,
&
transMat
);
pFT_Vector_Transform
(
&
vec
,
&
transMat
Tategaki
);
if
(
xc
==
0
&&
yc
==
0
)
{
left
=
right
=
vec
.
x
;
top
=
bottom
=
vec
.
y
;
...
...
@@ -6224,7 +6253,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
ft_bitmap
.
buffer
=
buf
;
if
(
needsTransform
)
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
);
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
Tategaki
);
pFT_Outline_Translate
(
&
ft_face
->
glyph
->
outline
,
-
left
,
-
bottom
);
...
...
@@ -6280,7 +6309,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
ft_bitmap
.
buffer
=
buf
;
if
(
needsTransform
)
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
);
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
Tategaki
);
pFT_Outline_Translate
(
&
ft_face
->
glyph
->
outline
,
-
left
,
-
bottom
);
...
...
@@ -6385,7 +6414,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
rgb
=
(
format
==
WINE_GGO_HRGB_BITMAP
||
format
==
WINE_GGO_VRGB_BITMAP
);
if
(
needsTransform
)
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
);
pFT_Outline_Transform
(
&
ft_face
->
glyph
->
outline
,
&
transMat
Tategaki
);
if
(
pFT_Library_SetLcdFilter
)
pFT_Library_SetLcdFilter
(
library
,
lcdfilter
);
...
...
@@ -6484,7 +6513,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
if
(
buflen
==
0
)
buf
=
NULL
;
if
(
needsTransform
&&
buf
)
{
pFT_Outline_Transform
(
outline
,
&
transMat
);
pFT_Outline_Transform
(
outline
,
&
transMat
Tategaki
);
}
for
(
contour
=
0
;
contour
<
outline
->
n_contours
;
contour
++
)
{
...
...
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