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
41f763ea
Commit
41f763ea
authored
Jul 29, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Jul 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add an internal version of GetTextCharsetInfo() that takes a DC pointer.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
22202eae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
22 deletions
+35
-22
font.c
dlls/gdi32/font.c
+35
-22
No files found.
dlls/gdi32/font.c
View file @
41f763ea
...
...
@@ -407,6 +407,40 @@ DWORD WINAPI GdiGetCodePage( HDC hdc )
}
/***********************************************************************
* get_text_charset_info
*
* Internal version of GetTextCharsetInfo() that takes a DC pointer.
*/
static
UINT
get_text_charset_info
(
DC
*
dc
,
FONTSIGNATURE
*
fs
,
DWORD
flags
)
{
UINT
ret
=
DEFAULT_CHARSET
;
PHYSDEV
dev
;
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextCharsetInfo
);
ret
=
dev
->
funcs
->
pGetTextCharsetInfo
(
dev
,
fs
,
flags
);
if
(
ret
==
DEFAULT_CHARSET
&&
fs
)
memset
(
fs
,
0
,
sizeof
(
FONTSIGNATURE
));
return
ret
;
}
/***********************************************************************
* GetTextCharsetInfo (GDI32.@)
*/
UINT
WINAPI
GetTextCharsetInfo
(
HDC
hdc
,
FONTSIGNATURE
*
fs
,
DWORD
flags
)
{
UINT
ret
=
DEFAULT_CHARSET
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
dc
)
{
ret
=
get_text_charset_info
(
dc
,
fs
,
flags
);
release_dc_ptr
(
dc
);
}
return
ret
;
}
/***********************************************************************
* FONT_mbtowc
*
* Returns a Unicode translation of str using the charset of the
...
...
@@ -646,7 +680,7 @@ static DWORD get_associated_charset_info(void)
static
void
update_font_code_page
(
DC
*
dc
,
HANDLE
font
)
{
CHARSETINFO
csi
;
int
charset
=
GetTextCharsetInfo
(
dc
->
hSelf
,
NULL
,
0
);
int
charset
=
get_text_charset_info
(
dc
,
NULL
,
0
);
LOGFONTW
lf
;
GetObjectW
(
font
,
sizeof
(
lf
),
&
lf
);
...
...
@@ -3689,27 +3723,6 @@ UINT WINAPI GetTextCharset(HDC hdc)
}
/***********************************************************************
* GetTextCharsetInfo (GDI32.@)
*/
UINT
WINAPI
GetTextCharsetInfo
(
HDC
hdc
,
LPFONTSIGNATURE
fs
,
DWORD
flags
)
{
UINT
ret
=
DEFAULT_CHARSET
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
PHYSDEV
dev
;
if
(
dc
)
{
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextCharsetInfo
);
ret
=
dev
->
funcs
->
pGetTextCharsetInfo
(
dev
,
fs
,
flags
);
release_dc_ptr
(
dc
);
}
if
(
ret
==
DEFAULT_CHARSET
&&
fs
)
memset
(
fs
,
0
,
sizeof
(
FONTSIGNATURE
));
return
ret
;
}
/***********************************************************************
* GdiGetCharDimensions (GDI32.@)
*
* Gets the average width of the characters in the English alphabet.
...
...
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