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
da4663d6
Commit
da4663d6
authored
May 27, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Don't return full OUTLINETEXTMETRICW from __wine_get_file_outline_text_metric.
parent
3dbe180e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
31 deletions
+36
-31
text.c
dlls/gdi32/text.c
+23
-23
font.c
dlls/win32u/font.c
+5
-2
win32u.spec
dlls/win32u/win32u.spec
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+2
-1
wrappers.c
dlls/win32u/wrappers.c
+3
-2
ntgdi.h
include/ntgdi.h
+2
-2
No files found.
dlls/gdi32/text.c
View file @
da4663d6
...
@@ -2669,10 +2669,11 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
...
@@ -2669,10 +2669,11 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
BOOL
WINAPI
CreateScalableFontResourceW
(
DWORD
hidden
,
const
WCHAR
*
resource_file
,
BOOL
WINAPI
CreateScalableFontResourceW
(
DWORD
hidden
,
const
WCHAR
*
resource_file
,
const
WCHAR
*
font_file
,
const
WCHAR
*
font_path
)
const
WCHAR
*
font_file
,
const
WCHAR
*
font_path
)
{
{
WCHAR
path
[
MAX_PATH
],
face_name
[
128
];
struct
fontdir
fontdir
=
{
0
};
struct
fontdir
fontdir
=
{
0
};
UNICODE_STRING
nt_name
;
UNICODE_STRING
nt_name
;
OUTLINE
TEXTMETRICW
otm
;
TEXTMETRICW
otm
;
WCHAR
path
[
MAX_PATH
]
;
UINT
em_square
;
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%ld, %s, %s, %s)
\n
"
,
hidden
,
debugstr_w
(
resource_file
),
TRACE
(
"(%ld, %s, %s, %s)
\n
"
,
hidden
,
debugstr_w
(
resource_file
),
...
@@ -2689,10 +2690,10 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD hidden, const WCHAR *resource_fil
...
@@ -2689,10 +2690,10 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD hidden, const WCHAR *resource_fil
if
(
!
RtlDosPathNameToNtPathName_U
(
path
,
&
nt_name
,
NULL
,
NULL
))
goto
done
;
if
(
!
RtlDosPathNameToNtPathName_U
(
path
,
&
nt_name
,
NULL
,
NULL
))
goto
done
;
}
}
else
if
(
!
RtlDosPathNameToNtPathName_U
(
font_file
,
&
nt_name
,
NULL
,
NULL
))
goto
done
;
else
if
(
!
RtlDosPathNameToNtPathName_U
(
font_file
,
&
nt_name
,
NULL
,
NULL
))
goto
done
;
ret
=
__wine_get_file_outline_text_metric
(
nt_name
.
Buffer
,
&
otm
);
ret
=
__wine_get_file_outline_text_metric
(
nt_name
.
Buffer
,
&
otm
,
&
em_square
,
face_name
);
RtlFreeUnicodeString
(
&
nt_name
);
RtlFreeUnicodeString
(
&
nt_name
);
if
(
!
ret
)
goto
done
;
if
(
!
ret
)
goto
done
;
if
(
!
(
otm
.
otmTextMetrics
.
tmPitchAndFamily
&
TMPF_TRUETYPE
))
goto
done
;
if
(
!
(
otm
.
tmPitchAndFamily
&
TMPF_TRUETYPE
))
goto
done
;
fontdir
.
num_of_resources
=
1
;
fontdir
.
num_of_resources
=
1
;
fontdir
.
res_id
=
0
;
fontdir
.
res_id
=
0
;
...
@@ -2700,32 +2701,31 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD hidden, const WCHAR *resource_fil
...
@@ -2700,32 +2701,31 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD hidden, const WCHAR *resource_fil
fontdir
.
dfSize
=
sizeof
(
fontdir
);
fontdir
.
dfSize
=
sizeof
(
fontdir
);
strcpy
(
fontdir
.
dfCopyright
,
"Wine fontdir"
);
strcpy
(
fontdir
.
dfCopyright
,
"Wine fontdir"
);
fontdir
.
dfType
=
0x4003
;
/* 0x0080 set if private */
fontdir
.
dfType
=
0x4003
;
/* 0x0080 set if private */
fontdir
.
dfPoints
=
otm
.
otmEMS
quare
;
fontdir
.
dfPoints
=
em_s
quare
;
fontdir
.
dfVertRes
=
72
;
fontdir
.
dfVertRes
=
72
;
fontdir
.
dfHorizRes
=
72
;
fontdir
.
dfHorizRes
=
72
;
fontdir
.
dfAscent
=
otm
.
otmTextMetrics
.
tmAscent
;
fontdir
.
dfAscent
=
otm
.
tmAscent
;
fontdir
.
dfInternalLeading
=
otm
.
otmTextMetrics
.
tmInternalLeading
;
fontdir
.
dfInternalLeading
=
otm
.
tmInternalLeading
;
fontdir
.
dfExternalLeading
=
otm
.
otmTextMetrics
.
tmExternalLeading
;
fontdir
.
dfExternalLeading
=
otm
.
tmExternalLeading
;
fontdir
.
dfItalic
=
otm
.
otmTextMetrics
.
tmItalic
;
fontdir
.
dfItalic
=
otm
.
tmItalic
;
fontdir
.
dfUnderline
=
otm
.
otmTextMetrics
.
tmUnderlined
;
fontdir
.
dfUnderline
=
otm
.
tmUnderlined
;
fontdir
.
dfStrikeOut
=
otm
.
otmTextMetrics
.
tmStruckOut
;
fontdir
.
dfStrikeOut
=
otm
.
tmStruckOut
;
fontdir
.
dfWeight
=
otm
.
otmTextMetrics
.
tmWeight
;
fontdir
.
dfWeight
=
otm
.
tmWeight
;
fontdir
.
dfCharSet
=
otm
.
otmTextMetrics
.
tmCharSet
;
fontdir
.
dfCharSet
=
otm
.
tmCharSet
;
fontdir
.
dfPixWidth
=
0
;
fontdir
.
dfPixWidth
=
0
;
fontdir
.
dfPixHeight
=
otm
.
otmTextMetrics
.
tmHeight
;
fontdir
.
dfPixHeight
=
otm
.
tmHeight
;
fontdir
.
dfPitchAndFamily
=
otm
.
otmTextMetrics
.
tmPitchAndFamily
;
fontdir
.
dfPitchAndFamily
=
otm
.
tmPitchAndFamily
;
fontdir
.
dfAvgWidth
=
otm
.
otmTextMetrics
.
tmAveCharWidth
;
fontdir
.
dfAvgWidth
=
otm
.
tmAveCharWidth
;
fontdir
.
dfMaxWidth
=
otm
.
otmTextMetrics
.
tmMaxCharWidth
;
fontdir
.
dfMaxWidth
=
otm
.
tmMaxCharWidth
;
fontdir
.
dfFirstChar
=
otm
.
otmTextMetrics
.
tmFirstChar
;
fontdir
.
dfFirstChar
=
otm
.
tmFirstChar
;
fontdir
.
dfLastChar
=
otm
.
otmTextMetrics
.
tmLastChar
;
fontdir
.
dfLastChar
=
otm
.
tmLastChar
;
fontdir
.
dfDefaultChar
=
otm
.
otmTextMetrics
.
tmDefaultChar
;
fontdir
.
dfDefaultChar
=
otm
.
tmDefaultChar
;
fontdir
.
dfBreakChar
=
otm
.
otmTextMetrics
.
tmBreakChar
;
fontdir
.
dfBreakChar
=
otm
.
tmBreakChar
;
fontdir
.
dfWidthBytes
=
0
;
fontdir
.
dfWidthBytes
=
0
;
fontdir
.
dfDevice
=
0
;
fontdir
.
dfDevice
=
0
;
fontdir
.
dfFace
=
FIELD_OFFSET
(
struct
fontdir
,
szFaceName
);
fontdir
.
dfFace
=
FIELD_OFFSET
(
struct
fontdir
,
szFaceName
);
fontdir
.
dfReserved
=
0
;
fontdir
.
dfReserved
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
(
WCHAR
*
)
otm
.
otmpFamilyName
,
-
1
,
WideCharToMultiByte
(
CP_ACP
,
0
,
face_name
,
-
1
,
fontdir
.
szFaceName
,
LF_FACESIZE
,
NULL
,
NULL
);
fontdir
.
szFaceName
,
LF_FACESIZE
,
NULL
,
NULL
);
if
(
hidden
)
fontdir
.
dfType
|=
0x80
;
if
(
hidden
)
fontdir
.
dfType
|=
0x80
;
return
create_fot
(
resource_file
,
font_file
,
&
fontdir
);
return
create_fot
(
resource_file
,
font_file
,
&
fontdir
);
...
...
dlls/win32u/font.c
View file @
da4663d6
...
@@ -6341,7 +6341,8 @@ DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *
...
@@ -6341,7 +6341,8 @@ DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *
/**********************************************************************
/**********************************************************************
* __wine_get_file_outline_text_metric (win32u.@)
* __wine_get_file_outline_text_metric (win32u.@)
*/
*/
BOOL
CDECL
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
OUTLINETEXTMETRICW
*
otm
)
BOOL
WINAPI
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
TEXTMETRICW
*
otm
,
UINT
*
em_square
,
WCHAR
*
face_name
)
{
{
struct
gdi_font
*
font
=
NULL
;
struct
gdi_font
*
font
=
NULL
;
...
@@ -6351,7 +6352,9 @@ BOOL CDECL __wine_get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTME
...
@@ -6351,7 +6352,9 @@ BOOL CDECL __wine_get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTME
font
->
lf
.
lfHeight
=
100
;
font
->
lf
.
lfHeight
=
100
;
if
(
!
font_funcs
->
load_font
(
font
))
goto
done
;
if
(
!
font_funcs
->
load_font
(
font
))
goto
done
;
if
(
!
font_funcs
->
set_outline_text_metrics
(
font
))
goto
done
;
if
(
!
font_funcs
->
set_outline_text_metrics
(
font
))
goto
done
;
*
otm
=
font
->
otm
;
*
otm
=
font
->
otm
.
otmTextMetrics
;
*
em_square
=
font
->
otm
.
otmEMSquare
;
wcscpy
(
face_name
,
(
const
WCHAR
*
)
font
->
otm
.
otmpFamilyName
);
free_gdi_font
(
font
);
free_gdi_font
(
font
);
return
TRUE
;
return
TRUE
;
...
...
dlls/win32u/win32u.spec
View file @
da4663d6
...
@@ -1325,4 +1325,4 @@
...
@@ -1325,4 +1325,4 @@
# gdi32
# gdi32
@ cdecl __wine_get_icm_profile(long long ptr ptr)
@ cdecl __wine_get_icm_profile(long long ptr ptr)
@
cdecl __wine_get_file_outline_text_metric(ws
tr ptr)
@
stdcall __wine_get_file_outline_text_metric(wstr ptr p
tr ptr)
dlls/win32u/win32u_private.h
View file @
da4663d6
...
@@ -35,7 +35,8 @@
...
@@ -35,7 +35,8 @@
struct
unix_funcs
struct
unix_funcs
{
{
/* Wine-specific functions */
/* Wine-specific functions */
BOOL
(
CDECL
*
get_file_outline_text_metric
)(
const
WCHAR
*
path
,
OUTLINETEXTMETRICW
*
otm
);
BOOL
(
WINAPI
*
get_file_outline_text_metric
)(
const
WCHAR
*
path
,
TEXTMETRICW
*
otm
,
UINT
*
em_square
,
WCHAR
*
face_name
);
BOOL
(
CDECL
*
get_icm_profile
)(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
BOOL
(
CDECL
*
get_icm_profile
)(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
BOOL
(
CDECL
*
wine_send_input
)(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
);
BOOL
(
CDECL
*
wine_send_input
)(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
);
};
};
...
...
dlls/win32u/wrappers.c
View file @
da4663d6
...
@@ -30,10 +30,11 @@ BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCH
...
@@ -30,10 +30,11 @@ BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCH
return
unix_funcs
->
get_icm_profile
(
hdc
,
allow_default
,
size
,
filename
);
return
unix_funcs
->
get_icm_profile
(
hdc
,
allow_default
,
size
,
filename
);
}
}
BOOL
CDECL
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
OUTLINETEXTMETRICW
*
otm
)
BOOL
WINAPI
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
TEXTMETRICW
*
otm
,
UINT
*
em_square
,
WCHAR
*
face_name
)
{
{
if
(
!
unix_funcs
)
return
FALSE
;
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
get_file_outline_text_metric
(
path
,
otm
);
return
unix_funcs
->
get_file_outline_text_metric
(
path
,
otm
,
em_square
,
face_name
);
}
}
BOOL
CDECL
__wine_send_input
(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
)
BOOL
CDECL
__wine_send_input
(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
)
...
...
include/ntgdi.h
View file @
da4663d6
...
@@ -485,7 +485,7 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER
...
@@ -485,7 +485,7 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER
/* Wine extensions */
/* Wine extensions */
extern
BOOL
CDECL
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
extern
BOOL
CDECL
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
WCHAR
*
filename
);
extern
BOOL
CDECL
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
BOOL
WINAPI
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
TEXTMETRICW
*
otm
,
OUTLINETEXTMETRICW
*
otm
);
UINT
*
em_square
,
WCHAR
*
face_name
);
#endif
/* _NTGDI_ */
#endif
/* _NTGDI_ */
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