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
29533e48
Commit
29533e48
authored
Dec 22, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Leave room for wide characters only when using a DBCS codepage.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a8511a3e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
user.c
programs/wineconsole/user.c
+6
-1
No files found.
programs/wineconsole/user.c
View file @
29533e48
...
...
@@ -449,6 +449,7 @@ HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONTW* lf,
TEXTMETRICW
tm
;
HDC
hDC
;
HFONT
hFont
,
hOldFont
;
CPINFO
cpinfo
;
if
(
!
(
hDC
=
GetDC
(
hWnd
)))
return
NULL
;
if
(
!
(
hFont
=
CreateFontIndirectW
(
lf
)))
...
...
@@ -461,12 +462,16 @@ HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONTW* lf,
SelectObject
(
hDC
,
hOldFont
);
ReleaseDC
(
hWnd
,
hDC
);
config
->
cell_width
=
tm
.
tm
Max
CharWidth
;
config
->
cell_width
=
tm
.
tm
Ave
CharWidth
;
config
->
cell_height
=
tm
.
tmHeight
+
tm
.
tmExternalLeading
;
config
->
font_weight
=
tm
.
tmWeight
;
lstrcpyW
(
config
->
face_name
,
lf
->
lfFaceName
);
if
(
el
)
*
el
=
tm
.
tmExternalLeading
;
/* FIXME: use maximum width for DBCS codepages since some chars take two cells */
if
(
GetCPInfo
(
GetConsoleOutputCP
(),
&
cpinfo
)
&&
cpinfo
.
MaxCharSize
>
1
)
config
->
cell_width
=
tm
.
tmMaxCharWidth
;
return
hFont
;
}
...
...
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