95cc7d9625
FontInfoBase and it's descendents are missing noexcept annotations, which virally forces other code to not be noexcept as well during AuditMode checks. Apart from adding noexcept, this commit also * Passes std::wstring_view by reference. * Pass the FillLegacyNameBuffer argument as a simple pointer-to-array, allowing us to fill the buffer with a single memcpy. (gsl::span's iterators inhibit any internal STL optimizations.) * Move operator== declarations inside the class to reduce code size. All other changes are an effect of the virality of noexcept. This is an offshoot from #11623. ## Validation Steps Performed * It still compiles ✔️
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
/*++
|
|
Copyright (c) Microsoft Corporation
|
|
Licensed under the MIT license.
|
|
|
|
Module Name:
|
|
- FontInfo.hpp
|
|
|
|
Abstract:
|
|
- This serves as the structure defining font information.
|
|
|
|
- FontInfoDesired - derived from FontInfoBase. It also contains
|
|
a desired size { X, Y }, to be supplied to the GDI's LOGFONT
|
|
structure. Unlike FontInfo, both desired X and Y can be zero.
|
|
|
|
Author(s):
|
|
- Michael Niksa (MiNiksa) 17-Nov-2015
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
#include "FontInfoBase.hpp"
|
|
#include "FontInfo.hpp"
|
|
|
|
class FontInfoDesired : public FontInfoBase
|
|
{
|
|
public:
|
|
FontInfoDesired(const std::wstring_view& faceName,
|
|
const unsigned char family,
|
|
const unsigned int weight,
|
|
const COORD coordSizeDesired,
|
|
const unsigned int uiCodePage) noexcept;
|
|
FontInfoDesired(const FontInfo& fiFont) noexcept;
|
|
|
|
bool operator==(const FontInfoDesired& other) noexcept;
|
|
|
|
COORD GetEngineSize() const noexcept;
|
|
bool IsDefaultRasterFont() const noexcept;
|
|
|
|
private:
|
|
COORD _coordSizeDesired;
|
|
};
|