29 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72
59 DPRINT1(
"RefreshFontPreview: CreateConsoleFont() failed\n");
64 Preview->hFont =
hFont;
65 GetFontCellSize(
NULL,
hFont, &Preview->CharHeight, &Preview->CharWidth);
76 Preview->hFont =
hFont;
145 WCHAR szFontSize[100];
153 if (SizeList->UseRasterOrTTList)
158 SizeList->CurrentRasterSize = FontSize;
167 else if (nSel >=
idx)
180 SizeList->CurrentTTSize = FontSize;
192 SizeList->bIsTTSizeDirty =
TRUE;
205 WCHAR szFontSize[100];
207 if (SizeList->UseRasterOrTTList)
212 if (nSel ==
LB_ERR)
return 0;
214 FontSize = (
LONG)SizeList->RasterSizeList.GetData(&SizeList->RasterSizeList, nSel);
215 if (FontSize ==
LB_ERR)
return 0;
217 SizeList->CurrentRasterSize = FontSize;
223 if (!SizeList->bIsTTSizeDirty)
234 if (nSel ==
CB_ERR)
return 0;
244 FontSize =
wcstoul(szFontSize, &pszNext, 10);
245 if ((FontSize == 0) || (*pszNext))
255 FontSize =
wcstoul(szFontSize, &pszNext, 10);
256 if ((FontSize == 0) || (*pszNext))
271 SizeList->bIsTTSizeDirty =
FALSE;
273 SizeList->CurrentTTSize = FontSize;
279 if (!SizeList->TTSizePixelUnit)
303 DPRINT1(
"Failed to add font '%S'\n", pszFaceName);
307 DPRINT1(
"Add font '%S'\n", pszFaceName);
347 UINT iItem, iDupItem;
348 WCHAR szFontSize[100];
361 FontSize =
MAKEWPARAM(lplf->lfWidth, lplf->lfHeight);
429 DPRINT1(
"The ideal console fonts were not found; manually add default ones.\n");
469 SizeList->CurrentRasterSize =
MAKELONG(FontSize.X, FontSize.Y);
470 SizeList->CurrentTTSize = FontSize.Y;
483 if (SizeList->UseRasterOrTTList)
500 hDlgItem = SizeList->hWndTTSizeList;
504 hDlgItem = SizeList->RasterSizeList.hWndList;
517 hDlgItem = SizeList->RasterSizeList.hWndList;
521 hDlgItem = SizeList->hWndTTSizeList;
552 WCHAR FontGrpBoxLabel[260];
581 DPRINT(
"pConInfo->FaceName = '%S'\n", pConInfo->FaceName);
588 if (FontGrpBoxLabelTpl &&
Length > 0)
621 if (SizeList->UseRasterOrTTList)
636 if (SizeList->UseRasterOrTTList)
645 SizeList->UseRasterOrTTList =
TRUE;
664 WCHAR szFontSize[100];
686 DPRINT1(
"FontSizeChange: CreateConsoleFont2() failed\n");
705 pConInfo->FontSize.X = (
SHORT)(SizeList->UseRasterOrTTList ?
CharWidth : 0);
708 DPRINT(
"pConInfo->FontSize = (%d x %d) ; (CharWidth x CharHeight) = (%d x %d)\n",
752 SizeList->UseRasterOrTTList =
TRUE;
756 SizeList->TTSizePixelUnit =
TRUE;
785 case WM_DISPLAYCHANGE:
889 WCHAR szFontSize[100];
890 WCHAR szMessage[260];
896 FontSize =
wcstoul(szFontSize, &pszNext, 10);
897 if ((FontSize == 0) || (*pszNext))
static HWND hWndList[5+1]
PCONSOLE_STATE_INFO ConInfo
VOID ApplyConsoleInfo(HWND hwndDlg)
VOID PaintText(IN LPDRAWITEMSTRUCT drawItem, IN PCONSOLE_STATE_INFO pConInfo, IN TEXT_TYPE TextMode)
UINT BisectListSortedByValue(IN PLIST_CTL ListCtl, IN ULONG_PTR Value, OUT PUINT pValueItem OPTIONAL, IN BOOL BisectRightOrLeft)
static DWORD CurrentFontType
INT LogicalSizeToPointSize(IN HDC hDC OPTIONAL, IN UINT LogicalSize)
static VOID FaceNameList_Initialize(IN HWND hWndList, IN UINT CodePage)
static UINT CurrentCodePage
struct _FONTSIZE_LIST_CTL FONTSIZE_LIST_CTL
struct _FACE_NAMES_PROC_PARAM FACE_NAMES_PROC_PARAM
static BOOL CALLBACK EnumFontSizesProc(IN PLOGFONTW lplf, IN PNEWTEXTMETRICW lpntm, IN DWORD FontType, IN LPARAM lParam)
INT PointSizeToLogicalSize(IN HDC hDC OPTIONAL, IN INT PointSize)
static VOID FaceNameList_SelectFont(IN HWND hDlg, IN HWND hWndList, IN PFONTSIZE_LIST_CTL SizeList, IN LPCWSTR FaceName, IN ULONG FontFamily, IN ULONG FontWeight, IN COORD FontSize)
struct _FONTSIZE_LIST_CTL * PFONTSIZE_LIST_CTL
VOID RefreshFontPreview(IN FONT_PREVIEW *Preview, IN PCONSOLE_STATE_INFO pConInfo)
static VOID FontSizeList_SelectFontSize(IN PFONTSIZE_LIST_CTL SizeList, IN ULONG FontSize)
INT_PTR CALLBACK FontProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID AddFontToList(IN HWND hWndList, IN LPCWSTR pszFaceName, IN DWORD FontType)
static VOID UpdateFontSizeList(IN HWND hDlg, IN PFONTSIZE_LIST_CTL SizeList)
static const SHORT TrueTypePoints[]
static BOOL FontSizeChange(IN HWND hDlg, IN PFONTSIZE_LIST_CTL SizeList, IN OUT PCONSOLE_STATE_INFO pConInfo)
static LONG FontSizeList_GetSelectedFontSize(IN PFONTSIZE_LIST_CTL SizeList)
static INT CurrentSelFont
struct _FACE_NAMES_PROC_PARAM * PFACE_NAMES_PROC_PARAM
static BOOL CALLBACK EnumFaceNamesProc(IN PLOGFONTW lplf, IN PNEWTEXTMETRICW lpntm, IN DWORD FontType, IN LPARAM lParam)
static ULONG_PTR RasterSizeList_GetData(IN PLIST_CTL ListCtl, IN INT Index)
static BOOL FontTypeChange(IN HWND hDlg, IN PFONTSIZE_LIST_CTL SizeList, IN OUT PCONSOLE_STATE_INFO pConInfo)
static INT RasterSizeList_GetCount(IN PLIST_CTL ListCtl)
VOID UpdateFontPreview(IN FONT_PREVIEW *Preview, IN HFONT hFont, IN UINT CharWidth, IN UINT CharHeight)
#define IDC_RADIO_PIXEL_UNIT
#define IDS_GROUPBOX_FONT_NAME
#define IDC_LBOX_FONTTYPE
#define IDC_STATIC_FONT_WINDOW_PREVIEW
#define IDC_CHECK_BOLD_FONTS
#define IDC_CBOX_FONTSIZE
#define IDC_GROUPBOX_FONT_NAME
#define IDC_RADIO_POINT_UNIT
#define IDC_STATIC_SELECT_FONT_PREVIEW
#define IDC_LBOX_FONTSIZE
#define HeapFree(x, y, z)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define PropSheet_Changed(d, w)
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
WCHAR lfFaceName[LF_FACESIZE]
WCHAR FaceName[LF_FACESIZE]
_In_ WDFCOLLECTION _In_ ULONG Index
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
HFONT CreateConsoleFont(_Inout_ PCONSOLE_STATE_INFO ConsoleInfo)
A wrapper for CreateConsoleFontEx().
BOOL IsValidConsoleFont2(_In_ PLOGFONTW lplf, _In_ PNEWTEXTMETRICW lpntm, _In_ DWORD FontType, _In_ UINT CodePage)
Validates whether a given font can be supported in the console, under the specified code page.
HFONT CreateConsoleFont2(_In_ LONG Height, _In_opt_ LONG Width, _Inout_ PCONSOLE_STATE_INFO ConsoleInfo)
A wrapper for CreateConsoleFontEx().
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
#define TRUETYPE_FONTTYPE
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define LB_FINDSTRINGEXACT
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define CB_FINDSTRINGEXACT
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HDC WINAPI GetDC(_In_opt_ HWND)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define MB_ICONINFORMATION
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)