Add New Font button

This commit is contained in:
Garhoogin 2025-05-02 17:34:57 -05:00 committed by GitHub
parent c6473dc0ea
commit d696f147fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 19 additions and 1 deletions

Binary file not shown.

View File

@ -66,6 +66,7 @@ int NftrIsValidBnfr12(const unsigned char *buffer, unsigned int size);
int NftrIsValidBnfr20(const unsigned char *buffer, unsigned int size);
int NftrIdentify(const unsigned char *buffer, unsigned int size);
void NftrInit(NFTR *nftr, int format);
int NftrRead(NFTR *nftr, const unsigned char *buffer, unsigned int size);
int NftrReadFile(NFTR *nftr, LPCWSTR path);

View File

@ -1524,6 +1524,22 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
CreateNsbtxViewerImmediate(CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, data->hWndMdi, &nsbtx);
break;
}
case ID_NEW_NEWFONT:
{
//init sensible defaults
NFTR nftr;
NftrInit(&nftr, NFTR_TYPE_NFTR_10);
nftr.bpp = 1;
nftr.hasCodeMap = 1;
nftr.cellWidth = 8;
nftr.cellHeight = 12;
nftr.pxAscent = 10;
nftr.lineHeight = 11;
nftr.charset = FONT_CHARSET_UTF16;
CreateNftrViewerImmediate(CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, data->hWndMdi, &nftr);
break;
}
case ID_FILE_CONVERTTO:
{
HWND hWndFocused = (HWND) SendMessage(data->hWndMdi, WM_MDIGETACTIVE, 0, 0);

View File

@ -211,13 +211,14 @@
#define ID_FONTMENU2_GOTO 40223
#define ID_FONTMENU_GENERATE 40224
#define ID_FONTMENU2_GENERATEALL 40225
#define ID_NEW_NEWFONT 40226
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 111
#define _APS_NEXT_COMMAND_VALUE 40226
#define _APS_NEXT_COMMAND_VALUE 40227
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif