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
80dbd4e9
Commit
80dbd4e9
authored
Sep 11, 2012
by
Qian Hong
Committed by
Alexandre Julliard
Sep 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fixed localized font style name.
parent
4461612e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
freetype.c
dlls/gdi32/freetype.c
+20
-6
font.c
dlls/gdi32/tests/font.c
+6
-1
No files found.
dlls/gdi32/freetype.c
View file @
80dbd4e9
...
...
@@ -1714,7 +1714,14 @@ static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file,
Face
*
face
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
face
)
);
My_FT_Bitmap_Size
*
size
=
(
My_FT_Bitmap_Size
*
)
ft_face
->
available_sizes
;
face
->
StyleName
=
towstr
(
CP_ACP
,
ft_face
->
style_name
);
face
->
StyleName
=
get_face_name
(
ft_face
,
TT_NAME_ID_FONT_SUBFAMILY
,
GetSystemDefaultLangID
()
);
if
(
!
face
->
StyleName
)
face
->
StyleName
=
get_face_name
(
ft_face
,
TT_NAME_ID_FONT_SUBFAMILY
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
if
(
!
face
->
StyleName
)
{
face
->
StyleName
=
towstr
(
CP_ACP
,
ft_face
->
style_name
);
}
face
->
FullName
=
get_face_name
(
ft_face
,
TT_NAME_ID_FULL_NAME
,
GetSystemDefaultLangID
()
);
if
(
!
face
->
FullName
)
face
->
FullName
=
get_face_name
(
ft_face
,
TT_NAME_ID_FULL_NAME
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
...
...
@@ -6549,11 +6556,18 @@ static BOOL get_outline_text_metrics(GdiFont *font)
lenfam
=
(
strlenW
(
font
->
name
)
+
1
)
*
sizeof
(
WCHAR
);
family_nameW
=
strdupW
(
font
->
name
);
lensty
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ft_face
->
style_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
style_nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lensty
);
MultiByteToWideChar
(
CP_ACP
,
0
,
ft_face
->
style_name
,
-
1
,
style_nameW
,
lensty
/
sizeof
(
WCHAR
));
style_nameW
=
get_face_name
(
ft_face
,
TT_NAME_ID_FONT_SUBFAMILY
,
GetSystemDefaultLangID
()
);
if
(
!
style_nameW
)
style_nameW
=
get_face_name
(
ft_face
,
TT_NAME_ID_FONT_SUBFAMILY
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
if
(
!
style_nameW
)
{
FIXME
(
"failed to read sytle_nameW for font %s!
\n
"
,
wine_dbgstr_w
(
font
->
name
));
lensty
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ft_face
->
style_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
style_nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lensty
);
MultiByteToWideChar
(
CP_ACP
,
0
,
ft_face
->
style_name
,
-
1
,
style_nameW
,
lensty
/
sizeof
(
WCHAR
));
}
else
lensty
=
(
strlenW
(
style_nameW
)
+
1
)
*
sizeof
(
WCHAR
);
face_nameW
=
get_face_name
(
ft_face
,
TT_NAME_ID_FULL_NAME
,
GetSystemDefaultLangID
()
);
if
(
!
face_nameW
)
...
...
dlls/gdi32/tests/font.c
View file @
80dbd4e9
...
...
@@ -4132,7 +4132,12 @@ static void test_fullname2_helper(const char *Family)
bufW
[
0
]
=
0
;
bufA
[
0
]
=
0
;
ret
=
get_ttf_nametable_entry
(
hdc
,
TT_NAME_ID_FONT_SUBFAMILY
,
bufW
,
buf_size
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
ret
=
get_ttf_nametable_entry
(
hdc
,
TT_NAME_ID_FONT_SUBFAMILY
,
bufW
,
buf_size
,
GetSystemDefaultLangID
());
if
(
!
ret
)
{
trace
(
"no localized FONT_SUBFAMILY font.
\n
"
);
ret
=
get_ttf_nametable_entry
(
hdc
,
TT_NAME_ID_FONT_SUBFAMILY
,
bufW
,
buf_size
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
}
ok
(
ret
,
"SUBFAMILY (style name) could not be read
\n
"
);
WideCharToMultiByte
(
CP_ACP
,
0
,
bufW
,
-
1
,
bufA
,
buf_size
,
NULL
,
FALSE
);
ok
(
!
lstrcmpA
(
StyleName
,
bufA
),
"style names don't match: returned %s, expect %s
\n
"
,
StyleName
,
bufA
);
...
...
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