mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-23 14:41:26 +00:00
Initial release of the Windows Terminal source code
This commit introduces all of the Windows Terminal and Console Host source, under the MIT license.
This commit is contained in:
27
src/host/renderFontDefaults.cpp
Normal file
27
src/host/renderFontDefaults.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "renderFontDefaults.hpp"
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
RenderFontDefaults::RenderFontDefaults()
|
||||
{
|
||||
LOG_IF_NTSTATUS_FAILED(TrueTypeFontList::s_Initialize());
|
||||
}
|
||||
|
||||
RenderFontDefaults::~RenderFontDefaults()
|
||||
{
|
||||
LOG_IF_FAILED(TrueTypeFontList::s_Destroy());
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
HRESULT RenderFontDefaults::RetrieveDefaultFontNameForCodepage(const UINT uiCodePage,
|
||||
_Out_writes_(cchFaceName) PWSTR pwszFaceName,
|
||||
const size_t cchFaceName)
|
||||
{
|
||||
NTSTATUS status = TrueTypeFontList::s_SearchByCodePage(uiCodePage, pwszFaceName, cchFaceName);
|
||||
return HRESULT_FROM_NT(status);
|
||||
}
|
||||
Reference in New Issue
Block a user