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
0987e770
Commit
0987e770
authored
May 23, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Jun 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: tmLastChar is solely governed by the last entry before 0xffff in the cmap.
parent
62624922
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
48 deletions
+31
-48
font.c
dlls/gdi32/tests/font.c
+12
-28
wine_test.sfd
dlls/gdi32/tests/wine_test.sfd
+19
-20
wine_test.ttf
dlls/gdi32/tests/wine_test.ttf
+0
-0
No files found.
dlls/gdi32/tests/font.c
View file @
0987e770
...
@@ -3255,42 +3255,20 @@ static BOOL get_first_last_from_cmap4(void *ptr, DWORD *first, DWORD *last, DWOR
...
@@ -3255,42 +3255,20 @@ static BOOL get_first_last_from_cmap4(void *ptr, DWORD *first, DWORD *last, DWOR
int
i
;
int
i
;
cmap_format_4
*
cmap
=
(
cmap_format_4
*
)
ptr
;
cmap_format_4
*
cmap
=
(
cmap_format_4
*
)
ptr
;
USHORT
seg_count
=
GET_BE_WORD
(
cmap
->
seg_countx2
)
/
2
;
USHORT
seg_count
=
GET_BE_WORD
(
cmap
->
seg_countx2
)
/
2
;
USHORT
const
*
glyph_ids
=
cmap
->
end_count
+
4
*
seg_count
+
1
;
*
first
=
0x10000
;
*
first
=
0x10000
;
for
(
i
=
0
;
i
<
seg_count
;
i
++
)
for
(
i
=
0
;
i
<
seg_count
;
i
++
)
{
{
DWORD
code
,
index
;
cmap_format_4_seg
seg
;
cmap_format_4_seg
seg
;
get_seg4
(
cmap
,
i
,
&
seg
);
get_seg4
(
cmap
,
i
,
&
seg
);
for
(
code
=
seg
.
start_count
;
code
<=
seg
.
end_count
;
code
++
)
{
if
(
seg
.
id_range_offset
==
0
)
index
=
(
seg
.
id_delta
+
code
)
&
0xffff
;
else
{
index
=
seg
.
id_range_offset
/
2
+
code
-
seg
.
start_count
+
i
-
seg_count
;
/* some fonts have broken last segment */
if
(
seg
.
start_count
>
0xfffe
)
break
;
if
((
char
*
)(
glyph_ids
+
index
+
1
)
<
(
char
*
)
ptr
+
limit
)
index
=
GET_BE_WORD
(
glyph_ids
[
index
]);
if
(
*
first
==
0x10000
)
*
first
=
seg
.
start_count
;
else
{
*
last
=
min
(
seg
.
end_count
,
0xfffe
);
trace
(
"segment %04x/%04x index %04x points to nowhere
\n
"
,
seg
.
start_count
,
seg
.
end_count
,
index
);
index
=
0
;
}
if
(
index
)
index
+=
seg
.
id_delta
;
}
if
(
*
first
==
0x10000
)
*
last
=
*
first
=
code
;
else
if
(
index
)
*
last
=
code
;
}
}
}
if
(
*
first
==
0x10000
)
return
FALSE
;
if
(
*
first
==
0x10000
)
return
FALSE
;
...
@@ -3560,7 +3538,7 @@ static void test_text_metrics(const LOGFONTA *lf, const NEWTEXTMETRICA *ntm)
...
@@ -3560,7 +3538,7 @@ static void test_text_metrics(const LOGFONTA *lf, const NEWTEXTMETRICA *ntm)
else
else
{
{
expect_first_W
=
cmap_first
;
expect_first_W
=
cmap_first
;
expect_last_W
=
min
(
cmap_last
,
os2_last_char
)
;
expect_last_W
=
cmap_last
;
if
(
os2_first_char
<=
1
)
if
(
os2_first_char
<=
1
)
expect_break_W
=
os2_first_char
+
2
;
expect_break_W
=
os2_first_char
+
2
;
else
if
(
os2_first_char
>
0xff
)
else
if
(
os2_first_char
>
0xff
)
...
@@ -5064,6 +5042,7 @@ static void test_GetGlyphOutline_metric_clipping(void)
...
@@ -5064,6 +5042,7 @@ static void test_GetGlyphOutline_metric_clipping(void)
HFONT
hfont
,
hfont_prev
;
HFONT
hfont
,
hfont_prev
;
GLYPHMETRICS
gm
;
GLYPHMETRICS
gm
;
TEXTMETRICA
tm
;
TEXTMETRICA
tm
;
TEXTMETRICW
tmW
;
DWORD
ret
;
DWORD
ret
;
memset
(
&
lf
,
0
,
sizeof
(
lf
));
memset
(
&
lf
,
0
,
sizeof
(
lf
));
...
@@ -5092,6 +5071,11 @@ static void test_GetGlyphOutline_metric_clipping(void)
...
@@ -5092,6 +5071,11 @@ static void test_GetGlyphOutline_metric_clipping(void)
"Glyph bottom(%d) exceeds descent(%d)
\n
"
,
"Glyph bottom(%d) exceeds descent(%d)
\n
"
,
gm
.
gmptGlyphOrigin
.
y
-
gm
.
gmBlackBoxY
,
-
tm
.
tmDescent
);
gm
.
gmptGlyphOrigin
.
y
-
gm
.
gmBlackBoxY
,
-
tm
.
tmDescent
);
/* Test tmLastChar - wine_test has code points fffb-fffe mapped to glyph 0 */
GetTextMetricsW
(
hdc
,
&
tmW
);
todo_wine
ok
(
tmW
.
tmLastChar
==
0xfffe
,
"got %04x
\n
"
,
tmW
.
tmLastChar
);
SelectObject
(
hdc
,
hfont_prev
);
SelectObject
(
hdc
,
hfont_prev
);
DeleteObject
(
hfont
);
DeleteObject
(
hfont
);
ReleaseDC
(
NULL
,
hdc
);
ReleaseDC
(
NULL
,
hdc
);
...
...
dlls/gdi32/tests/wine_test.sfd
View file @
0987e770
...
@@ -12,15 +12,13 @@ Ascent: 1638
...
@@ -12,15 +12,13 @@ Ascent: 1638
Descent: 410
Descent: 410
sfntRevision: 0x00010000
sfntRevision: 0x00010000
LayerCount: 2
LayerCount: 2
Layer: 0 1 "Back"
1
Layer: 0 1 "Back" 1
Layer: 1 1 "Fore"
0
Layer: 1 1 "Fore" 0
XUID: [1021 905 592216984 1247726]
XUID: [1021 905 592216984 1247726]
FSType: 0
FSType: 0
OS2Version: 2
OS2Version: 2
OS2_WeightWidthSlopeOnly: 0
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
OS2_UseTypoMetrics: 1
CreationTime: 1288336343
ModificationTime: 1366465321
PfmFamily: 17
PfmFamily: 17
TTFWeight: 500
TTFWeight: 500
TTFWidth: 5
TTFWidth: 5
...
@@ -92,6 +90,7 @@ BeginChars: 65539 7
...
@@ -92,6 +90,7 @@ BeginChars: 65539 7
StartChar: .notdef
StartChar: .notdef
Encoding: 65536 -1 0
Encoding: 65536 -1 0
AltUni2: 00fffe.ffffffff.0 00fffd.ffffffff.0 00fffc.ffffffff.0 00fffb.ffffffff.0
Width: 748
Width: 748
Flags: W
Flags: W
TtInstrs:
TtInstrs:
...
@@ -212,14 +211,14 @@ Flags: WO
...
@@ -212,14 +211,14 @@ Flags: WO
LayerCount: 2
LayerCount: 2
Fore
Fore
SplineSet
SplineSet
459 1258 m 2
9
,0,-1
459 1258 m 2
5
,0,-1
462 1639 l
5
,1,-1
462 1639 l
1
,1,-1
389 1638 l
5
,2,-1
389 1638 l
1
,2,-1
492 1815 l
5
,3,-1
492 1815 l
1
,3,-1
609 1638.5 l
5
,4,-1
609 1638.5 l
1
,4,-1
531 1637.5 l
5
,5,-1
531 1637.5 l
1
,5,-1
523 1258 l
5
,6,-1
523 1258 l
1
,6,-1
459 1258 l 2
9
,0,-1
459 1258 l 2
5
,0,-1
EndSplineSet
EndSplineSet
EndChar
EndChar
...
@@ -231,14 +230,14 @@ Flags: WO
...
@@ -231,14 +230,14 @@ Flags: WO
LayerCount: 2
LayerCount: 2
Fore
Fore
SplineSet
SplineSet
461 -30.7998 m 2
9
,0,-1
461 -30.7998 m 2
5
,0,-1
464 -411.8 l
5
,1,-1
464 -411.8 l
1
,1,-1
391 -410.8 l
5
,2,-1
391 -410.8 l
1
,2,-1
494 -587.8 l
5
,3,-1
494 -587.8 l
1
,3,-1
611 -411.3 l
5
,4,-1
611 -411.3 l
1
,4,-1
533 -410.3 l
5
,5,-1
533 -410.3 l
1
,5,-1
525 -30.7998 l
5
,6,-1
525 -30.7998 l
1
,6,-1
461 -30.7998 l 2
9
,0,-1
461 -30.7998 l 2
5
,0,-1
EndSplineSet
EndSplineSet
EndChar
EndChar
EndChars
EndChars
...
...
dlls/gdi32/tests/wine_test.ttf
View file @
0987e770
No preview for this file type
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