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
ba2ce9db
Commit
ba2ce9db
authored
Jan 17, 2014
by
Erich E. Hoover
Committed by
Alexandre Julliard
Feb 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Handle OLEFontImpl_SetRatio case where cyLogical and cyHimetric are both 1.
parent
1ffeb422
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
olefont.c
dlls/oleaut32/olefont.c
+5
-0
olefont.c
dlls/oleaut32/tests/olefont.c
+35
-0
No files found.
dlls/oleaut32/olefont.c
View file @
ba2ce9db
...
...
@@ -1085,6 +1085,11 @@ static HRESULT WINAPI OLEFontImpl_SetRatio(
if
(
cyLogical
==
0
||
cyHimetric
==
0
)
return
E_INVALIDARG
;
/* cyLogical and cyHimetric both set to 1 is a special case that
does not change the scaling but also does not fail */
if
(
cyLogical
==
1
&&
cyHimetric
==
1
)
return
S_OK
;
this
->
cyLogical
=
cyLogical
;
this
->
cyHimetric
=
cyHimetric
;
this
->
dirty
=
TRUE
;
...
...
dlls/oleaut32/tests/olefont.c
View file @
ba2ce9db
...
...
@@ -151,6 +151,41 @@ static void test_ifont_sizes(void)
test_ifont_size
(
180000
,
0
,
144
,
2540
,
-
36
,
"ratio2"
);
/* another ratio */
test_ifont_size
(
180000
,
0
,
72
,
1270
,
-
36
,
"ratio3"
);
/* yet another ratio */
test_ifont_size
(
186000
,
0
,
72
,
2540
,
-
19
,
"rounding+ratio"
);
/* test rounding with ratio */
/* test various combinations of logical == himetric */
test_ifont_size
(
180000
,
0
,
10
,
10
,
-
635
,
"identical ratio 1"
);
test_ifont_size
(
240000
,
0
,
10
,
10
,
-
848
,
"identical ratio 2"
);
test_ifont_size
(
300000
,
0
,
10
,
10
,
-
1058
,
"identical ratio 3"
);
/* test various combinations of logical and himetric both set to 1 */
test_ifont_size
(
180000
,
0
,
1
,
1
,
-
24
,
"1:1 ratio 1"
);
test_ifont_size
(
240000
,
0
,
1
,
1
,
-
32
,
"1:1 ratio 2"
);
test_ifont_size
(
300000
,
0
,
1
,
1
,
-
40
,
"1:1 ratio 3"
);
/* test various combinations of logical set to 1 */
test_ifont_size
(
180000
,
0
,
1
,
0
,
-
24
,
"1:0 ratio 1"
);
test_ifont_size
(
240000
,
0
,
1
,
0
,
-
32
,
"1:0 ratio 2"
);
test_ifont_size
(
300000
,
0
,
1
,
0
,
-
40
,
"1:0 ratio 3"
);
/* test various combinations of himetric set to 1 */
test_ifont_size
(
180000
,
0
,
0
,
1
,
-
24
,
"0:1 ratio 1"
);
test_ifont_size
(
240000
,
0
,
0
,
1
,
-
32
,
"0:1 ratio 2"
);
test_ifont_size
(
300000
,
0
,
0
,
1
,
-
40
,
"0:1 ratio 3"
);
/* test various combinations of 2:1 logical:himetric */
test_ifont_size
(
180000
,
0
,
2
,
1
,
-
1270
,
"2:1 ratio 1"
);
test_ifont_size
(
240000
,
0
,
2
,
1
,
-
1694
,
"2:1 ratio 2"
);
test_ifont_size
(
300000
,
0
,
2
,
1
,
-
2117
,
"2:1 ratio 3"
);
/* test various combinations of 1:2 logical:himetric */
test_ifont_size
(
180000
,
0
,
1
,
2
,
-
318
,
"1:2 ratio 1"
);
test_ifont_size
(
240000
,
0
,
1
,
2
,
-
424
,
"1:2 ratio 2"
);
test_ifont_size
(
300000
,
0
,
1
,
2
,
-
529
,
"1:2 ratio 3"
);
/* test various combinations of logical and himetric both set to 2 */
test_ifont_size
(
180000
,
0
,
2
,
2
,
-
635
,
"2:2 ratio 1"
);
test_ifont_size
(
240000
,
0
,
2
,
2
,
-
848
,
"2:2 ratio 2"
);
test_ifont_size
(
300000
,
0
,
2
,
2
,
-
1058
,
"2:2 ratio 3"
);
}
static
void
test_QueryInterface
(
void
)
...
...
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