mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 13:42:38 +00:00
[CONSOLE][CONCFG][CONSRV] Provide support for specified additional TrueType fonts + bugfixes.
CORE-12451 CORE-13182 CORE-13196 - CONSOLE: Initialize the additional TrueType fonts cache. * Fix the font preview when a TrueType font has been selected. * Refresh the available fonts and the font preview when the selected code page is changed (Work In Progress), or when the OS pool of font resources has changed (WM_FONTCHANGE message). - CONCFG: Implement support for the additional TrueType fonts cache: the contents of the cache is enumerated under the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont * Add helper functions and macros. * In CreateConsoleFontEx(), set the mandatory font pitch&family flags and remove those that we do not support. * In IsValidConsoleFont2(), update the validity checks and the documentation links. - CONSRV: Load/refresh the additional TrueType fonts cache when needed.
This commit is contained in:
parent
73d7fd1415
commit
c4e2826c73
11 changed files with 497 additions and 108 deletions
|
@ -72,7 +72,8 @@ AddCodePage(
|
|||
|
||||
static VOID
|
||||
BuildCodePageList(
|
||||
IN HWND hDlg)
|
||||
IN HWND hDlg,
|
||||
IN UINT CurrentCodePage)
|
||||
{
|
||||
LIST_CTL ListCtl;
|
||||
HKEY hKey;
|
||||
|
@ -126,7 +127,7 @@ BuildCodePageList(
|
|||
AddCodePage(&ListCtl, CP_UTF8);
|
||||
|
||||
/* Find and select the current code page in the sorted list */
|
||||
if (BisectListSortedByValue(&ListCtl, ConInfo->CodePage, &CodePage, FALSE) == CB_ERR ||
|
||||
if (BisectListSortedByValue(&ListCtl, CurrentCodePage, &CodePage, FALSE) == CB_ERR ||
|
||||
CodePage == CB_ERR)
|
||||
{
|
||||
/* Not found, select the first element */
|
||||
|
@ -212,7 +213,7 @@ OptionsProc(HWND hDlg,
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
BuildCodePageList(hDlg);
|
||||
BuildCodePageList(hDlg, ConInfo->CodePage);
|
||||
UpdateDialogElements(hDlg, ConInfo);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -332,6 +333,7 @@ OptionsProc(HWND hDlg,
|
|||
}
|
||||
}
|
||||
else
|
||||
// (HIWORD(wParam) == CBN_KILLFOCUS)
|
||||
if ((HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_SELENDOK) &&
|
||||
(LOWORD(wParam) == IDL_CODEPAGE))
|
||||
{
|
||||
|
@ -347,11 +349,15 @@ OptionsProc(HWND hDlg,
|
|||
if (CodePage == CB_ERR)
|
||||
break;
|
||||
|
||||
ConInfo->CodePage = CodePage;
|
||||
|
||||
/* Change the property sheet state only if the user validated */
|
||||
if (HIWORD(wParam) == CBN_SELENDOK)
|
||||
/* If the user validated a different code page... */
|
||||
if ((HIWORD(wParam) == CBN_SELENDOK) && (CodePage != ConInfo->CodePage))
|
||||
{
|
||||
/* ... update the code page, notify the siblings and change the property sheet state */
|
||||
ConInfo->CodePage = CodePage;
|
||||
// PropSheet_QuerySiblings(GetParent(hDlg), IDL_CODEPAGE, 0);
|
||||
ResetFontPreview(&FontPreview);
|
||||
PropSheet_Changed(GetParent(hDlg), hDlg);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue