Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3a968910
Commit
3a968910
authored
Mar 14, 2013
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Apr 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Improve outline text metrics calculation, especially if unitsPerEm is not power of 2.
parent
786b931e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
freetype.c
dlls/gdi32/freetype.c
+4
-5
No files found.
dlls/gdi32/freetype.c
View file @
3a968910
...
...
@@ -6775,7 +6775,7 @@ static BOOL get_outline_text_metrics(GdiFont *font)
TT_OS2
*
pOS2
;
TT_HoriHeader
*
pHori
;
TT_Postscript
*
pPost
;
FT_Fixed
x_scale
,
y
_scale
;
FT_Fixed
em
_scale
;
WCHAR
*
family_nameW
,
*
style_nameW
,
*
face_nameW
,
*
full_nameW
;
char
*
cp
;
INT
ascent
,
descent
;
...
...
@@ -6837,8 +6837,7 @@ static BOOL get_outline_text_metrics(GdiFont *font)
needed
+=
lenfull
;
x_scale
=
ft_face
->
size
->
metrics
.
x_scale
;
y_scale
=
ft_face
->
size
->
metrics
.
y_scale
;
em_scale
=
(
FT_Fixed
)
MulDiv
(
font
->
ppem
,
1
<<
16
,
ft_face
->
units_per_EM
);
pOS2
=
pFT_Get_Sfnt_Table
(
ft_face
,
ft_sfnt_os2
);
if
(
!
pOS2
)
{
...
...
@@ -6878,8 +6877,8 @@ static BOOL get_outline_text_metrics(GdiFont *font)
font
->
ntmCellHeight
=
ascent
+
descent
;
font
->
ntmAvgWidth
=
pOS2
->
xAvgCharWidth
;
#define SCALE_X(x) (
(pFT_MulFix(x, x_scale) + 32) >> 6
)
#define SCALE_Y(y) (
(pFT_MulFix(y, y_scale) + 32) >> 6
)
#define SCALE_X(x) (
pFT_MulFix(x, em_scale)
)
#define SCALE_Y(y) (
pFT_MulFix(y, em_scale)
)
if
(
font
->
yMax
)
{
TM
.
tmAscent
=
font
->
yMax
;
...
...
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