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
733aca30
Commit
733aca30
authored
Sep 07, 2012
by
Qian Hong
Committed by
Alexandre Julliard
Sep 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Read otmpFullName from TT_NAME_ID_UNIQUE_ID.
parent
abc8f2c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
10 deletions
+20
-10
freetype.c
dlls/gdi32/freetype.c
+17
-7
font.c
dlls/gdi32/tests/font.c
+1
-1
download.c
dlls/wineps.drv/download.c
+2
-2
No files found.
dlls/gdi32/freetype.c
View file @
733aca30
...
...
@@ -6528,13 +6528,12 @@ static BOOL get_outline_text_metrics(GdiFont *font)
{
BOOL
ret
=
FALSE
;
FT_Face
ft_face
=
font
->
ft_face
;
UINT
needed
,
lenfam
,
lensty
,
lenface
;
UINT
needed
,
lenfam
,
lensty
,
lenface
,
lenfull
;
TT_OS2
*
pOS2
;
TT_HoriHeader
*
pHori
;
TT_Postscript
*
pPost
;
FT_Fixed
x_scale
,
y_scale
;
WCHAR
*
family_nameW
,
*
style_nameW
,
*
face_nameW
;
static
const
WCHAR
spaceW
[]
=
{
' '
,
'\0'
};
WCHAR
*
family_nameW
,
*
style_nameW
,
*
face_nameW
,
*
full_nameW
;
char
*
cp
;
INT
ascent
,
descent
;
...
...
@@ -6556,9 +6555,21 @@ static BOOL get_outline_text_metrics(GdiFont *font)
face_nameW
=
get_face_name
(
ft_face
,
TT_NAME_ID_FULL_NAME
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
if
(
!
face_nameW
)
{
FIXME
(
"failed to read face_nameW for font %s!
\n
"
,
wine_dbgstr_w
(
font
->
name
));
face_nameW
=
strdupW
(
font
->
name
);
}
lenface
=
(
strlenW
(
face_nameW
)
+
1
)
*
sizeof
(
WCHAR
);
full_nameW
=
get_face_name
(
ft_face
,
TT_NAME_ID_UNIQUE_ID
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
if
(
!
full_nameW
)
{
WCHAR
fake_nameW
[]
=
{
'f'
,
'a'
,
'k'
,
'e'
,
' '
,
'n'
,
'a'
,
'm'
,
'e'
,
0
};
FIXME
(
"failed to read full_nameW for font %s!
\n
"
,
wine_dbgstr_w
(
font
->
name
));
full_nameW
=
strdupW
(
fake_nameW
);
}
lenfull
=
(
strlenW
(
full_nameW
)
+
1
)
*
sizeof
(
WCHAR
);
/* These names should be read from the TT name table */
/* length of otmpFamilyName */
...
...
@@ -6571,7 +6582,7 @@ static BOOL get_outline_text_metrics(GdiFont *font)
needed
+=
lensty
;
/* length of otmpFullName */
needed
+=
lenf
am
+
lensty
;
needed
+=
lenf
ull
;
x_scale
=
ft_face
->
size
->
metrics
.
x_scale
;
...
...
@@ -6817,15 +6828,14 @@ static BOOL get_outline_text_metrics(GdiFont *font)
strcpyW
((
WCHAR
*
)
cp
,
face_nameW
);
cp
+=
lenface
;
font
->
potm
->
otmpFullName
=
(
LPSTR
)(
cp
-
(
char
*
)
font
->
potm
);
strcpyW
((
WCHAR
*
)
cp
,
family_nameW
);
strcatW
((
WCHAR
*
)
cp
,
spaceW
);
strcatW
((
WCHAR
*
)
cp
,
style_nameW
);
strcpyW
((
WCHAR
*
)
cp
,
full_nameW
);
ret
=
TRUE
;
end:
HeapFree
(
GetProcessHeap
(),
0
,
style_nameW
);
HeapFree
(
GetProcessHeap
(),
0
,
family_nameW
);
HeapFree
(
GetProcessHeap
(),
0
,
face_nameW
);
HeapFree
(
GetProcessHeap
(),
0
,
full_nameW
);
return
ret
;
}
...
...
dlls/gdi32/tests/font.c
View file @
733aca30
...
...
@@ -4142,7 +4142,7 @@ static void test_fullname2_helper(const char *Family)
ok
(
ret
,
"UNIQUE_ID (full name) could not be read
\n
"
);
WideCharToMultiByte
(
CP_ACP
,
0
,
bufW
,
-
1
,
bufA
,
buf_size
,
NULL
,
FALSE
);
otmStr
=
(
LPSTR
)
otm
+
(
UINT_PTR
)
otm
->
otmpFullName
;
todo_wine
ok
(
!
lstrcmpA
(
otmStr
,
bufA
),
"UNIQUE ID (full name) doesn't match: returned %s, expect %s
\n
"
,
otmStr
,
bufA
);
ok
(
!
lstrcmpA
(
otmStr
,
bufA
),
"UNIQUE ID (full name) doesn't match: returned %s, expect %s
\n
"
,
otmStr
,
bufA
);
SelectObject
(
hdc
,
of
);
DeleteObject
(
hfont
);
...
...
dlls/wineps.drv/download.c
View file @
733aca30
...
...
@@ -118,9 +118,9 @@ static void get_download_name(PHYSDEV dev, LPOUTLINETEXTMETRICA potm, char **str
}
}
len
=
strlen
((
char
*
)
potm
+
(
ptrdiff_t
)
potm
->
otmpF
ull
Name
)
+
1
;
len
=
strlen
((
char
*
)
potm
+
(
ptrdiff_t
)
potm
->
otmpF
ace
Name
)
+
1
;
*
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
strcpy
(
*
str
,
(
char
*
)
potm
+
(
ptrdiff_t
)
potm
->
otmpF
ull
Name
);
strcpy
(
*
str
,
(
char
*
)
potm
+
(
ptrdiff_t
)
potm
->
otmpF
ace
Name
);
p
=
*
str
;
while
((
p
=
strchr
(
p
,
' '
)))
...
...
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