Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5f5418a3
Commit
5f5418a3
authored
Dec 01, 2005
by
Pavel Roskin
Committed by
Alexandre Julliard
Dec 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve font support in Notepad.
parent
960aadac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
dialog.c
programs/notepad/dialog.c
+1
-1
main.c
programs/notepad/main.c
+31
-0
No files found.
programs/notepad/dialog.c
View file @
5f5418a3
...
...
@@ -620,7 +620,7 @@ VOID DIALOG_SelectFont(VOID)
cf
.
lStructSize
=
sizeof
(
cf
);
cf
.
hwndOwner
=
Globals
.
hMainWnd
;
cf
.
lpLogFont
=&
lf
;
cf
.
Flags
=
CF_SCREENFONTS
;
cf
.
Flags
=
CF_SCREENFONTS
|
CF_INITTOLOGFONTSTRUCT
;
if
(
ChooseFont
(
&
cf
)
)
{
...
...
programs/notepad/main.c
View file @
5f5418a3
...
...
@@ -49,6 +49,36 @@ VOID SetFileName(LPCWSTR szFileName)
/***********************************************************************
*
* NOTEPAD_InitFont
*
* Initialize font for the edit window
*/
static
VOID
NOTEPAD_InitFont
()
{
LOGFONT
*
lf
=
&
Globals
.
lfFont
;
static
const
WCHAR
systemW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
lf
->
lfHeight
=
-
10
;
lf
->
lfWidth
=
0
;
lf
->
lfEscapement
=
0
;
lf
->
lfOrientation
=
0
;
lf
->
lfWeight
=
FW_BOLD
;
lf
->
lfItalic
=
FALSE
;
lf
->
lfUnderline
=
FALSE
;
lf
->
lfStrikeOut
=
FALSE
;
lf
->
lfCharSet
=
DEFAULT_CHARSET
;
lf
->
lfOutPrecision
=
OUT_DEFAULT_PRECIS
;
lf
->
lfClipPrecision
=
CLIP_DEFAULT_PRECIS
;
lf
->
lfQuality
=
DEFAULT_QUALITY
;
lf
->
lfPitchAndFamily
=
FIXED_PITCH
|
FF_DONTCARE
;
lstrcpy
(
lf
->
lfFaceName
,
systemW
);
Globals
.
hFont
=
CreateFontIndirect
(
lf
);
SendMessage
(
Globals
.
hEdit
,
WM_SETFONT
,
(
WPARAM
)
Globals
.
hFont
,
(
LPARAM
)
FALSE
);
}
/***********************************************************************
*
* NOTEPAD_MenuCommand
*
* All handling of main menu events
...
...
@@ -153,6 +183,7 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
ES_AUTOVSCROLL
|
ES_MULTILINE
,
0
,
0
,
rc
.
right
,
rc
.
bottom
,
hWnd
,
NULL
,
Globals
.
hInstance
,
NULL
);
NOTEPAD_InitFont
();
break
;
}
...
...
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