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
80a29e2d
Commit
80a29e2d
authored
Jun 10, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Jun 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: CLIP_DFA_DISABLE should disable the font association mechanism.
parent
2de2e10d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
font.c
dlls/gdi32/font.c
+6
-3
font.c
dlls/gdi32/tests/font.c
+16
-0
No files found.
dlls/gdi32/font.c
View file @
80a29e2d
...
...
@@ -653,12 +653,15 @@ static DWORD get_associated_charset_info(void)
return
associated_charset
;
}
static
void
update_font_code_page
(
DC
*
dc
)
static
void
update_font_code_page
(
DC
*
dc
,
HANDLE
font
)
{
CHARSETINFO
csi
;
int
charset
=
GetTextCharsetInfo
(
dc
->
hSelf
,
NULL
,
0
);
LOGFONTW
lf
;
GetObjectW
(
font
,
sizeof
(
lf
),
&
lf
);
if
(
charset
==
ANSI_CHARSET
&&
if
(
charset
==
ANSI_CHARSET
&&
!
(
lf
.
lfClipPrecision
&
CLIP_DFA_DISABLE
)
&&
get_associated_charset_info
()
&
ASSOC_CHARSET_ANSI
)
charset
=
DEFAULT_CHARSET
;
...
...
@@ -725,7 +728,7 @@ static HGDIOBJ FONT_SelectObject( HGDIOBJ handle, HDC hdc )
ret
=
dc
->
hFont
;
dc
->
hFont
=
handle
;
dc
->
aa_flags
=
aa_flags
?
aa_flags
:
GGO_BITMAP
;
update_font_code_page
(
dc
);
update_font_code_page
(
dc
,
handle
);
GDI_dec_ref_count
(
ret
);
}
else
GDI_dec_ref_count
(
handle
);
...
...
dlls/gdi32/tests/font.c
View file @
80a29e2d
...
...
@@ -2570,6 +2570,22 @@ static void test_GdiGetCodePage(void)
hfont
=
SelectObject
(
hdc
,
hfont
);
DeleteObject
(
hfont
);
/* CLIP_DFA_DISABLE turns off the font association */
lf
.
lfClipPrecision
=
CLIP_DFA_DISABLE
;
hfont
=
CreateFontIndirectA
(
&
lf
);
ok
(
hfont
!=
0
,
"CreateFontIndirectA error %u
\n
"
,
GetLastError
());
hfont
=
SelectObject
(
hdc
,
hfont
);
charset
=
GetTextCharset
(
hdc
);
codepage
=
pGdiGetCodePage
(
hdc
);
trace
(
"acp=%d, lfFaceName=%s, lfCharSet=%d, GetTextCharset=%d, GdiGetCodePage=%d
\n
"
,
acp
,
lf
.
lfFaceName
,
lf
.
lfCharSet
,
charset
,
codepage
);
ok
(
codepage
==
1252
,
"GdiGetCodePage returned %d
\n
"
,
codepage
);
hfont
=
SelectObject
(
hdc
,
hfont
);
DeleteObject
(
hfont
);
ReleaseDC
(
NULL
,
hdc
);
}
}
...
...
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