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
20aee067
Commit
20aee067
authored
Apr 10, 2015
by
Julius Schwartzenberg
Committed by
Alexandre Julliard
Apr 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Font search is case insensitive.
parent
27ae589d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
font.c
dlls/dwrite/font.c
+1
-1
font.c
dlls/dwrite/tests/font.c
+16
-0
No files found.
dlls/dwrite/font.c
View file @
20aee067
...
@@ -1431,7 +1431,7 @@ static UINT32 collection_find_family(struct dwrite_fontcollection *collection, c
...
@@ -1431,7 +1431,7 @@ static UINT32 collection_find_family(struct dwrite_fontcollection *collection, c
for
(
j
=
0
;
j
<
IDWriteLocalizedStrings_GetCount
(
family_name
);
j
++
)
{
for
(
j
=
0
;
j
<
IDWriteLocalizedStrings_GetCount
(
family_name
);
j
++
)
{
WCHAR
buffer
[
255
];
WCHAR
buffer
[
255
];
hr
=
IDWriteLocalizedStrings_GetString
(
family_name
,
j
,
buffer
,
255
);
hr
=
IDWriteLocalizedStrings_GetString
(
family_name
,
j
,
buffer
,
255
);
if
(
SUCCEEDED
(
hr
)
&&
!
strcmpW
(
buffer
,
name
))
if
(
SUCCEEDED
(
hr
)
&&
!
strcmp
i
W
(
buffer
,
name
))
return
i
;
return
i
;
}
}
}
}
...
...
dlls/dwrite/tests/font.c
View file @
20aee067
...
@@ -58,6 +58,8 @@ static inline BOOL heap_free(void *mem)
...
@@ -58,6 +58,8 @@ static inline BOOL heap_free(void *mem)
static
const
WCHAR
test_fontfile
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
't'
,
'e'
,
's'
,
't'
,
'_'
,
'f'
,
'o'
,
'n'
,
't'
,
'.'
,
't'
,
't'
,
'f'
,
0
};
static
const
WCHAR
test_fontfile
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
't'
,
'e'
,
's'
,
't'
,
'_'
,
'f'
,
'o'
,
'n'
,
't'
,
'.'
,
't'
,
't'
,
'f'
,
0
};
static
const
WCHAR
tahomaW
[]
=
{
'T'
,
'a'
,
'h'
,
'o'
,
'm'
,
'a'
,
0
};
static
const
WCHAR
tahomaW
[]
=
{
'T'
,
'a'
,
'h'
,
'o'
,
'm'
,
'a'
,
0
};
static
const
WCHAR
tahomaUppercaseW
[]
=
{
'T'
,
'A'
,
'H'
,
'O'
,
'M'
,
'A'
,
0
};
static
const
WCHAR
tahomaStrangecaseW
[]
=
{
't'
,
'A'
,
'h'
,
'O'
,
'm'
,
'A'
,
0
};
static
const
WCHAR
blahW
[]
=
{
'B'
,
'l'
,
'a'
,
'h'
,
'!'
,
0
};
static
const
WCHAR
blahW
[]
=
{
'B'
,
'l'
,
'a'
,
'h'
,
'!'
,
0
};
static
IDWriteFactory
*
create_factory
(
void
)
static
IDWriteFactory
*
create_factory
(
void
)
...
@@ -1376,6 +1378,20 @@ static void test_system_fontcollection(void)
...
@@ -1376,6 +1378,20 @@ static void test_system_fontcollection(void)
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
i
!=
(
UINT32
)
-
1
,
"got %u
\n
"
,
i
);
ok
(
i
!=
(
UINT32
)
-
1
,
"got %u
\n
"
,
i
);
ret
=
FALSE
;
i
=
(
UINT32
)
-
1
;
hr
=
IDWriteFontCollection_FindFamilyName
(
collection
,
tahomaUppercaseW
,
&
i
,
&
ret
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
i
!=
(
UINT32
)
-
1
,
"got %u
\n
"
,
i
);
ret
=
FALSE
;
i
=
(
UINT32
)
-
1
;
hr
=
IDWriteFontCollection_FindFamilyName
(
collection
,
tahomaStrangecaseW
,
&
i
,
&
ret
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
i
!=
(
UINT32
)
-
1
,
"got %u
\n
"
,
i
);
/* get back local file loader */
/* get back local file loader */
hr
=
IDWriteFontCollection_GetFontFamily
(
collection
,
i
,
&
family
);
hr
=
IDWriteFontCollection_GetFontFamily
(
collection
,
i
,
&
family
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
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