ReactOS 0.4.16-dev-122-g325d74c
|
#include <cjkcode.h>
Go to the source code of this file.
Classes | |
struct | _TT_FONT_ENTRY |
struct | _FONT_DATA |
Macros | |
#define | INVALID_CP ((UINT)-1) |
#define | CP_UTF8 65001 |
#define | CP_USA 437 |
#define | IsBoldFont(Weight) ((Weight) >= FW_SEMIBOLD) /* Sometimes, just > FW_MEDIUM */ |
#define | BOLD_MARK L'*' |
#define | IsAdditionalTTFont(FaceName) (FindCachedTTFont((FaceName), INVALID_CP) != NULL) |
Verifies whether the given font is an additional console TrueType font. Wrapper macros around FindCachedTTFont(). | |
#define | IsAdditionalTTFontCP(FaceName, CodePage) (FindCachedTTFont((FaceName), (CodePage)) != NULL) |
Typedefs | |
typedef struct _TT_FONT_ENTRY | TT_FONT_ENTRY |
typedef struct _TT_FONT_ENTRY * | PTT_FONT_ENTRY |
typedef struct _FONT_DATA | FONT_DATA |
typedef struct _FONT_DATA * | PFONT_DATA |
Functions | |
BYTE | CodePageToCharSet (_In_ UINT CodePage) |
Retrieves the character set associated with a given code page. | |
HFONT | CreateConsoleFontEx (_In_ LONG Height, _In_opt_ LONG Width, _Inout_updates_z_(LF_FACESIZE) PWSTR FaceName, _In_ ULONG FontWeight, _In_ ULONG FontFamily, _In_ UINT CodePage, _In_ BOOL UseDefaultFallback, _Out_ PFONT_DATA FontData) |
Validates and creates a suitable console font based on the font characteristics given in input. | |
HFONT | CreateConsoleFont2 (_In_ LONG Height, _In_opt_ LONG Width, _Inout_ PCONSOLE_STATE_INFO ConsoleInfo) |
A wrapper for CreateConsoleFontEx(). | |
HFONT | CreateConsoleFont (_Inout_ PCONSOLE_STATE_INFO ConsoleInfo) |
A wrapper for CreateConsoleFontEx(). | |
_Success_ (return) BOOL GetFontCellSize(_In_opt_ HDC hDC | |
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. | |
BOOL | IsValidConsoleFont (_In_ PCWSTR FaceName, _In_ UINT CodePage) |
Validates whether a given font can be supported in the console, under the specified code page. | |
VOID | InitTTFontCache (VOID) |
Initializes the console TrueType font cache. | |
VOID | ClearTTFontCache (VOID) |
Clears the console TrueType font cache. | |
VOID | RefreshTTFontCache (VOID) |
Refreshes the console TrueType font cache, by clearing and re-initializing it. | |
PTT_FONT_ENTRY | FindCachedTTFont (_In_reads_or_z_opt_(LF_FACESIZE) PCWSTR FaceName, _In_ UINT CodePage) |
Searches for a font in the console TrueType font cache, with the specified code page. | |
Variables | |
_In_ HFONT | hFont |
_In_ HFONT _Out_ PUINT | Height |
_In_ HFONT _Out_ PUINT _Out_ PUINT | Width |
#define IsAdditionalTTFont | ( | FaceName | ) | (FindCachedTTFont((FaceName), INVALID_CP) != NULL) |
Verifies whether the given font is an additional console TrueType font. Wrapper macros around FindCachedTTFont().
#define IsAdditionalTTFontCP | ( | FaceName, | |
CodePage | |||
) | (FindCachedTTFont((FaceName), (CodePage)) != NULL) |
#define IsBoldFont | ( | Weight | ) | ((Weight) >= FW_SEMIBOLD) /* Sometimes, just > FW_MEDIUM */ |
typedef struct _FONT_DATA FONT_DATA |
typedef struct _FONT_DATA * PFONT_DATA |
typedef struct _TT_FONT_ENTRY * PTT_FONT_ENTRY |
typedef struct _TT_FONT_ENTRY TT_FONT_ENTRY |
_Success_ | ( | return | ) |
Clears the console TrueType font cache.
Definition at line 1131 of file font.c.
Referenced by InitApplet(), and RefreshTTFontCache().
Retrieves the character set associated with a given code page.
[in] | CodePage | The code page to convert. |
Definition at line 51 of file font.c.
Referenced by CON_API(), CreateConsoleFontWorker(), FindSuitableFont(), and IsValidConsoleFont().
HFONT CreateConsoleFont | ( | _Inout_ PCONSOLE_STATE_INFO | ConsoleInfo | ) |
A wrapper for CreateConsoleFontEx().
[in,out] | ConsoleInfo | A pointer to console settings information, containing in particular (in input) the face name and characteristics of the font to create with the current console code page. In output, the font information gets updated. Note that a default fallback font is always being used in case neither the specified font nor any substitute font could be found and created for the specified code page. |
Definition at line 653 of file font.c.
Referenced by RefreshFontPreview().
HFONT CreateConsoleFont2 | ( | _In_ LONG | Height, |
_In_opt_ LONG | Width, | ||
_Inout_ PCONSOLE_STATE_INFO | ConsoleInfo | ||
) |
A wrapper for CreateConsoleFontEx().
[in] | Height | The font height in cell units (pixels). |
[in,opt] | Width The font width in cell units (pixels). | |
[in,out] | ConsoleInfo | A pointer to console settings information, containing in particular (in input) the face name and characteristics of the font to create with the current console code page. In output, the font information gets updated. Note that a default fallback font is always being used in case neither the specified font nor any substitute font could be found and created for the specified code page. |
Definition at line 609 of file font.c.
Referenced by CreateConsoleFont(), and FontSizeChange().
HFONT CreateConsoleFontEx | ( | _In_ LONG | Height, |
_In_opt_ LONG | Width, | ||
_Inout_updates_z_(LF_FACESIZE) PWSTR | FaceName, | ||
_In_ ULONG | FontWeight, | ||
_In_ ULONG | FontFamily, | ||
_In_ UINT | CodePage, | ||
_In_ BOOL | UseDefaultFallback, | ||
_Out_ PFONT_DATA | FontData | ||
) |
Validates and creates a suitable console font based on the font characteristics given in input.
[in] | Height | The font height in cell units (pixels). |
[in,opt] | Width The font width in cell units (pixels). | |
[in,out] | FaceName | A pointer to a maximally LF_FACESIZE-sized buffer. In input: The buffer contains the face name of the font to try to create. In output: The buffer receives the face name of the font that has been created, in case of success. It may, or may not be, identical to the face name provided in input, in case a substitute font has been chosen. |
[in] | FontWeight | The font weight. |
[in] | FontFamily | The font family. |
[in] | CodePage | The code page the font has to support. |
[in] | UseDefaultFallback | Whether (TRUE) or not (FALSE) to use a default fallback font in case neither the specified font nor any substitute font could be found and created for the specified code page. |
[out] | FontData | The face name and characteristics of the created font. |
Definition at line 505 of file font.c.
Referenced by CreateConsoleFont2(), and InitFonts().
PTT_FONT_ENTRY FindCachedTTFont | ( | _In_reads_or_z_opt_(LF_FACESIZE) PCWSTR | FaceName, |
_In_ UINT | CodePage | ||
) |
Searches for a font in the console TrueType font cache, with the specified code page.
[in,opt] | FaceName An optional pointer to a maximally LF_FACESIZE-sized buffer. The buffer contains the face name of the font to search for. |
[in] | CodePage | The code page the font has to support, or INVALID_CP when searching a font by face name only. |
Definition at line 1183 of file font.c.
Referenced by FindSuitableFont().
Initializes the console TrueType font cache.
Definition at line 1013 of file font.c.
Referenced by GuiInit(), InitApplet(), and RefreshTTFontCache().
Validates whether a given font can be supported in the console, under the specified code page.
[in] | FaceName | The face name of the font to validate. |
[in] | CodePage | The code page the font has to support. |
Definition at line 974 of file font.c.
Referenced by CreateConsoleFontWorker().
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.
[in] | lplf | |
[in] | lpntm | |
[in] | FontType | The GDI font characteristics of the font to validate. |
[in] | CodePage | The code page the font has to support. |
Definition at line 782 of file font.c.
Referenced by EnumFaceNamesProc(), FindSuitableFontProc(), and IsValidConsoleFontProc().
Refreshes the console TrueType font cache, by clearing and re-initializing it.
Definition at line 1153 of file font.c.
Referenced by GuiApplyUserSettings().
Definition at line 88 of file font.h.
Referenced by _Success_(), BaseControlVideoImpl_SetDestinationPosition(), BaseControlVideoImpl_SetSourcePosition(), BaseControlWindowImpl_put_Height(), BaseControlWindowImpl_SetWindowPosition(), BaseWindowImpl_OnSize(), BasicVideo_SetDestinationPosition(), BasicVideo_SetSourcePosition(), BitBlt(), BlDisplayValidOemBitmap(), cdtInit(), ChangeView(), co_IntShowDesktop(), ConioCopyRegion(), ConsolepClearBuffer(), ConvertBmpToGopBlt(), ConWndProc(), CreateBitmap(), CreateCompatibleBitmap(), CreateConsoleFont2(), CreateConsoleFontEx(), CreateD3D9MipMap(), CreateDIBitmap(), CreateDiscardableBitmap(), CreatePopupWindow(), DECLARE_INTERFACE_(), DIB_1BPP_BitBltSrcCopy_From1BPP(), DisplayCharacter(), draw_diag_edge(), DrawBox(), DrawClassicFrame(), DrawPartitionList(), FromMouseCoordinates(), GdipAddPathRectangles(), GdipAddPathRectanglesI(), GdipDrawRectanglesI(), GdipFillRectanglesI(), CAppScrnshotPreview::GetRequestedWidth(), GuiGetLargestConsoleWindowSize(), HistoryDisplayCurrentHistory(), IDirect3DDevice9Base_CreateTexture(), InbvBufferToScreenBlt(), InbvScreenToBufferBlt(), InitGL(), InitImageList(), InitMetrics(), IntCreateCompatibleBitmap(), IntDrawArc(), IntDrawDiagEdge(), IntDrawEllipse(), IntEngFillBox(), InternetExplorer_put_Height(), IntFillArc(), IntFillEllipse(), IntFillRect(), IntGdiCreateMaskFromRLE(), IntPatBlt(), LISTVIEW_Size(), LlbFwVideoGetDisplaySize(), CGridView::MapWndProc(), MediaDet_GetBitmapBits(), MediaDet_WriteBitmapBits(), MENU_DrawMenuItem(), metafile_deserialize_image(), METAFILE_FillRectangles(), MiniTuiDrawProgressBarCenter(), MyMakeSquareRect(), NC_DrawFrame(), NtGdiBitBlt(), NtGdiCreateCompatibleBitmap(), NtGdiRoundRect(), NtGdiSetBitmapDimension(), NtGdiSetDIBitsToDeviceInternal(), CDeviceManager::OnCommand(), Pc98VideoGetDisplaySize(), PcVideoGetDisplaySize(), PopupError(), PrintDiskData(), PrintEmptyLine(), PrintPartitionData(), ProcessDisplayRegistry(), CAppInfoDisplay::ResizeChildren(), ResizeControls(), ResizeConWnd(), ReSizeGLScene(), ResizeTextConsole(), RleBitBlt(), set_client_height(), SetDIBitsToDevice(), ShellUIHelper2_AddDesktopComponent(), test_D3DXCreateRenderToSurface(), test_excludeinfinite(), test_Get_Release_DC(), test_ID3DXRenderToSurface(), test_scans(), ToMouseCoordinates(), TuiCalcMenuBoxSize(), TuiDrawProgressBarCenter(), UefiConsPutChar(), UefiVideoGetDisplaySize(), UITOOLS95_DFC_ButtonCheckRadio(), UITOOLS_MakeSquareRect(), VgaConsoleCreateGraphicsScreen(), VgaWriteTextModeFont(), VidBufferToScreenBlt(), VideoRenderer_OnSize(), VideoWindow_put_Height(), VideoWindow_SetWindowPosition(), VidScreenToBufferBlt(), VMR9_OnSize(), WebBrowser_put_Height(), wWinMain(), XboxConsPutChar(), and XboxVideoGetDisplaySize().
Definition at line 87 of file font.h.
Referenced by _Success_(), add_ruler_units(), AddCharToSelection(), AddDialogControl(), BUTTON_CalcLabelRect(), C1_SetData(), CB_Paint(), check_height_font_enumproc(), ChildWndProc(), COMBO_Font(), COMCTL32_GetFontMetrics(), create_tabcontrol(), CreateConsoleFont2(), CreateConsoleFontEx(), CreateFontset(), CreateLayoutIcon(), CreateMonospaceFont(), CreateTitleFont(), CreateTrayIcon(), CUIFToolbarMenuButton::CUIFToolbarMenuButton(), D3DXCreateTextTest(), dialog_get_sans_serif_height(), DlgProc(), DoEntry(), DoTestEntry(), DrawCaptionTempA(), DrawCaptionTempW(), DrawProc(), DrawThemeTextEx(), DumpFont(), EditTypeDlg_OnDrawItem(), EMFDRV_CreateFontIndirect(), EMFDRV_SelectFont(), EnumEnhMetaFile(), EnumMetaFile(), FillFontStyleComboList(), fnIMLangFontLink2_ReleaseFont(), fnIMLangFontLink_ReleaseFont(), font_height(), FontSizeChange(), ftGdiGetGlyphOutline(), ftGdiGetTextCharsetInfo(), GB_Paint(), get_font_height(), GetButtonHeight(), GetFontMetrics(), GetPhysicalFontHeight(), CTipbarThread::GetTextSize(), GetThemeTextExtent(), GetThemeTextMetrics(), HEADER_CreateDragImage(), HEADER_Refresh(), HEADER_SetFont(), HEXEDIT_WM_SETFONT(), HOTKEY_SetFont(), InatCreateIconBySize(), InitFonts(), InitInstance(), InternalSelectEx(), IPADDRESS_Create(), LISTVIEW_Command(), LISTVIEW_GetItemMetrics(), LISTVIEW_GetStringWidthT(), LISTVIEW_SaveTextMetrics(), LISTVIEW_SetFont(), LISTVIEW_ShowFocusRect(), LoadIniFile(), LrgCellWndProc(), MainFrameBase::MainFrameBase(), MainWndProc(), ME_DebugWrite(), MENU_DrawPopupGlyph(), MFDRV_CreateFontIndirect(), MonSelChangeFont(), MonSelGetMonitorFont(), MonSelPaintMonitor(), MonthCalChangeFont(), MyDrawCaptionTemp(), MyDrawFrameCaption(), MyDrawFrameScroll(), MyEnumFontFamExProc(), NOTEPAD_LoadSettingsFromRegistry(), NT5_DrawLogoffCaptionText(), NtGdiGetCharABCWidthsW(), NtGdiGetCharWidthW(), NtGdiGetFontData(), NtGdiGetFontUnicodeRanges(), NtGdiGetGlyphIndicesW(), NtGdiGetOutlineTextMetricsInternalW(), NtGdiGetTextFaceW(), NtUserDrawCaptionTemp(), NtUserDrawMenuBarTemp(), OB_Paint(), OnMeasureItem(), OSK_ChooseFont(), PB_Paint(), PlotCharacter(), PROGRESS_SetFont(), RealizeFontInit(), RefreshFontPreview(), RetChangeControlFont(), RosImageProc(), CACListView::SetFont(), ATL::CWindow::SetFont(), SetLrgFont(), CUIFMenu::SetMenuFont(), SetMessageFont(), SetupControls(), SoftModalMessageBox(), START_TEST(), STATIC_PaintTextfn(), SYSLINK_SetFont(), T1_GetTextMetric(), T1_SetData(), TAB_DrawItemInterior(), TAB_SetItemBounds(), test_bitmap_font_glyph_index(), test_combo_setfont(), test_combo_setitemheight(), Test_CreateFontA(), Test_CreateFontIndirectA(), Test_CreateFontIndirectExA(), Test_CreateFontIndirectExW(), Test_CreateFontIndirectW(), test_DrawTextCalcRect(), test_emf_ExtTextOut_on_path(), test_ExtTextOut(), Test_Font(), Test_FontSelectionEntry(), Test_GdiGetCharDimensions(), Test_GetTextFaceAliasW(), test_height(), test_MessageBoxFontTest(), test_mf_SaveDC(), test_SaveDC(), test_setfont(), ThemeDrawCaptionText(), TOOLBAR_SetFont(), TOOLTIPS_SetFont(), TreeListEditLabel(), TreeListProc(), TREEVIEW_Command(), TREEVIEW_SetFont(), UB_Paint(), UITOOLS95_DFC_ButtonCheckRadio(), UITOOLS95_DrawFrameCaption(), UITOOLS95_DrawFrameMenu(), UITOOLS95_DrawFrameScroll(), UpdateFontPreview(), UserDrawCaption(), UserDrawCaptionText(), and WndProc().
Definition at line 89 of file font.h.
Referenced by _Success_(), AcpiHwReadPort(), AcpiHwWritePort(), AcpiOsReadMemory(), AcpiOsReadPciConfiguration(), AcpiOsReadPort(), AcpiOsWriteMemory(), AcpiOsWritePciConfiguration(), AcpiOsWritePort(), AcpiUtFormatNumber(), CAppsListView::AddColumn(), CDowloadingAppsListView::AddColumn(), BaseControlVideoImpl_SetDestinationPosition(), BaseControlVideoImpl_SetSourcePosition(), BaseControlWindowImpl_put_Width(), BaseControlWindowImpl_SetWindowPosition(), BaseWindowImpl_OnSize(), BasicVideo_SetDestinationPosition(), BasicVideo_SetSourcePosition(), BitBlt(), BlDisplayValidOemBitmap(), cdtInit(), ChangeView(), co_IntShowDesktop(), ConioCopyRegion(), ConsolepClearBuffer(), ConvertBmpToGopBlt(), ConWndProc(), copy_interlaced_pixels(), CreateBitmap(), CreateCompatibleBitmap(), CreateConsoleFont2(), CreateConsoleFontEx(), CreateD3D9MipMap(), CreateDIBitmap(), CreateDiscardableBitmap(), CreatePopupWindow(), DECLARE_INTERFACE_(), DIB_1BPP_BitBltSrcCopy_From1BPP(), draw_diag_edge(), DrawBox(), DrawClassicFrame(), DrawListEntries(), DrawPartitionList(), FromMouseCoordinates(), GdipAddPathRectangles(), GdipAddPathRectanglesI(), GdipDrawRectanglesI(), GdipFillRectanglesI(), GuiGetLargestConsoleWindowSize(), HardwareDlgResize(), HistoryDisplayCurrentHistory(), i386PrintText(), IDirect3DDevice9Base_CreateTexture(), InbvBufferToScreenBlt(), InbvScreenToBufferBlt(), InitGL(), InitImageList(), InitMetrics(), IntCreateCompatibleBitmap(), IntDrawArc(), IntDrawDiagEdge(), IntDrawEllipse(), IntEngEnter(), IntEngFillBox(), InternetExplorer_put_Width(), IntFillArc(), IntFillEllipse(), IntFillRect(), IntGdiCreateMaskFromRLE(), IntPatBlt(), LISTVIEW_Size(), LlbFwVideoGetDisplaySize(), CGridView::MapWndProc(), MediaDet_GetBitmapBits(), MediaDet_WriteBitmapBits(), METAFILE_FillRectangles(), MiniTuiDrawProgressBarCenter(), MirrorRgnByWidth(), MyMakeSquareRect(), NC_DrawFrame(), NtGdiBitBlt(), NtGdiCreateCompatibleBitmap(), NtGdiCreatePen(), NtGdiRoundRect(), NtGdiSetBitmapDimension(), NtGdiSetDIBitsToDeviceInternal(), Pc98VideoGetDisplaySize(), PcVideoGetDisplaySize(), PopupError(), PrintDiskData(), PrintEmptyLine(), PrintPartitionData(), ProcessDisplayRegistry(), CAppInfoDisplay::ResizeChildren(), ResizeControls(), ResizeConWnd(), ReSizeGLScene(), ResizeTextConsole(), RleBitBlt(), SetDIBitsToDevice(), ShellUIHelper2_AddDesktopComponent(), Defragment::Start(), test_D3DXCreateRenderToSurface(), test_excludeinfinite(), test_Get_Release_DC(), test_ID3DXRenderToSurface(), test_scans(), ToMouseCoordinates(), TuiCalcMenuBoxSize(), TuiDrawProgressBarCenter(), UefiConsPutChar(), UefiVideoGetDisplaySize(), UITOOLS95_DFC_ButtonCheckRadio(), UITOOLS_MakeSquareRect(), VgaConsoleCreateGraphicsScreen(), VidBufferToScreenBlt(), VideoRenderer_OnSize(), VideoWindow_put_Width(), VideoWindow_SetWindowPosition(), VidScreenToBufferBlt(), VMR9_OnSize(), vsnprintf(), WebBrowser_put_Width(), wWinMain(), XboxConsPutChar(), and XboxVideoGetDisplaySize().