// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1

#pragma once
#ifndef WINRT_Microsoft_Graphics_Canvas_Text_H
#define WINRT_Microsoft_Graphics_Canvas_Text_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.250303.1"
#include "winrt/Microsoft.Graphics.Canvas.h"
#include "winrt/impl/Microsoft.Graphics.Canvas.2.h"
#include "winrt/impl/Microsoft.Graphics.Canvas.Brushes.2.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.Foundation.Numerics.2.h"
#include "winrt/impl/Windows.UI.2.h"
#include "winrt/impl/Windows.UI.Text.2.h"
#include "winrt/impl/Microsoft.Graphics.Canvas.Text.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetRecommendedRenderingMode(float fontSize, float dpi, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const& measuringMode, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters const& renderingParameters) const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode renderingMode{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRecommendedRenderingMode(fontSize, dpi, static_cast<int32_t>(measuringMode), *(void**)(&renderingParameters), reinterpret_cast<int32_t*>(&renderingMode)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetRecommendedRenderingMode(fontSize, dpi, static_cast<int32_t>(measuringMode), *(void**)(&renderingParameters), reinterpret_cast<int32_t*>(&renderingMode)));
        }
        return renderingMode;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetRecommendedRenderingMode(float fontSize, float dpi, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const& measuringMode, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters const& renderingParameters, winrt::Windows::Foundation::Numerics::float3x2 const& transform, bool isSideways, winrt::Microsoft::Graphics::Canvas::CanvasAntialiasing const& outlineThreshold) const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode renderingMode{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRecommendedRenderingModeWithAllOptions(fontSize, dpi, static_cast<int32_t>(measuringMode), *(void**)(&renderingParameters), impl::bind_in(transform), isSideways, static_cast<int32_t>(outlineThreshold), reinterpret_cast<int32_t*>(&renderingMode)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetRecommendedRenderingModeWithAllOptions(fontSize, dpi, static_cast<int32_t>(measuringMode), *(void**)(&renderingParameters), impl::bind_in(transform), isSideways, static_cast<int32_t>(outlineThreshold), reinterpret_cast<int32_t*>(&renderingMode)));
        }
        return renderingMode;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetRecommendedGridFit(float fontSize, float dpi, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const& measuringMode, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters const& renderingParameters, winrt::Windows::Foundation::Numerics::float3x2 const& transform, bool isSideways, winrt::Microsoft::Graphics::Canvas::CanvasAntialiasing const& outlineThreshold) const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextGridFit gridFit{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRecommendedGridFit(fontSize, dpi, static_cast<int32_t>(measuringMode), *(void**)(&renderingParameters), impl::bind_in(transform), isSideways, static_cast<int32_t>(outlineThreshold), reinterpret_cast<int32_t*>(&gridFit)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetRecommendedGridFit(fontSize, dpi, static_cast<int32_t>(measuringMode), *(void**)(&renderingParameters), impl::bind_in(transform), isSideways, static_cast<int32_t>(outlineThreshold), reinterpret_cast<int32_t*>(&gridFit)));
        }
        return gridFit;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GlyphBox() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphBox(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_GlyphBox(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::SubscriptPosition() const
    {
        winrt::Windows::Foundation::Numerics::float2 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SubscriptPosition(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_SubscriptPosition(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::SubscriptSize() const
    {
        winrt::Windows::Foundation::Size value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SubscriptSize(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_SubscriptSize(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::SuperscriptPosition() const
    {
        winrt::Windows::Foundation::Numerics::float2 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SuperscriptPosition(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_SuperscriptPosition(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::SuperscriptSize() const
    {
        winrt::Windows::Foundation::Size value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SuperscriptSize(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_SuperscriptSize(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::HasTypographicMetrics() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasTypographicMetrics(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_HasTypographicMetrics(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::Ascent() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Ascent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_Ascent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::Descent() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Descent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_Descent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::LineGap() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineGap(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_LineGap(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::CapHeight() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CapHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_CapHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::LowercaseLetterHeight() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LowercaseLetterHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_LowercaseLetterHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::UnderlinePosition() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UnderlinePosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_UnderlinePosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::UnderlineThickness() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UnderlineThickness(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_UnderlineThickness(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::StrikethroughPosition() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StrikethroughPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_StrikethroughPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::StrikethroughThickness() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StrikethroughThickness(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_StrikethroughThickness(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::CaretSlopeRise() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CaretSlopeRise(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_CaretSlopeRise(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::CaretSlopeRun() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CaretSlopeRun(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_CaretSlopeRun(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::CaretOffset() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CaretOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_CaretOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::UnicodeRanges() const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasUnicodeRange* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UnicodeRanges(&valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_UnicodeRanges(&valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasUnicodeRange>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::IsMonospaced() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsMonospaced(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_IsMonospaced(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetVerticalGlyphVariants(array_view<int32_t const> inputElements) const
    {
        uint32_t outputElements_impl_size{};
        int32_t* outputElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetVerticalGlyphVariants(inputElements.size(), get_abi(inputElements), &outputElements_impl_size, &outputElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetVerticalGlyphVariants(inputElements.size(), get_abi(inputElements), &outputElements_impl_size, &outputElements));
        }
        return com_array<int32_t>{ outputElements, outputElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::HasVerticalGlyphVariants() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasVerticalGlyphVariants(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_HasVerticalGlyphVariants(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::FileFormatType() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFileFormatType value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FileFormatType(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_FileFormatType(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::Simulations() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSimulations value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Simulations(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_Simulations(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::IsSymbolFont() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSymbolFont(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_IsSymbolFont(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GlyphCount() const
    {
        uint32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_GlyphCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetGlyphIndices(array_view<uint32_t const> inputElements) const
    {
        uint32_t outputElements_impl_size{};
        int32_t* outputElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphIndices(inputElements.size(), get_abi(inputElements), &outputElements_impl_size, &outputElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetGlyphIndices(inputElements.size(), get_abi(inputElements), &outputElements_impl_size, &outputElements));
        }
        return com_array<int32_t>{ outputElements, outputElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetGlyphMetrics(array_view<int32_t const> inputElements, bool isSideways) const
    {
        uint32_t outputElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphMetrics* outputElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphMetrics(inputElements.size(), get_abi(inputElements), isSideways, &outputElements_impl_size, &outputElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetGlyphMetrics(inputElements.size(), get_abi(inputElements), isSideways, &outputElements_impl_size, &outputElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphMetrics>{ outputElements, outputElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetGdiCompatibleGlyphMetrics(float fontSize, float dpi, winrt::Windows::Foundation::Numerics::float3x2 const& transform, bool useGdiNatural, array_view<int32_t const> inputElements, bool isSideways) const
    {
        uint32_t outputElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphMetrics* outputElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGdiCompatibleGlyphMetrics(fontSize, dpi, impl::bind_in(transform), useGdiNatural, inputElements.size(), get_abi(inputElements), isSideways, &outputElements_impl_size, &outputElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetGdiCompatibleGlyphMetrics(fontSize, dpi, impl::bind_in(transform), useGdiNatural, inputElements.size(), get_abi(inputElements), isSideways, &outputElements_impl_size, &outputElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphMetrics>{ outputElements, outputElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::Weight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Weight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_Weight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::Stretch() const
    {
        winrt::Windows::UI::Text::FontStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::Style() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Style(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_Style(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::FamilyNames() const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FamilyNames(&values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_FamilyNames(&values));
        }
        return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::FaceNames() const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FaceNames(&values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_FaceNames(&values));
        }
        return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetInformationalStrings(winrt::Microsoft::Graphics::Canvas::Text::CanvasFontInformation const& fontInformation) const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetInformationalStrings(static_cast<int32_t>(fontInformation), &values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetInformationalStrings(static_cast<int32_t>(fontInformation), &values));
        }
        return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::HasCharacter(uint32_t unicodeValue) const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->HasCharacter(unicodeValue, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->HasCharacter(unicodeValue, &value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetGlyphRunBounds(winrt::Microsoft::Graphics::Canvas::CanvasDrawingSession const& drawingSession, winrt::Windows::Foundation::Numerics::float2 const& point, float fontSize, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> glyphs, bool isSideways, uint32_t bidiLevel) const
    {
        winrt::Windows::Foundation::Rect bounds{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphRunBounds(*(void**)(&drawingSession), impl::bind_in(point), fontSize, glyphs.size(), get_abi(glyphs), isSideways, bidiLevel, put_abi(bounds)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetGlyphRunBounds(*(void**)(&drawingSession), impl::bind_in(point), fontSize, glyphs.size(), get_abi(glyphs), isSideways, bidiLevel, put_abi(bounds)));
        }
        return bounds;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetGlyphRunBounds(winrt::Microsoft::Graphics::Canvas::CanvasDrawingSession const& drawingSession, winrt::Windows::Foundation::Numerics::float2 const& point, float fontSize, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> glyphs, bool isSideways, uint32_t bidiLevel, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const& measuringMode) const
    {
        winrt::Windows::Foundation::Rect bounds{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphRunBoundsWithMeasuringMode(*(void**)(&drawingSession), impl::bind_in(point), fontSize, glyphs.size(), get_abi(glyphs), isSideways, bidiLevel, static_cast<int32_t>(measuringMode), put_abi(bounds)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetGlyphRunBoundsWithMeasuringMode(*(void**)(&drawingSession), impl::bind_in(point), fontSize, glyphs.size(), get_abi(glyphs), isSideways, bidiLevel, static_cast<int32_t>(measuringMode), put_abi(bounds)));
        }
        return bounds;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::Panose() const
    {
        uint32_t valueElements_impl_size{};
        uint8_t* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Panose(&valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->get_Panose(&valueElements_impl_size, &valueElements));
        }
        return com_array<uint8_t>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetSupportedTypographicFeatureNames(winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script) const
    {
        uint32_t valueElements_impl_size{};
        int32_t* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetSupportedTypographicFeatureNames(impl::bind_in(script), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetSupportedTypographicFeatureNames(impl::bind_in(script), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetSupportedTypographicFeatureNames(winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script, param::hstring const& locale) const
    {
        uint32_t valueElements_impl_size{};
        int32_t* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetSupportedTypographicFeatureNamesWithLocale(impl::bind_in(script), *(void**)(&locale), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetSupportedTypographicFeatureNamesWithLocale(impl::bind_in(script), *(void**)(&locale), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetTypographicFeatureGlyphSupport(winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script, winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName const& typographicFeatureName, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> glyphsElements) const
    {
        uint32_t valueElements_impl_size{};
        bool* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetTypographicFeatureGlyphSupport(impl::bind_in(script), static_cast<int32_t>(typographicFeatureName), glyphsElements.size(), get_abi(glyphsElements), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetTypographicFeatureGlyphSupport(impl::bind_in(script), static_cast<int32_t>(typographicFeatureName), glyphsElements.size(), get_abi(glyphsElements), &valueElements_impl_size, &valueElements));
        }
        return com_array<bool>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontFace<D>::GetTypographicFeatureGlyphSupport(winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script, winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName const& typographicFeatureName, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> glyphsElements, param::hstring const& locale) const
    {
        uint32_t valueElements_impl_size{};
        bool* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetTypographicFeatureGlyphSupportWithLocale(impl::bind_in(script), static_cast<int32_t>(typographicFeatureName), glyphsElements.size(), get_abi(glyphsElements), *(void**)(&locale), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>**)this;
            check_hresult(_winrt_abi_type->GetTypographicFeatureGlyphSupportWithLocale(impl::bind_in(script), static_cast<int32_t>(typographicFeatureName), glyphsElements.size(), get_abi(glyphsElements), *(void**)(&locale), &valueElements_impl_size, &valueElements));
        }
        return com_array<bool>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::Fonts() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Fonts(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->get_Fonts(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::TryFindFontFace(winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const& fontFace, int32_t& index) const
    {
        bool succeeded{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->TryFindFontFace(*(void**)(&fontFace), &index, &succeeded));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->TryFindFontFace(*(void**)(&fontFace), &index, &succeeded));
        }
        return succeeded;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::GetMatchingFonts(array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty const> propertyElements) const
    {
        void* matchingFonts{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetMatchingFontsFromProperties(propertyElements.size(), get_abi(propertyElements), &matchingFonts));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->GetMatchingFontsFromProperties(propertyElements.size(), get_abi(propertyElements), &matchingFonts));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet{ matchingFonts, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::GetMatchingFonts(param::hstring const& familyName, winrt::Windows::UI::Text::FontWeight const& weight, winrt::Windows::UI::Text::FontStretch const& stretch, winrt::Windows::UI::Text::FontStyle const& style) const
    {
        void* matchingFonts{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetMatchingFontsFromWwsFamily(*(void**)(&familyName), impl::bind_in(weight), static_cast<int32_t>(stretch), static_cast<int32_t>(style), &matchingFonts));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->GetMatchingFontsFromWwsFamily(*(void**)(&familyName), impl::bind_in(weight), static_cast<int32_t>(stretch), static_cast<int32_t>(style), &matchingFonts));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet{ matchingFonts, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::CountFontsMatchingProperty(winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty const& property) const
    {
        uint32_t count{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CountFontsMatchingProperty(impl::bind_in(property), &count));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->CountFontsMatchingProperty(impl::bind_in(property), &count));
        }
        return count;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::GetPropertyValues(uint32_t fontIndex, winrt::Microsoft::Graphics::Canvas::Text::CanvasFontPropertyIdentifier const& propertyIdentifier) const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPropertyValuesFromIndex(fontIndex, static_cast<int32_t>(propertyIdentifier), &values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->GetPropertyValuesFromIndex(fontIndex, static_cast<int32_t>(propertyIdentifier), &values));
        }
        return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::GetPropertyValues(winrt::Microsoft::Graphics::Canvas::Text::CanvasFontPropertyIdentifier const& propertyIdentifier, param::hstring const& preferredLocaleNames) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasFontProperty* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPropertyValuesFromIdentifier(static_cast<int32_t>(propertyIdentifier), *(void**)(&preferredLocaleNames), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->GetPropertyValuesFromIdentifier(static_cast<int32_t>(propertyIdentifier), *(void**)(&preferredLocaleNames), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSet<D>::GetPropertyValues(winrt::Microsoft::Graphics::Canvas::Text::CanvasFontPropertyIdentifier const& propertyIdentifier) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasFontProperty* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPropertyValues(static_cast<int32_t>(propertyIdentifier), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>**)this;
            check_hresult(_winrt_abi_type->GetPropertyValues(static_cast<int32_t>(propertyIdentifier), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSetFactory<D>::Create(winrt::Windows::Foundation::Uri const& uri) const
    {
        void* fontSet{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Create(*(void**)(&uri), &fontSet));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetFactory>**)this;
            check_hresult(_winrt_abi_type->Create(*(void**)(&uri), &fontSet));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet{ fontSet, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasFontSetStatics<D>::GetSystemFontSet() const
    {
        void* fontSet{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetSystemFontSet(&fontSet));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetStatics>**)this;
            check_hresult(_winrt_abi_type->GetSystemFontSet(&fontSet));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet{ fontSet, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasNumberSubstitutionFactory<D>::Create(winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitutionMethod const& method) const
    {
        void* canvasNumberSubstitution{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Create(static_cast<int32_t>(method), &canvasNumberSubstitution));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory>**)this;
            check_hresult(_winrt_abi_type->Create(static_cast<int32_t>(method), &canvasNumberSubstitution));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution{ canvasNumberSubstitution, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasNumberSubstitutionFactory<D>::CreateWithLocaleAndIgnoreOverrides(winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitutionMethod const& method, param::hstring const& localeName, bool ignoreEnvironmentOverrides) const
    {
        void* canvasNumberSubstitution{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateWithLocaleAndIgnoreOverrides(static_cast<int32_t>(method), *(void**)(&localeName), ignoreEnvironmentOverrides, &canvasNumberSubstitution));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory>**)this;
            check_hresult(_winrt_abi_type->CreateWithLocaleAndIgnoreOverrides(static_cast<int32_t>(method), *(void**)(&localeName), ignoreEnvironmentOverrides, &canvasNumberSubstitution));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution{ canvasNumberSubstitution, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasScaledFont<D>::FontFace() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFace(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont>**)this;
            check_hresult(_winrt_abi_type->get_FontFace(&value));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasScaledFont<D>::ScaleFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScaleFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont>**)this;
            check_hresult(_winrt_abi_type->get_ScaleFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetFonts(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat const& textFormat) const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFontsUsingSystemFontSet(*(void**)(&textFormat), &values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetFontsUsingSystemFontSet(*(void**)(&textFormat), &values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasScaledFont>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetFonts(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat const& textFormat, winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet const& fontSet) const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFonts(*(void**)(&textFormat), *(void**)(&fontSet), &values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetFonts(*(void**)(&textFormat), *(void**)(&fontSet), &values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasScaledFont>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetBidi() const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBidi(&values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetBidi(&values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedBidi>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetBidi(param::hstring const& locale) const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBidiWithLocale(*(void**)(&locale), &values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetBidiWithLocale(*(void**)(&locale), &values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedBidi>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetBreakpoints() const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedBreakpoint* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBreakpoints(&valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetBreakpoints(&valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedBreakpoint>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetBreakpoints(param::hstring const& locale) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedBreakpoint* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBreakpointsWithLocale(*(void**)(&locale), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetBreakpointsWithLocale(*(void**)(&locale), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedBreakpoint>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetNumberSubstitutions() const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetNumberSubstitutions(&values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetNumberSubstitutions(&values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetScript() const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetScript(&values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetScript(&values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetScript(param::hstring const& locale) const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetScriptWithLocale(*(void**)(&locale), &values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetScriptWithLocale(*(void**)(&locale), &values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetGlyphOrientations() const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphOrientations(&values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetGlyphOrientations(&values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedGlyphOrientation>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetGlyphOrientations(param::hstring const& locale) const
    {
        void* values{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphOrientationsWithLocale(*(void**)(&locale), &values));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetGlyphOrientationsWithLocale(*(void**)(&locale), &values));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedGlyphOrientation>>{ values, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetScriptProperties(winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& analyzedScript) const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasScriptProperties scriptProperties{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetScriptProperties(impl::bind_in(analyzedScript), put_abi(scriptProperties)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetScriptProperties(impl::bind_in(analyzedScript), put_abi(scriptProperties)));
        }
        return scriptProperties;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetGlyphs(winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange const& characterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const& fontFace, float fontSize, bool isSideways, bool isRightToLeft, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphs(impl::bind_in(characterRange), *(void**)(&fontFace), fontSize, isSideways, isRightToLeft, impl::bind_in(script), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetGlyphs(impl::bind_in(characterRange), *(void**)(&fontFace), fontSize, isSideways, isRightToLeft, impl::bind_in(script), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetGlyphs(winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange const& characterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const& fontFace, float fontSize, bool isSideways, bool isRightToLeft, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script, param::hstring const& locale, winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution const& numberSubstitution, param::vector_view<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasTypography>> const& typographyRanges, com_array<int32_t>& clusterMapIndicesElements, com_array<bool>& isShapedAloneGlyphsElements, com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping>& glyphShapingResultsElements) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphsWithAllOptions(impl::bind_in(characterRange), *(void**)(&fontFace), fontSize, isSideways, isRightToLeft, impl::bind_in(script), *(void**)(&locale), *(void**)(&numberSubstitution), *(void**)(&typographyRanges), impl::put_size_abi(clusterMapIndicesElements), put_abi(clusterMapIndicesElements), impl::put_size_abi(isShapedAloneGlyphsElements), put_abi(isShapedAloneGlyphsElements), impl::put_size_abi(glyphShapingResultsElements), put_abi(glyphShapingResultsElements), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetGlyphsWithAllOptions(impl::bind_in(characterRange), *(void**)(&fontFace), fontSize, isSideways, isRightToLeft, impl::bind_in(script), *(void**)(&locale), *(void**)(&numberSubstitution), *(void**)(&typographyRanges), impl::put_size_abi(clusterMapIndicesElements), put_abi(clusterMapIndicesElements), impl::put_size_abi(isShapedAloneGlyphsElements), put_abi(isShapedAloneGlyphsElements), impl::put_size_abi(glyphShapingResultsElements), put_abi(glyphShapingResultsElements), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::GetJustificationOpportunities(winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange const& characterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const& fontFace, float fontSize, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script, array_view<int32_t const> clusterMapIndicesElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const> glyphShapingResultsElements) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasJustificationOpportunity* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetJustificationOpportunities(impl::bind_in(characterRange), *(void**)(&fontFace), fontSize, impl::bind_in(script), clusterMapIndicesElements.size(), get_abi(clusterMapIndicesElements), glyphShapingResultsElements.size(), get_abi(glyphShapingResultsElements), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->GetJustificationOpportunities(impl::bind_in(characterRange), *(void**)(&fontFace), fontSize, impl::bind_in(script), clusterMapIndicesElements.size(), get_abi(clusterMapIndicesElements), glyphShapingResultsElements.size(), get_abi(glyphShapingResultsElements), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasJustificationOpportunity>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::ApplyJustificationOpportunities(float lineWidth, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasJustificationOpportunity const> justificationOpportunitiesElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> sourceGlyphsElements) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ApplyJustificationOpportunities(lineWidth, justificationOpportunitiesElements.size(), get_abi(justificationOpportunitiesElements), sourceGlyphsElements.size(), get_abi(sourceGlyphsElements), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->ApplyJustificationOpportunities(lineWidth, justificationOpportunitiesElements.size(), get_abi(justificationOpportunitiesElements), sourceGlyphsElements.size(), get_abi(sourceGlyphsElements), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::AddGlyphsAfterJustification(winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const& fontFace, float fontSize, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script, array_view<int32_t const> clusterMapIndicesElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> originalGlyphsElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> justifiedGlyphsElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const> glyphShapingResultsElements) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddGlyphsAfterJustification(*(void**)(&fontFace), fontSize, impl::bind_in(script), clusterMapIndicesElements.size(), get_abi(clusterMapIndicesElements), originalGlyphsElements.size(), get_abi(originalGlyphsElements), justifiedGlyphsElements.size(), get_abi(justifiedGlyphsElements), glyphShapingResultsElements.size(), get_abi(glyphShapingResultsElements), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->AddGlyphsAfterJustification(*(void**)(&fontFace), fontSize, impl::bind_in(script), clusterMapIndicesElements.size(), get_abi(clusterMapIndicesElements), originalGlyphsElements.size(), get_abi(originalGlyphsElements), justifiedGlyphsElements.size(), get_abi(justifiedGlyphsElements), glyphShapingResultsElements.size(), get_abi(glyphShapingResultsElements), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzer<D>::AddGlyphsAfterJustification(winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const& fontFace, float fontSize, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const& script, array_view<int32_t const> clusterMapIndicesElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> originalGlyphsElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> justifiedGlyphsElements, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const> glyphShapingResultsElements, com_array<int32_t>& outputClusterMapIndicesElements) const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddGlyphsAfterJustificationWithClusterMap(*(void**)(&fontFace), fontSize, impl::bind_in(script), clusterMapIndicesElements.size(), get_abi(clusterMapIndicesElements), originalGlyphsElements.size(), get_abi(originalGlyphsElements), justifiedGlyphsElements.size(), get_abi(justifiedGlyphsElements), glyphShapingResultsElements.size(), get_abi(glyphShapingResultsElements), impl::put_size_abi(outputClusterMapIndicesElements), put_abi(outputClusterMapIndicesElements), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>**)this;
            check_hresult(_winrt_abi_type->AddGlyphsAfterJustificationWithClusterMap(*(void**)(&fontFace), fontSize, impl::bind_in(script), clusterMapIndicesElements.size(), get_abi(clusterMapIndicesElements), originalGlyphsElements.size(), get_abi(originalGlyphsElements), justifiedGlyphsElements.size(), get_abi(justifiedGlyphsElements), glyphShapingResultsElements.size(), get_abi(glyphShapingResultsElements), impl::put_size_abi(outputClusterMapIndicesElements), put_abi(outputClusterMapIndicesElements), &valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzerFactory<D>::Create(param::hstring const& text, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection) const
    {
        void* canvasTextAnalyzer{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Create(*(void**)(&text), static_cast<int32_t>(textDirection), &canvasTextAnalyzer));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>**)this;
            check_hresult(_winrt_abi_type->Create(*(void**)(&text), static_cast<int32_t>(textDirection), &canvasTextAnalyzer));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasTextAnalyzer{ canvasTextAnalyzer, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzerFactory<D>::CreateWithNumberSubstitutionAndVerticalGlyphOrientationAndBidiLevel(param::hstring const& text, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection, winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution const& numberSubstitution, winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation const& verticalGlyphOrientation, uint32_t bidiLevel) const
    {
        void* canvasTextAnalyzer{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateWithNumberSubstitutionAndVerticalGlyphOrientationAndBidiLevel(*(void**)(&text), static_cast<int32_t>(textDirection), *(void**)(&numberSubstitution), static_cast<int32_t>(verticalGlyphOrientation), bidiLevel, &canvasTextAnalyzer));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateWithNumberSubstitutionAndVerticalGlyphOrientationAndBidiLevel(*(void**)(&text), static_cast<int32_t>(textDirection), *(void**)(&numberSubstitution), static_cast<int32_t>(verticalGlyphOrientation), bidiLevel, &canvasTextAnalyzer));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasTextAnalyzer{ canvasTextAnalyzer, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzerFactory<D>::CreateWithOptions(param::hstring const& text, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions const& options) const
    {
        void* canvasTextAnalyzer{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateWithOptions(*(void**)(&text), static_cast<int32_t>(textDirection), *(void**)(&options), &canvasTextAnalyzer));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateWithOptions(*(void**)(&text), static_cast<int32_t>(textDirection), *(void**)(&options), &canvasTextAnalyzer));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasTextAnalyzer{ canvasTextAnalyzer, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzerOptions<D>::GetLocaleName(int32_t characterIndex, int32_t& characterCount) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLocaleName(characterIndex, &characterCount, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)this;
            check_hresult(_winrt_abi_type->GetLocaleName(characterIndex, &characterCount, &value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzerOptions<D>::GetNumberSubstitution(int32_t characterIndex, int32_t& characterCount) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetNumberSubstitution(characterIndex, &characterCount, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)this;
            check_hresult(_winrt_abi_type->GetNumberSubstitution(characterIndex, &characterCount, &value));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzerOptions<D>::GetVerticalGlyphOrientation(int32_t characterIndex, int32_t& characterCount) const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetVerticalGlyphOrientation(characterIndex, &characterCount, reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)this;
            check_hresult(_winrt_abi_type->GetVerticalGlyphOrientation(characterIndex, &characterCount, reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextAnalyzerOptions<D>::GetBidiLevel(int32_t characterIndex, int32_t& characterCount) const
    {
        uint32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBidiLevel(characterIndex, &characterCount, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>**)this;
            check_hresult(_winrt_abi_type->GetBidiLevel(characterIndex, &characterCount, &value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::Direction() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Direction(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_Direction(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::Direction(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Direction(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_Direction(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontFamily(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontSize() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontSize(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontStretch() const
    {
        winrt::Windows::UI::Text::FontStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontStretch(winrt::Windows::UI::Text::FontStretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::FontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::IncrementalTabStop() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IncrementalTabStop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_IncrementalTabStop(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::IncrementalTabStop(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IncrementalTabStop(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_IncrementalTabStop(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LineSpacing() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LineSpacing(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_LineSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LineSpacingBaseline() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacingBaseline(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacingBaseline(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LineSpacingBaseline(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineSpacingBaseline(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_LineSpacingBaseline(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LocaleName() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LocaleName(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_LocaleName(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LocaleName(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LocaleName(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_LocaleName(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::VerticalAlignment() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::VerticalAlignment(winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_VerticalAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::HorizontalAlignment() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::HorizontalAlignment(winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingGranularity() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingGranularity(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingGranularity(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingGranularity(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingGranularity(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingGranularity(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingDelimiter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiter(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingDelimiter(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingDelimiterCount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiterCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiterCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingDelimiterCount(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiterCount(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiterCount(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::WordWrapping() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WordWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_WordWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::WordWrapping(winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_WordWrapping(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_WordWrapping(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::Options() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Options(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_Options(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::Options(winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Options(static_cast<uint32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_Options(static_cast<uint32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::VerticalGlyphOrientation() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalGlyphOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_VerticalGlyphOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::VerticalGlyphOrientation(winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalGlyphOrientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_VerticalGlyphOrientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::OpticalAlignment() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_OpticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::OpticalAlignment(winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OpticalAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_OpticalAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LastLineWrapping() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LastLineWrapping(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_LastLineWrapping(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LastLineWrapping(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LastLineWrapping(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_LastLineWrapping(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LineSpacingMode() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacingMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacingMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::LineSpacingMode(winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineSpacingMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_LineSpacingMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingSign() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingSign(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingSign(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::TrimmingSign(winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingSign(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingSign(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::CustomTrimmingSign() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CustomTrimmingSign(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->get_CustomTrimmingSign(&value));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormat<D>::CustomTrimmingSign(winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CustomTrimmingSign(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>**)this;
            check_hresult(_winrt_abi_type->put_CustomTrimmingSign(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormatStatics<D>::GetSystemFontFamilies() const
    {
        uint32_t valueElements_impl_size{};
        void** valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetSystemFontFamilies(&valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics>**)this;
            check_hresult(_winrt_abi_type->GetSystemFontFamilies(&valueElements_impl_size, &valueElements));
        }
        return com_array<hstring>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextFormatStatics<D>::GetSystemFontFamilies(param::vector_view<hstring> const& localeList) const
    {
        uint32_t valueElements_impl_size{};
        void** valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetSystemFontFamiliesFromLocaleList(*(void**)(&localeList), &valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics>**)this;
            check_hresult(_winrt_abi_type->GetSystemFontFamiliesFromLocaleList(*(void**)(&localeList), &valueElements_impl_size, &valueElements));
        }
        return com_array<hstring>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextInlineObject<D>::Draw(winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer const& textRenderer, winrt::Windows::Foundation::Numerics::float2 const& point, bool isSideways, bool isRightToLeft, winrt::Windows::Foundation::IInspectable const& brush) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Draw(*(void**)(&textRenderer), impl::bind_in(point), isSideways, isRightToLeft, *(void**)(&brush)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)this;
            check_hresult(_winrt_abi_type->Draw(*(void**)(&textRenderer), impl::bind_in(point), isSideways, isRightToLeft, *(void**)(&brush)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextInlineObject<D>::Size() const
    {
        winrt::Windows::Foundation::Size value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Size(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)this;
            check_hresult(_winrt_abi_type->get_Size(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextInlineObject<D>::Baseline() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Baseline(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)this;
            check_hresult(_winrt_abi_type->get_Baseline(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextInlineObject<D>::SupportsSideways() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SupportsSideways(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)this;
            check_hresult(_winrt_abi_type->get_SupportsSideways(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextInlineObject<D>::DrawBounds() const
    {
        winrt::Windows::Foundation::Rect bounds{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DrawBounds(put_abi(bounds)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)this;
            check_hresult(_winrt_abi_type->get_DrawBounds(put_abi(bounds)));
        }
        return bounds;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextInlineObject<D>::BreakBefore() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasLineBreakCondition value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BreakBefore(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)this;
            check_hresult(_winrt_abi_type->get_BreakBefore(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextInlineObject<D>::BreakAfter() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasLineBreakCondition value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BreakAfter(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>**)this;
            check_hresult(_winrt_abi_type->get_BreakAfter(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetFormatChangeIndices() const
    {
        uint32_t stops_impl_size{};
        int32_t* stops{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFormatChangeIndices(&stops_impl_size, &stops));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetFormatChangeIndices(&stops_impl_size, &stops));
        }
        return com_array<int32_t>{ stops, stops_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::Direction() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Direction(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_Direction(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::Direction(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Direction(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_Direction(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DefaultFontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultFontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_DefaultFontFamily(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DefaultFontSize() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultFontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_DefaultFontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DefaultFontStretch() const
    {
        winrt::Windows::UI::Text::FontStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultFontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_DefaultFontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DefaultFontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_DefaultFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DefaultFontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultFontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_DefaultFontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::IncrementalTabStop() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IncrementalTabStop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_IncrementalTabStop(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::IncrementalTabStop(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IncrementalTabStop(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_IncrementalTabStop(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineSpacing() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineSpacing(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_LineSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineSpacingBaseline() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacingBaseline(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacingBaseline(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineSpacingBaseline(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineSpacingBaseline(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_LineSpacingBaseline(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DefaultLocaleName() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultLocaleName(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_DefaultLocaleName(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::VerticalAlignment() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::VerticalAlignment(winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_VerticalAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HorizontalAlignment() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HorizontalAlignment(winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingGranularity() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingGranularity(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingGranularity(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingGranularity(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingGranularity(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingGranularity(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingDelimiter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiter(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingDelimiter(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingDelimiterCount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiterCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingDelimiterCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingDelimiterCount(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiterCount(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingDelimiterCount(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::WordWrapping() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WordWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_WordWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::WordWrapping(winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_WordWrapping(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_WordWrapping(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::Options() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Options(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_Options(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::Options(winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Options(static_cast<uint32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_Options(static_cast<uint32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineSpacingMode() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacingMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacingMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineSpacingMode(winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineSpacingMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_LineSpacingMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingSign() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TrimmingSign(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_TrimmingSign(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::TrimmingSign(winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TrimmingSign(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_TrimmingSign(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::CustomTrimmingSign() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CustomTrimmingSign(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_CustomTrimmingSign(&value));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::CustomTrimmingSign(winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CustomTrimmingSign(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_CustomTrimmingSign(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::RequestedSize() const
    {
        winrt::Windows::Foundation::Size value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RequestedSize(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_RequestedSize(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::RequestedSize(winrt::Windows::Foundation::Size const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RequestedSize(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_RequestedSize(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetMinimumLineLength() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetMinimumLineLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetMinimumLineLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetBrush(int32_t characterIndex) const
    {
        void* brush{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBrush(characterIndex, &brush));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetBrush(characterIndex, &brush));
        }
        return winrt::Microsoft::Graphics::Canvas::Brushes::ICanvasBrush{ brush, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetCustomBrush(int32_t characterIndex) const
    {
        void* brush{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetCustomBrush(characterIndex, &brush));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetCustomBrush(characterIndex, &brush));
        }
        return winrt::Windows::Foundation::IInspectable{ brush, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetFontFamily(int32_t characterIndex) const
    {
        void* fontFamily{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFontFamily(characterIndex, &fontFamily));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetFontFamily(characterIndex, &fontFamily));
        }
        return hstring{ fontFamily, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetFontSize(int32_t characterIndex) const
    {
        float fontSize{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFontSize(characterIndex, &fontSize));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetFontSize(characterIndex, &fontSize));
        }
        return fontSize;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetFontStretch(int32_t characterIndex) const
    {
        winrt::Windows::UI::Text::FontStretch fontStretch{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFontStretch(characterIndex, reinterpret_cast<int32_t*>(&fontStretch)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetFontStretch(characterIndex, reinterpret_cast<int32_t*>(&fontStretch)));
        }
        return fontStretch;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetFontStyle(int32_t characterIndex) const
    {
        winrt::Windows::UI::Text::FontStyle fontStyle{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFontStyle(characterIndex, reinterpret_cast<int32_t*>(&fontStyle)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetFontStyle(characterIndex, reinterpret_cast<int32_t*>(&fontStyle)));
        }
        return fontStyle;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetFontWeight(int32_t characterIndex) const
    {
        winrt::Windows::UI::Text::FontWeight fontWeight{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFontWeight(characterIndex, put_abi(fontWeight)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetFontWeight(characterIndex, put_abi(fontWeight)));
        }
        return fontWeight;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetLocaleName(int32_t characterIndex) const
    {
        void* localeName{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLocaleName(characterIndex, &localeName));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetLocaleName(characterIndex, &localeName));
        }
        return hstring{ localeName, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetStrikethrough(int32_t characterIndex) const
    {
        bool hasStrikethrough{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetStrikethrough(characterIndex, &hasStrikethrough));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetStrikethrough(characterIndex, &hasStrikethrough));
        }
        return hasStrikethrough;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetUnderline(int32_t characterIndex) const
    {
        bool hasUnderline{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetUnderline(characterIndex, &hasUnderline));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetUnderline(characterIndex, &hasUnderline));
        }
        return hasUnderline;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetInlineObject(int32_t characterIndex) const
    {
        void* inlineObject{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetInlineObject(characterIndex, &inlineObject));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetInlineObject(characterIndex, &inlineObject));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject{ inlineObject, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetColor(int32_t characterIndex, int32_t characterCount, winrt::Windows::UI::Color const& color) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetColor(characterIndex, characterCount, impl::bind_in(color)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetColor(characterIndex, characterCount, impl::bind_in(color)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetBrush(int32_t characterIndex, int32_t characterCount, winrt::Microsoft::Graphics::Canvas::Brushes::ICanvasBrush const& brush) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetBrush(characterIndex, characterCount, *(void**)(&brush)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetBrush(characterIndex, characterCount, *(void**)(&brush)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetCustomBrush(int32_t characterIndex, int32_t characterCount, winrt::Windows::Foundation::IInspectable const& brush) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetCustomBrush(characterIndex, characterCount, *(void**)(&brush)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetCustomBrush(characterIndex, characterCount, *(void**)(&brush)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetFontFamily(int32_t characterIndex, int32_t characterCount, param::hstring const& fontFamily) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetFontFamily(characterIndex, characterCount, *(void**)(&fontFamily)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetFontFamily(characterIndex, characterCount, *(void**)(&fontFamily)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetFontSize(int32_t characterIndex, int32_t characterCount, float fontSize) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetFontSize(characterIndex, characterCount, fontSize));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetFontSize(characterIndex, characterCount, fontSize));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetFontStretch(int32_t characterIndex, int32_t characterCount, winrt::Windows::UI::Text::FontStretch const& fontStretch) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetFontStretch(characterIndex, characterCount, static_cast<int32_t>(fontStretch)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetFontStretch(characterIndex, characterCount, static_cast<int32_t>(fontStretch)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetFontStyle(int32_t characterIndex, int32_t characterCount, winrt::Windows::UI::Text::FontStyle const& fontStyle) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetFontStyle(characterIndex, characterCount, static_cast<int32_t>(fontStyle)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetFontStyle(characterIndex, characterCount, static_cast<int32_t>(fontStyle)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetFontWeight(int32_t characterIndex, int32_t characterCount, winrt::Windows::UI::Text::FontWeight const& fontWeight) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetFontWeight(characterIndex, characterCount, impl::bind_in(fontWeight)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetFontWeight(characterIndex, characterCount, impl::bind_in(fontWeight)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetLocaleName(int32_t characterIndex, int32_t characterCount, param::hstring const& name) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetLocaleName(characterIndex, characterCount, *(void**)(&name)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetLocaleName(characterIndex, characterCount, *(void**)(&name)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetStrikethrough(int32_t characterIndex, int32_t characterCount, bool hasStrikethrough) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetStrikethrough(characterIndex, characterCount, hasStrikethrough));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetStrikethrough(characterIndex, characterCount, hasStrikethrough));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetUnderline(int32_t characterIndex, int32_t characterCount, bool hasUnderline) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetUnderline(characterIndex, characterCount, hasUnderline));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetUnderline(characterIndex, characterCount, hasUnderline));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetInlineObject(int32_t characterIndex, int32_t characterCount, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const& inlineObject) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetInlineObject(characterIndex, characterCount, *(void**)(&inlineObject)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetInlineObject(characterIndex, characterCount, *(void**)(&inlineObject)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DrawToTextRenderer(winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer const& textRenderer, winrt::Windows::Foundation::Numerics::float2 const& position) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DrawToTextRenderer(*(void**)(&textRenderer), impl::bind_in(position)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->DrawToTextRenderer(*(void**)(&textRenderer), impl::bind_in(position)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DrawToTextRenderer(winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer const& textRenderer, float x, float y) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DrawToTextRendererWithCoords(*(void**)(&textRenderer), x, y));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->DrawToTextRendererWithCoords(*(void**)(&textRenderer), x, y));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineMetrics() const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasLineMetrics* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineMetrics(&valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LineMetrics(&valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasLineMetrics>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::ClusterMetrics() const
    {
        uint32_t valueElements_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasClusterMetrics* valueElements{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClusterMetrics(&valueElements_impl_size, &valueElements));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_ClusterMetrics(&valueElements_impl_size, &valueElements));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasClusterMetrics>{ valueElements, valueElements_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetTypography(int32_t characterIndex, int32_t characterCount, winrt::Microsoft::Graphics::Canvas::Text::CanvasTypography const& typography) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetTypography(characterIndex, characterCount, *(void**)(&typography)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetTypography(characterIndex, characterCount, *(void**)(&typography)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetTypography(int32_t characterIndex) const
    {
        void* typography{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetTypography(characterIndex, &typography));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetTypography(characterIndex, &typography));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasTypography{ typography, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LayoutBounds() const
    {
        winrt::Windows::Foundation::Rect bounds{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutBounds(put_abi(bounds)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LayoutBounds(put_abi(bounds)));
        }
        return bounds;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LayoutBoundsIncludingTrailingWhitespace() const
    {
        winrt::Windows::Foundation::Rect bounds{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutBoundsIncludingTrailingWhitespace(put_abi(bounds)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LayoutBoundsIncludingTrailingWhitespace(put_abi(bounds)));
        }
        return bounds;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LineCount() const
    {
        int32_t lineCount{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineCount(&lineCount));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LineCount(&lineCount));
        }
        return lineCount;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::MaximumBidiReorderingDepth() const
    {
        int32_t depth{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumBidiReorderingDepth(&depth));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_MaximumBidiReorderingDepth(&depth));
        }
        return depth;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::DrawBounds() const
    {
        winrt::Windows::Foundation::Rect bounds{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DrawBounds(put_abi(bounds)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_DrawBounds(put_abi(bounds)));
        }
        return bounds;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HitTest(winrt::Windows::Foundation::Numerics::float2 const& point) const
    {
        bool isHit{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->HitTest(impl::bind_in(point), &isHit));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->HitTest(impl::bind_in(point), &isHit));
        }
        return isHit;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HitTest(float x, float y) const
    {
        bool isHit{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->HitTestWithCoords(x, y, &isHit));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->HitTestWithCoords(x, y, &isHit));
        }
        return isHit;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HitTest(winrt::Windows::Foundation::Numerics::float2 const& point, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion& textLayoutRegion) const
    {
        bool isHit{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->HitTestWithDescription(impl::bind_in(point), impl::bind_out(textLayoutRegion), &isHit));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->HitTestWithDescription(impl::bind_in(point), impl::bind_out(textLayoutRegion), &isHit));
        }
        return isHit;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HitTest(float x, float y, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion& textLayoutRegion) const
    {
        bool isHit{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->HitTestWithDescriptionAndCoords(x, y, impl::bind_out(textLayoutRegion), &isHit));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->HitTestWithDescriptionAndCoords(x, y, impl::bind_out(textLayoutRegion), &isHit));
        }
        return isHit;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HitTest(winrt::Windows::Foundation::Numerics::float2 const& point, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion& textLayoutRegion, bool& trailingSideOfCharacter) const
    {
        bool isHit{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->HitTestWithDescriptionAndTrailingSide(impl::bind_in(point), impl::bind_out(textLayoutRegion), &trailingSideOfCharacter, &isHit));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->HitTestWithDescriptionAndTrailingSide(impl::bind_in(point), impl::bind_out(textLayoutRegion), &trailingSideOfCharacter, &isHit));
        }
        return isHit;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::HitTest(float x, float y, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion& textLayoutRegion, bool& trailingSideOfCharacter) const
    {
        bool isHit{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->HitTestWithDescriptionAndCoordsAndTrailingSide(x, y, impl::bind_out(textLayoutRegion), &trailingSideOfCharacter, &isHit));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->HitTestWithDescriptionAndCoordsAndTrailingSide(x, y, impl::bind_out(textLayoutRegion), &trailingSideOfCharacter, &isHit));
        }
        return isHit;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetCaretPosition(int32_t characterIndex, bool trailingSideOfCharacter) const
    {
        winrt::Windows::Foundation::Numerics::float2 location{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetCaretPosition(characterIndex, trailingSideOfCharacter, put_abi(location)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetCaretPosition(characterIndex, trailingSideOfCharacter, put_abi(location)));
        }
        return location;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetCaretPosition(int32_t characterIndex, bool trailingSideOfCharacter, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion& textLayoutRegion) const
    {
        winrt::Windows::Foundation::Numerics::float2 location{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetCaretPositionWithDescription(characterIndex, trailingSideOfCharacter, impl::bind_out(textLayoutRegion), put_abi(location)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetCaretPositionWithDescription(characterIndex, trailingSideOfCharacter, impl::bind_out(textLayoutRegion), put_abi(location)));
        }
        return location;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetCharacterRegions(int32_t characterIndex, int32_t characterCount) const
    {
        uint32_t hitTestDescriptions_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasTextLayoutRegion* hitTestDescriptions{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetCharacterRegions(characterIndex, characterCount, &hitTestDescriptions_impl_size, &hitTestDescriptions));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetCharacterRegions(characterIndex, characterCount, &hitTestDescriptions_impl_size, &hitTestDescriptions));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion>{ hitTestDescriptions, hitTestDescriptions_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetPairKerning(int32_t characterIndex) const
    {
        bool hasPairKerning{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPairKerning(characterIndex, &hasPairKerning));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetPairKerning(characterIndex, &hasPairKerning));
        }
        return hasPairKerning;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetPairKerning(int32_t characterIndex, int32_t characterCount, bool hasPairKerning) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetPairKerning(characterIndex, characterCount, hasPairKerning));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetPairKerning(characterIndex, characterCount, hasPairKerning));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetLeadingCharacterSpacing(int32_t characterIndex) const
    {
        float leadingSpacing{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLeadingCharacterSpacing(characterIndex, &leadingSpacing));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetLeadingCharacterSpacing(characterIndex, &leadingSpacing));
        }
        return leadingSpacing;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetTrailingCharacterSpacing(int32_t characterIndex) const
    {
        float trailingSpacing{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetTrailingCharacterSpacing(characterIndex, &trailingSpacing));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetTrailingCharacterSpacing(characterIndex, &trailingSpacing));
        }
        return trailingSpacing;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::GetMinimumCharacterAdvance(int32_t characterIndex) const
    {
        float minimumAdvance{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetMinimumCharacterAdvance(characterIndex, &minimumAdvance));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->GetMinimumCharacterAdvance(characterIndex, &minimumAdvance));
        }
        return minimumAdvance;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::SetCharacterSpacing(int32_t characterIndex, int32_t characterCount, float leadingSpacing, float trailingSpacing, float minimumAdvance) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetCharacterSpacing(characterIndex, characterCount, leadingSpacing, trailingSpacing, minimumAdvance));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->SetCharacterSpacing(characterIndex, characterCount, leadingSpacing, trailingSpacing, minimumAdvance));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::VerticalGlyphOrientation() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalGlyphOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_VerticalGlyphOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::VerticalGlyphOrientation(winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalGlyphOrientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_VerticalGlyphOrientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::OpticalAlignment() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_OpticalAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::OpticalAlignment(winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OpticalAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_OpticalAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LastLineWrapping() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LastLineWrapping(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_LastLineWrapping(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::LastLineWrapping(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LastLineWrapping(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->put_LastLineWrapping(value));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayout<D>::Device() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Device(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>**)this;
            check_hresult(_winrt_abi_type->get_Device(&value));
        }
        return winrt::Microsoft::Graphics::Canvas::CanvasDevice{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayoutFactory<D>::Create(winrt::Microsoft::Graphics::Canvas::ICanvasResourceCreator const& resourceCreator, param::hstring const& textString, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat const& textFormat, float requestedWidth, float requestedHeight) const
    {
        void* canvasTextLayout{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Create(*(void**)(&resourceCreator), *(void**)(&textString), *(void**)(&textFormat), requestedWidth, requestedHeight, &canvasTextLayout));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutFactory>**)this;
            check_hresult(_winrt_abi_type->Create(*(void**)(&resourceCreator), *(void**)(&textString), *(void**)(&textFormat), requestedWidth, requestedHeight, &canvasTextLayout));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayout{ canvasTextLayout, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextLayoutStatics<D>::GetGlyphOrientationTransform(winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const& glyphOrientation, bool isSideways, winrt::Windows::Foundation::Numerics::float2 const& position) const
    {
        winrt::Windows::Foundation::Numerics::float3x2 transform{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetGlyphOrientationTransform(static_cast<int32_t>(glyphOrientation), isSideways, impl::bind_in(position), put_abi(transform)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->GetGlyphOrientationTransform(static_cast<int32_t>(glyphOrientation), isSideways, impl::bind_in(position), put_abi(transform)));
        }
        return transform;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderer<D>::DrawGlyphRun(winrt::Windows::Foundation::Numerics::float2 const& point, winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const& fontFace, float fontSize, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const> glyphs, bool isSideways, uint32_t bidiLevel, winrt::Windows::Foundation::IInspectable const& brush, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const& measuringMode, param::hstring const& localeName, param::hstring const& textString, array_view<int32_t const> clusterMapIndices, uint32_t characterIndex, winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const& glyphOrientation) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DrawGlyphRun(impl::bind_in(point), *(void**)(&fontFace), fontSize, glyphs.size(), get_abi(glyphs), isSideways, bidiLevel, *(void**)(&brush), static_cast<int32_t>(measuringMode), *(void**)(&localeName), *(void**)(&textString), clusterMapIndices.size(), get_abi(clusterMapIndices), characterIndex, static_cast<int32_t>(glyphOrientation)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)this;
            check_hresult(_winrt_abi_type->DrawGlyphRun(impl::bind_in(point), *(void**)(&fontFace), fontSize, glyphs.size(), get_abi(glyphs), isSideways, bidiLevel, *(void**)(&brush), static_cast<int32_t>(measuringMode), *(void**)(&localeName), *(void**)(&textString), clusterMapIndices.size(), get_abi(clusterMapIndices), characterIndex, static_cast<int32_t>(glyphOrientation)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderer<D>::DrawStrikethrough(winrt::Windows::Foundation::Numerics::float2 const& point, float strikethroughWidth, float strikethroughThickness, float strikethroughOffset, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection, winrt::Windows::Foundation::IInspectable const& brush, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const& textMeasuringMode, param::hstring const& localeName, winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const& glyphOrientation) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DrawStrikethrough(impl::bind_in(point), strikethroughWidth, strikethroughThickness, strikethroughOffset, static_cast<int32_t>(textDirection), *(void**)(&brush), static_cast<int32_t>(textMeasuringMode), *(void**)(&localeName), static_cast<int32_t>(glyphOrientation)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)this;
            check_hresult(_winrt_abi_type->DrawStrikethrough(impl::bind_in(point), strikethroughWidth, strikethroughThickness, strikethroughOffset, static_cast<int32_t>(textDirection), *(void**)(&brush), static_cast<int32_t>(textMeasuringMode), *(void**)(&localeName), static_cast<int32_t>(glyphOrientation)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderer<D>::DrawUnderline(winrt::Windows::Foundation::Numerics::float2 const& point, float underlineWidth, float underlineThickness, float underlineOffset, float runHeight, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection, winrt::Windows::Foundation::IInspectable const& brush, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const& textMeasuringMode, param::hstring const& localeName, winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const& glyphOrientation) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DrawUnderline(impl::bind_in(point), underlineWidth, underlineThickness, underlineOffset, runHeight, static_cast<int32_t>(textDirection), *(void**)(&brush), static_cast<int32_t>(textMeasuringMode), *(void**)(&localeName), static_cast<int32_t>(glyphOrientation)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)this;
            check_hresult(_winrt_abi_type->DrawUnderline(impl::bind_in(point), underlineWidth, underlineThickness, underlineOffset, runHeight, static_cast<int32_t>(textDirection), *(void**)(&brush), static_cast<int32_t>(textMeasuringMode), *(void**)(&localeName), static_cast<int32_t>(glyphOrientation)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderer<D>::DrawInlineObject(winrt::Windows::Foundation::Numerics::float2 const& point, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const& inlineObject, bool isSideways, bool isRightToLeft, winrt::Windows::Foundation::IInspectable const& brush, winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const& glyphOrientation) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DrawInlineObject(impl::bind_in(point), *(void**)(&inlineObject), isSideways, isRightToLeft, *(void**)(&brush), static_cast<int32_t>(glyphOrientation)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)this;
            check_hresult(_winrt_abi_type->DrawInlineObject(impl::bind_in(point), *(void**)(&inlineObject), isSideways, isRightToLeft, *(void**)(&brush), static_cast<int32_t>(glyphOrientation)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderer<D>::PixelSnappingDisabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PixelSnappingDisabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)this;
            check_hresult(_winrt_abi_type->get_PixelSnappingDisabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderer<D>::Transform() const
    {
        winrt::Windows::Foundation::Numerics::float3x2 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Transform(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)this;
            check_hresult(_winrt_abi_type->get_Transform(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderer<D>::Dpi() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Dpi(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>**)this;
            check_hresult(_winrt_abi_type->get_Dpi(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderingParameters<D>::RenderingMode() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RenderingMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters>**)this;
            check_hresult(_winrt_abi_type->get_RenderingMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderingParameters<D>::GridFit() const
    {
        winrt::Microsoft::Graphics::Canvas::Text::CanvasTextGridFit value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GridFit(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters>**)this;
            check_hresult(_winrt_abi_type->get_GridFit(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTextRenderingParametersFactory<D>::Create(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode const& textRenderingMode, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextGridFit const& gridFit) const
    {
        void* textRenderingParameters{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParametersFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParametersFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParametersFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Create(static_cast<int32_t>(textRenderingMode), static_cast<int32_t>(gridFit), &textRenderingParameters));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParametersFactory>**)this;
            check_hresult(_winrt_abi_type->Create(static_cast<int32_t>(textRenderingMode), static_cast<int32_t>(gridFit), &textRenderingParameters));
        }
        return winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters{ textRenderingParameters, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTypography<D>::AddFeature(winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeature const& feature) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddFeature(impl::bind_in(feature)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>**)this;
            check_hresult(_winrt_abi_type->AddFeature(impl::bind_in(feature)));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTypography<D>::AddFeature(winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName const& name, uint32_t parameter) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddFeatureWithNameAndParameter(static_cast<int32_t>(name), parameter));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>**)this;
            check_hresult(_winrt_abi_type->AddFeatureWithNameAndParameter(static_cast<int32_t>(name), parameter));
        }
    }
    template <typename D> auto consume_Microsoft_Graphics_Canvas_Text_ICanvasTypography<D>::GetFeatures() const
    {
        uint32_t features_impl_size{};
        struct struct_Microsoft_Graphics_Canvas_Text_CanvasTypographyFeature* features{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetFeatures(&features_impl_size, &features));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>**)this;
            check_hresult(_winrt_abi_type->GetFeatures(&features_impl_size, &features));
        }
        return com_array<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeature>{ features, features_impl_size, take_ownership_from_abi };
    }
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace>
    {
        int32_t __stdcall GetRecommendedRenderingMode(float fontSize, float dpi, int32_t measuringMode, void* renderingParameters, int32_t* renderingMode) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *renderingMode = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode>(this->shim().GetRecommendedRenderingMode(fontSize, dpi, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const*>(&measuringMode), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters const*>(&renderingParameters)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRecommendedRenderingModeWithAllOptions(float fontSize, float dpi, int32_t measuringMode, void* renderingParameters, winrt::Windows::Foundation::Numerics::float3x2 transform, bool isSideways, int32_t outlineThreshold, int32_t* renderingMode) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *renderingMode = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode>(this->shim().GetRecommendedRenderingMode(fontSize, dpi, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const*>(&measuringMode), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters const*>(&renderingParameters), *reinterpret_cast<winrt::Windows::Foundation::Numerics::float3x2 const*>(&transform), isSideways, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::CanvasAntialiasing const*>(&outlineThreshold)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRecommendedGridFit(float fontSize, float dpi, int32_t measuringMode, void* renderingParameters, winrt::Windows::Foundation::Numerics::float3x2 transform, bool isSideways, int32_t outlineThreshold, int32_t* gridFit) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *gridFit = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextGridFit>(this->shim().GetRecommendedGridFit(fontSize, dpi, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const*>(&measuringMode), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters const*>(&renderingParameters), *reinterpret_cast<winrt::Windows::Foundation::Numerics::float3x2 const*>(&transform), isSideways, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::CanvasAntialiasing const*>(&outlineThreshold)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GlyphBox(winrt::Windows::Foundation::Rect* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Rect>(this->shim().GlyphBox());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SubscriptPosition(winrt::Windows::Foundation::Numerics::float2* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().SubscriptPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SubscriptSize(winrt::Windows::Foundation::Size* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Size>(this->shim().SubscriptSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SuperscriptPosition(winrt::Windows::Foundation::Numerics::float2* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().SuperscriptPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SuperscriptSize(winrt::Windows::Foundation::Size* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Size>(this->shim().SuperscriptSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasTypographicMetrics(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasTypographicMetrics());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Ascent(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().Ascent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Descent(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().Descent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineGap(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().LineGap());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CapHeight(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().CapHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LowercaseLetterHeight(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().LowercaseLetterHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UnderlinePosition(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().UnderlinePosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UnderlineThickness(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().UnderlineThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StrikethroughPosition(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().StrikethroughPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StrikethroughThickness(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().StrikethroughThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CaretSlopeRise(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().CaretSlopeRise());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CaretSlopeRun(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().CaretSlopeRun());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CaretOffset(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().CaretOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UnicodeRanges(uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasUnicodeRange** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().UnicodeRanges());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsMonospaced(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsMonospaced());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetVerticalGlyphVariants(uint32_t __inputElementsSize, int32_t* inputElements, uint32_t* __outputElementsSize, int32_t** outputElements) noexcept final try
        {
            clear_abi(outputElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__outputElementsSize, *outputElements) = detach_abi(this->shim().GetVerticalGlyphVariants(array_view<int32_t const>(reinterpret_cast<int32_t const *>(inputElements), reinterpret_cast<int32_t const *>(inputElements) + __inputElementsSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasVerticalGlyphVariants(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasVerticalGlyphVariants());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FileFormatType(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFileFormatType>(this->shim().FileFormatType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Simulations(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSimulations>(this->shim().Simulations());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSymbolFont(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSymbolFont());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GlyphCount(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<uint32_t>(this->shim().GlyphCount());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphIndices(uint32_t __inputElementsSize, uint32_t* inputElements, uint32_t* __outputElementsSize, int32_t** outputElements) noexcept final try
        {
            clear_abi(outputElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__outputElementsSize, *outputElements) = detach_abi(this->shim().GetGlyphIndices(array_view<uint32_t const>(reinterpret_cast<uint32_t const *>(inputElements), reinterpret_cast<uint32_t const *>(inputElements) + __inputElementsSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphMetrics(uint32_t __inputElementsSize, int32_t* inputElements, bool isSideways, uint32_t* __outputElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphMetrics** outputElements) noexcept final try
        {
            clear_abi(outputElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__outputElementsSize, *outputElements) = detach_abi(this->shim().GetGlyphMetrics(array_view<int32_t const>(reinterpret_cast<int32_t const *>(inputElements), reinterpret_cast<int32_t const *>(inputElements) + __inputElementsSize), isSideways));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGdiCompatibleGlyphMetrics(float fontSize, float dpi, winrt::Windows::Foundation::Numerics::float3x2 transform, bool useGdiNatural, uint32_t __inputElementsSize, int32_t* inputElements, bool isSideways, uint32_t* __outputElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphMetrics** outputElements) noexcept final try
        {
            clear_abi(outputElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__outputElementsSize, *outputElements) = detach_abi(this->shim().GetGdiCompatibleGlyphMetrics(fontSize, dpi, *reinterpret_cast<winrt::Windows::Foundation::Numerics::float3x2 const*>(&transform), useGdiNatural, array_view<int32_t const>(reinterpret_cast<int32_t const *>(inputElements), reinterpret_cast<int32_t const *>(inputElements) + __inputElementsSize), isSideways));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Weight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().Weight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Stretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().Stretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Style(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().Style());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FamilyNames(void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>>(this->shim().FamilyNames());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FaceNames(void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>>(this->shim().FaceNames());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetInformationalStrings(int32_t fontInformation, void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>>(this->shim().GetInformationalStrings(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontInformation const*>(&fontInformation)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall HasCharacter(uint32_t unicodeValue, bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasCharacter(unicodeValue));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphRunBounds(void* drawingSession, winrt::Windows::Foundation::Numerics::float2 point, float fontSize, uint32_t __glyphsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* glyphs, bool isSideways, uint32_t bidiLevel, winrt::Windows::Foundation::Rect* bounds) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(bounds);
            typename D::abi_guard guard(this->shim());
            *bounds = detach_from<winrt::Windows::Foundation::Rect>(this->shim().GetGlyphRunBounds(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::CanvasDrawingSession const*>(&drawingSession), *reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), fontSize, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphs), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphs) + __glyphsSize), isSideways, bidiLevel));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphRunBoundsWithMeasuringMode(void* drawingSession, winrt::Windows::Foundation::Numerics::float2 point, float fontSize, uint32_t __glyphsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* glyphs, bool isSideways, uint32_t bidiLevel, int32_t measuringMode, winrt::Windows::Foundation::Rect* bounds) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(bounds);
            typename D::abi_guard guard(this->shim());
            *bounds = detach_from<winrt::Windows::Foundation::Rect>(this->shim().GetGlyphRunBounds(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::CanvasDrawingSession const*>(&drawingSession), *reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), fontSize, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphs), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphs) + __glyphsSize), isSideways, bidiLevel, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const*>(&measuringMode)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Panose(uint32_t* __valueElementsSize, uint8_t** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().Panose());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetSupportedTypographicFeatureNames(struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, uint32_t* __valueElementsSize, int32_t** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetSupportedTypographicFeatureNames(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetSupportedTypographicFeatureNamesWithLocale(struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, void* locale, uint32_t* __valueElementsSize, int32_t** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetSupportedTypographicFeatureNames(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script), *reinterpret_cast<hstring const*>(&locale)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetTypographicFeatureGlyphSupport(struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, int32_t typographicFeatureName, uint32_t __glyphsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* glyphsElements, uint32_t* __valueElementsSize, bool** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetTypographicFeatureGlyphSupport(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName const*>(&typographicFeatureName), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphsElements) + __glyphsElementsSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetTypographicFeatureGlyphSupportWithLocale(struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, int32_t typographicFeatureName, uint32_t __glyphsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* glyphsElements, void* locale, uint32_t* __valueElementsSize, bool** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetTypographicFeatureGlyphSupport(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName const*>(&typographicFeatureName), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphsElements) + __glyphsElementsSize), *reinterpret_cast<hstring const*>(&locale)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet>
    {
        int32_t __stdcall get_Fonts(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace>>(this->shim().Fonts());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall TryFindFontFace(void* fontFace, int32_t* index, bool* succeeded) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *succeeded = detach_from<bool>(this->shim().TryFindFontFace(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const*>(&fontFace), *index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetMatchingFontsFromProperties(uint32_t __propertyElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasFontProperty* propertyElements, void** matchingFonts) noexcept final try
        {
            clear_abi(matchingFonts);
            typename D::abi_guard guard(this->shim());
            *matchingFonts = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet>(this->shim().GetMatchingFonts(array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty const *>(propertyElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty const *>(propertyElements) + __propertyElementsSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetMatchingFontsFromWwsFamily(void* familyName, struct struct_Windows_UI_Text_FontWeight weight, int32_t stretch, int32_t style, void** matchingFonts) noexcept final try
        {
            clear_abi(matchingFonts);
            typename D::abi_guard guard(this->shim());
            *matchingFonts = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet>(this->shim().GetMatchingFonts(*reinterpret_cast<hstring const*>(&familyName), *reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&weight), *reinterpret_cast<winrt::Windows::UI::Text::FontStretch const*>(&stretch), *reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&style)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CountFontsMatchingProperty(struct struct_Microsoft_Graphics_Canvas_Text_CanvasFontProperty property, uint32_t* count) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *count = detach_from<uint32_t>(this->shim().CountFontsMatchingProperty(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontProperty const*>(&property)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetPropertyValuesFromIndex(uint32_t fontIndex, int32_t propertyIdentifier, void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>>(this->shim().GetPropertyValues(fontIndex, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontPropertyIdentifier const*>(&propertyIdentifier)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetPropertyValuesFromIdentifier(int32_t propertyIdentifier, void* preferredLocaleNames, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasFontProperty** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetPropertyValues(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontPropertyIdentifier const*>(&propertyIdentifier), *reinterpret_cast<hstring const*>(&preferredLocaleNames)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetPropertyValues(int32_t propertyIdentifier, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasFontProperty** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetPropertyValues(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontPropertyIdentifier const*>(&propertyIdentifier)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetFactory> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetFactory>
    {
        int32_t __stdcall Create(void* uri, void** fontSet) noexcept final try
        {
            clear_abi(fontSet);
            typename D::abi_guard guard(this->shim());
            *fontSet = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet>(this->shim().Create(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&uri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetStatics> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetStatics>
    {
        int32_t __stdcall GetSystemFontSet(void** fontSet) noexcept final try
        {
            clear_abi(fontSet);
            typename D::abi_guard guard(this->shim());
            *fontSet = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet>(this->shim().GetSystemFontSet());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitution> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitution>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory>
    {
        int32_t __stdcall Create(int32_t method, void** canvasNumberSubstitution) noexcept final try
        {
            clear_abi(canvasNumberSubstitution);
            typename D::abi_guard guard(this->shim());
            *canvasNumberSubstitution = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution>(this->shim().Create(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitutionMethod const*>(&method)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateWithLocaleAndIgnoreOverrides(int32_t method, void* localeName, bool ignoreEnvironmentOverrides, void** canvasNumberSubstitution) noexcept final try
        {
            clear_abi(canvasNumberSubstitution);
            typename D::abi_guard guard(this->shim());
            *canvasNumberSubstitution = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution>(this->shim().CreateWithLocaleAndIgnoreOverrides(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitutionMethod const*>(&method), *reinterpret_cast<hstring const*>(&localeName), ignoreEnvironmentOverrides));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont>
    {
        int32_t __stdcall get_FontFace(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace>(this->shim().FontFace());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScaleFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().ScaleFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer>
    {
        int32_t __stdcall GetFontsUsingSystemFontSet(void* textFormat, void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasScaledFont>>>(this->shim().GetFonts(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat const*>(&textFormat)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetFonts(void* textFormat, void* fontSet, void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasScaledFont>>>(this->shim().GetFonts(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat const*>(&textFormat), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet const*>(&fontSet)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBidi(void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedBidi>>>(this->shim().GetBidi());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBidiWithLocale(void* locale, void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedBidi>>>(this->shim().GetBidi(*reinterpret_cast<hstring const*>(&locale)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBreakpoints(uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedBreakpoint** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetBreakpoints());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBreakpointsWithLocale(void* locale, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedBreakpoint** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetBreakpoints(*reinterpret_cast<hstring const*>(&locale)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetNumberSubstitutions(void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution>>>(this->shim().GetNumberSubstitutions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetScript(void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript>>>(this->shim().GetScript());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetScriptWithLocale(void* locale, void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript>>>(this->shim().GetScript(*reinterpret_cast<hstring const*>(&locale)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphOrientations(void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedGlyphOrientation>>>(this->shim().GetGlyphOrientations());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphOrientationsWithLocale(void* locale, void** values) noexcept final try
        {
            clear_abi(values);
            typename D::abi_guard guard(this->shim());
            *values = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedGlyphOrientation>>>(this->shim().GetGlyphOrientations(*reinterpret_cast<hstring const*>(&locale)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetScriptProperties(struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript analyzedScript, struct struct_Microsoft_Graphics_Canvas_Text_CanvasScriptProperties* scriptProperties) noexcept final try
        {
            zero_abi<winrt::Microsoft::Graphics::Canvas::Text::CanvasScriptProperties>(scriptProperties);
            typename D::abi_guard guard(this->shim());
            *scriptProperties = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasScriptProperties>(this->shim().GetScriptProperties(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&analyzedScript)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphs(struct struct_Microsoft_Graphics_Canvas_Text_CanvasCharacterRange characterRange, void* fontFace, float fontSize, bool isSideways, bool isRightToLeft, struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetGlyphs(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange const*>(&characterRange), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const*>(&fontFace), fontSize, isSideways, isRightToLeft, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetGlyphsWithAllOptions(struct struct_Microsoft_Graphics_Canvas_Text_CanvasCharacterRange characterRange, void* fontFace, float fontSize, bool isSideways, bool isRightToLeft, struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, void* locale, void* numberSubstitution, void* typographyRanges, uint32_t* __clusterMapIndicesElementsSize, int32_t** clusterMapIndicesElements, uint32_t* __isShapedAloneGlyphsElementsSize, bool** isShapedAloneGlyphsElements, uint32_t* __glyphShapingResultsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphShaping** glyphShapingResultsElements, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph** valueElements) noexcept final try
        {
            clear_abi(clusterMapIndicesElements);
            clear_abi(isShapedAloneGlyphsElements);
            clear_abi(glyphShapingResultsElements);
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetGlyphs(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange const*>(&characterRange), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const*>(&fontFace), fontSize, isSideways, isRightToLeft, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script), *reinterpret_cast<hstring const*>(&locale), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution const*>(&numberSubstitution), *reinterpret_cast<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange, winrt::Microsoft::Graphics::Canvas::Text::CanvasTypography>> const*>(&typographyRanges), detach_abi<int32_t>(__clusterMapIndicesElementsSize, clusterMapIndicesElements), detach_abi<bool>(__isShapedAloneGlyphsElementsSize, isShapedAloneGlyphsElements), detach_abi<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping>(__glyphShapingResultsElementsSize, glyphShapingResultsElements)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetJustificationOpportunities(struct struct_Microsoft_Graphics_Canvas_Text_CanvasCharacterRange characterRange, void* fontFace, float fontSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, uint32_t __clusterMapIndicesElementsSize, int32_t* clusterMapIndicesElements, uint32_t __glyphShapingResultsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphShaping* glyphShapingResultsElements, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasJustificationOpportunity** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetJustificationOpportunities(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasCharacterRange const*>(&characterRange), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const*>(&fontFace), fontSize, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script), array_view<int32_t const>(reinterpret_cast<int32_t const *>(clusterMapIndicesElements), reinterpret_cast<int32_t const *>(clusterMapIndicesElements) + __clusterMapIndicesElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const *>(glyphShapingResultsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const *>(glyphShapingResultsElements) + __glyphShapingResultsElementsSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ApplyJustificationOpportunities(float lineWidth, uint32_t __justificationOpportunitiesElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasJustificationOpportunity* justificationOpportunitiesElements, uint32_t __sourceGlyphsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* sourceGlyphsElements, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().ApplyJustificationOpportunities(lineWidth, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasJustificationOpportunity const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasJustificationOpportunity const *>(justificationOpportunitiesElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasJustificationOpportunity const *>(justificationOpportunitiesElements) + __justificationOpportunitiesElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(sourceGlyphsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(sourceGlyphsElements) + __sourceGlyphsElementsSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddGlyphsAfterJustification(void* fontFace, float fontSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, uint32_t __clusterMapIndicesElementsSize, int32_t* clusterMapIndicesElements, uint32_t __originalGlyphsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* originalGlyphsElements, uint32_t __justifiedGlyphsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* justifiedGlyphsElements, uint32_t __glyphShapingResultsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphShaping* glyphShapingResultsElements, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().AddGlyphsAfterJustification(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const*>(&fontFace), fontSize, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script), array_view<int32_t const>(reinterpret_cast<int32_t const *>(clusterMapIndicesElements), reinterpret_cast<int32_t const *>(clusterMapIndicesElements) + __clusterMapIndicesElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(originalGlyphsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(originalGlyphsElements) + __originalGlyphsElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(justifiedGlyphsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(justifiedGlyphsElements) + __justifiedGlyphsElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const *>(glyphShapingResultsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const *>(glyphShapingResultsElements) + __glyphShapingResultsElementsSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddGlyphsAfterJustificationWithClusterMap(void* fontFace, float fontSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasAnalyzedScript script, uint32_t __clusterMapIndicesElementsSize, int32_t* clusterMapIndicesElements, uint32_t __originalGlyphsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* originalGlyphsElements, uint32_t __justifiedGlyphsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* justifiedGlyphsElements, uint32_t __glyphShapingResultsElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyphShaping* glyphShapingResultsElements, uint32_t* __outputClusterMapIndicesElementsSize, int32_t** outputClusterMapIndicesElements, uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph** valueElements) noexcept final try
        {
            clear_abi(outputClusterMapIndicesElements);
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().AddGlyphsAfterJustification(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const*>(&fontFace), fontSize, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasAnalyzedScript const*>(&script), array_view<int32_t const>(reinterpret_cast<int32_t const *>(clusterMapIndicesElements), reinterpret_cast<int32_t const *>(clusterMapIndicesElements) + __clusterMapIndicesElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(originalGlyphsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(originalGlyphsElements) + __originalGlyphsElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(justifiedGlyphsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(justifiedGlyphsElements) + __justifiedGlyphsElementsSize), array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const *>(glyphShapingResultsElements), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphShaping const *>(glyphShapingResultsElements) + __glyphShapingResultsElementsSize), detach_abi<int32_t>(__outputClusterMapIndicesElementsSize, outputClusterMapIndicesElements)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory>
    {
        int32_t __stdcall Create(void* text, int32_t textDirection, void** canvasTextAnalyzer) noexcept final try
        {
            clear_abi(canvasTextAnalyzer);
            typename D::abi_guard guard(this->shim());
            *canvasTextAnalyzer = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextAnalyzer>(this->shim().Create(*reinterpret_cast<hstring const*>(&text), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const*>(&textDirection)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateWithNumberSubstitutionAndVerticalGlyphOrientationAndBidiLevel(void* text, int32_t textDirection, void* numberSubstitution, int32_t verticalGlyphOrientation, uint32_t bidiLevel, void** canvasTextAnalyzer) noexcept final try
        {
            clear_abi(canvasTextAnalyzer);
            typename D::abi_guard guard(this->shim());
            *canvasTextAnalyzer = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextAnalyzer>(this->shim().CreateWithNumberSubstitutionAndVerticalGlyphOrientationAndBidiLevel(*reinterpret_cast<hstring const*>(&text), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const*>(&textDirection), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution const*>(&numberSubstitution), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation const*>(&verticalGlyphOrientation), bidiLevel));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateWithOptions(void* text, int32_t textDirection, void* options, void** canvasTextAnalyzer) noexcept final try
        {
            clear_abi(canvasTextAnalyzer);
            typename D::abi_guard guard(this->shim());
            *canvasTextAnalyzer = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextAnalyzer>(this->shim().CreateWithOptions(*reinterpret_cast<hstring const*>(&text), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const*>(&textDirection), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions>
    {
        int32_t __stdcall GetLocaleName(int32_t characterIndex, int32_t* characterCount, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().GetLocaleName(characterIndex, *characterCount));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetNumberSubstitution(int32_t characterIndex, int32_t* characterCount, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution>(this->shim().GetNumberSubstitution(characterIndex, *characterCount));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetVerticalGlyphOrientation(int32_t characterIndex, int32_t* characterCount, int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation>(this->shim().GetVerticalGlyphOrientation(characterIndex, *characterCount));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBidiLevel(int32_t characterIndex, int32_t* characterCount, uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<uint32_t>(this->shim().GetBidiLevel(characterIndex, *characterCount));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat>
    {
        int32_t __stdcall get_Direction(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection>(this->shim().Direction());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Direction(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Direction(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().FontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontFamily(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSize(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().FontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontSize(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().FontStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStretch(*reinterpret_cast<winrt::Windows::UI::Text::FontStretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IncrementalTabStop(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().IncrementalTabStop());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IncrementalTabStop(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IncrementalTabStop(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacing(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().LineSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineSpacing(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacingBaseline(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().LineSpacingBaseline());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineSpacingBaseline(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineSpacingBaseline(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LocaleName(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().LocaleName());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LocaleName(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LocaleName(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment>(this->shim().VerticalAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalAlignment(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment>(this->shim().HorizontalAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalAlignment(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingGranularity(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity>(this->shim().TrimmingGranularity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingGranularity(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingGranularity(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingDelimiter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().TrimmingDelimiter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingDelimiter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingDelimiter(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingDelimiterCount(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().TrimmingDelimiterCount());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingDelimiterCount(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingDelimiterCount(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WordWrapping(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping>(this->shim().WordWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_WordWrapping(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().WordWrapping(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Options(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions>(this->shim().Options());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Options(uint32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Options(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalGlyphOrientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation>(this->shim().VerticalGlyphOrientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalGlyphOrientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalGlyphOrientation(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment>(this->shim().OpticalAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OpticalAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OpticalAlignment(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LastLineWrapping(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().LastLineWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LastLineWrapping(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LastLineWrapping(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacingMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode>(this->shim().LineSpacingMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineSpacingMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineSpacingMode(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingSign(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign>(this->shim().TrimmingSign());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingSign(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingSign(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CustomTrimmingSign(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>(this->shim().CustomTrimmingSign());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CustomTrimmingSign(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CustomTrimmingSign(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics>
    {
        int32_t __stdcall GetSystemFontFamilies(uint32_t* __valueElementsSize, void*** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetSystemFontFamilies());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetSystemFontFamiliesFromLocaleList(void* localeList, uint32_t* __valueElementsSize, void*** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().GetSystemFontFamilies(*reinterpret_cast<winrt::Windows::Foundation::Collections::IVectorView<hstring> const*>(&localeList)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>
    {
        int32_t __stdcall Draw(void* textRenderer, winrt::Windows::Foundation::Numerics::float2 point, bool isSideways, bool isRightToLeft, void* brush) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Draw(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer const*>(&textRenderer), *reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), isSideways, isRightToLeft, *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&brush));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Size(winrt::Windows::Foundation::Size* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Size>(this->shim().Size());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Baseline(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().Baseline());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SupportsSideways(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SupportsSideways());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DrawBounds(winrt::Windows::Foundation::Rect* bounds) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(bounds);
            typename D::abi_guard guard(this->shim());
            *bounds = detach_from<winrt::Windows::Foundation::Rect>(this->shim().DrawBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BreakBefore(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasLineBreakCondition>(this->shim().BreakBefore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BreakAfter(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasLineBreakCondition>(this->shim().BreakAfter());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout>
    {
        int32_t __stdcall GetFormatChangeIndices(uint32_t* __stopsSize, int32_t** stops) noexcept final try
        {
            clear_abi(stops);
            typename D::abi_guard guard(this->shim());
            std::tie(*__stopsSize, *stops) = detach_abi(this->shim().GetFormatChangeIndices());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Direction(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection>(this->shim().Direction());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Direction(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Direction(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultFontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DefaultFontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultFontSize(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().DefaultFontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultFontStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().DefaultFontStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultFontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().DefaultFontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultFontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().DefaultFontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IncrementalTabStop(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().IncrementalTabStop());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IncrementalTabStop(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IncrementalTabStop(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacing(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().LineSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineSpacing(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacingBaseline(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().LineSpacingBaseline());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineSpacingBaseline(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineSpacingBaseline(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultLocaleName(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DefaultLocaleName());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment>(this->shim().VerticalAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalAlignment(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment>(this->shim().HorizontalAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalAlignment(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasHorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingGranularity(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity>(this->shim().TrimmingGranularity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingGranularity(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingGranularity(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextTrimmingGranularity const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingDelimiter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().TrimmingDelimiter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingDelimiter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingDelimiter(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingDelimiterCount(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().TrimmingDelimiterCount());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingDelimiterCount(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingDelimiterCount(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WordWrapping(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping>(this->shim().WordWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_WordWrapping(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().WordWrapping(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasWordWrapping const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Options(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions>(this->shim().Options());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Options(uint32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Options(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasDrawTextOptions const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacingMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode>(this->shim().LineSpacingMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineSpacingMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineSpacingMode(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasLineSpacingMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TrimmingSign(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign>(this->shim().TrimmingSign());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TrimmingSign(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TrimmingSign(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTrimmingSign const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CustomTrimmingSign(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>(this->shim().CustomTrimmingSign());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CustomTrimmingSign(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CustomTrimmingSign(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RequestedSize(winrt::Windows::Foundation::Size* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Size>(this->shim().RequestedSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RequestedSize(winrt::Windows::Foundation::Size value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RequestedSize(*reinterpret_cast<winrt::Windows::Foundation::Size const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetMinimumLineLength(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().GetMinimumLineLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBrush(int32_t characterIndex, void** brush) noexcept final try
        {
            clear_abi(brush);
            typename D::abi_guard guard(this->shim());
            *brush = detach_from<winrt::Microsoft::Graphics::Canvas::Brushes::ICanvasBrush>(this->shim().GetBrush(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetCustomBrush(int32_t characterIndex, void** brush) noexcept final try
        {
            clear_abi(brush);
            typename D::abi_guard guard(this->shim());
            *brush = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetCustomBrush(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetFontFamily(int32_t characterIndex, void** fontFamily) noexcept final try
        {
            clear_abi(fontFamily);
            typename D::abi_guard guard(this->shim());
            *fontFamily = detach_from<hstring>(this->shim().GetFontFamily(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetFontSize(int32_t characterIndex, float* fontSize) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *fontSize = detach_from<float>(this->shim().GetFontSize(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetFontStretch(int32_t characterIndex, int32_t* fontStretch) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *fontStretch = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().GetFontStretch(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetFontStyle(int32_t characterIndex, int32_t* fontStyle) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *fontStyle = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().GetFontStyle(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetFontWeight(int32_t characterIndex, struct struct_Windows_UI_Text_FontWeight* fontWeight) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(fontWeight);
            typename D::abi_guard guard(this->shim());
            *fontWeight = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().GetFontWeight(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetLocaleName(int32_t characterIndex, void** localeName) noexcept final try
        {
            clear_abi(localeName);
            typename D::abi_guard guard(this->shim());
            *localeName = detach_from<hstring>(this->shim().GetLocaleName(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetStrikethrough(int32_t characterIndex, bool* hasStrikethrough) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *hasStrikethrough = detach_from<bool>(this->shim().GetStrikethrough(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetUnderline(int32_t characterIndex, bool* hasUnderline) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *hasUnderline = detach_from<bool>(this->shim().GetUnderline(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetInlineObject(int32_t characterIndex, void** inlineObject) noexcept final try
        {
            clear_abi(inlineObject);
            typename D::abi_guard guard(this->shim());
            *inlineObject = detach_from<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject>(this->shim().GetInlineObject(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetColor(int32_t characterIndex, int32_t characterCount, struct struct_Windows_UI_Color color) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetColor(characterIndex, characterCount, *reinterpret_cast<winrt::Windows::UI::Color const*>(&color));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetBrush(int32_t characterIndex, int32_t characterCount, void* brush) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetBrush(characterIndex, characterCount, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Brushes::ICanvasBrush const*>(&brush));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetCustomBrush(int32_t characterIndex, int32_t characterCount, void* brush) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetCustomBrush(characterIndex, characterCount, *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&brush));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetFontFamily(int32_t characterIndex, int32_t characterCount, void* fontFamily) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetFontFamily(characterIndex, characterCount, *reinterpret_cast<hstring const*>(&fontFamily));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetFontSize(int32_t characterIndex, int32_t characterCount, float fontSize) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetFontSize(characterIndex, characterCount, fontSize);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetFontStretch(int32_t characterIndex, int32_t characterCount, int32_t fontStretch) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetFontStretch(characterIndex, characterCount, *reinterpret_cast<winrt::Windows::UI::Text::FontStretch const*>(&fontStretch));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetFontStyle(int32_t characterIndex, int32_t characterCount, int32_t fontStyle) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetFontStyle(characterIndex, characterCount, *reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&fontStyle));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetFontWeight(int32_t characterIndex, int32_t characterCount, struct struct_Windows_UI_Text_FontWeight fontWeight) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetFontWeight(characterIndex, characterCount, *reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&fontWeight));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetLocaleName(int32_t characterIndex, int32_t characterCount, void* name) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetLocaleName(characterIndex, characterCount, *reinterpret_cast<hstring const*>(&name));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetStrikethrough(int32_t characterIndex, int32_t characterCount, bool hasStrikethrough) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetStrikethrough(characterIndex, characterCount, hasStrikethrough);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetUnderline(int32_t characterIndex, int32_t characterCount, bool hasUnderline) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetUnderline(characterIndex, characterCount, hasUnderline);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetInlineObject(int32_t characterIndex, int32_t characterCount, void* inlineObject) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetInlineObject(characterIndex, characterCount, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const*>(&inlineObject));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DrawToTextRenderer(void* textRenderer, winrt::Windows::Foundation::Numerics::float2 position) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DrawToTextRenderer(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer const*>(&textRenderer), *reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&position));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DrawToTextRendererWithCoords(void* textRenderer, float x, float y) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DrawToTextRenderer(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer const*>(&textRenderer), x, y);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineMetrics(uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasLineMetrics** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().LineMetrics());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClusterMetrics(uint32_t* __valueElementsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasClusterMetrics** valueElements) noexcept final try
        {
            clear_abi(valueElements);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueElementsSize, *valueElements) = detach_abi(this->shim().ClusterMetrics());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetTypography(int32_t characterIndex, int32_t characterCount, void* typography) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetTypography(characterIndex, characterCount, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypography const*>(&typography));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetTypography(int32_t characterIndex, void** typography) noexcept final try
        {
            clear_abi(typography);
            typename D::abi_guard guard(this->shim());
            *typography = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypography>(this->shim().GetTypography(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LayoutBounds(winrt::Windows::Foundation::Rect* bounds) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(bounds);
            typename D::abi_guard guard(this->shim());
            *bounds = detach_from<winrt::Windows::Foundation::Rect>(this->shim().LayoutBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LayoutBoundsIncludingTrailingWhitespace(winrt::Windows::Foundation::Rect* bounds) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(bounds);
            typename D::abi_guard guard(this->shim());
            *bounds = detach_from<winrt::Windows::Foundation::Rect>(this->shim().LayoutBoundsIncludingTrailingWhitespace());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineCount(int32_t* lineCount) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *lineCount = detach_from<int32_t>(this->shim().LineCount());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumBidiReorderingDepth(int32_t* depth) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *depth = detach_from<int32_t>(this->shim().MaximumBidiReorderingDepth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DrawBounds(winrt::Windows::Foundation::Rect* bounds) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(bounds);
            typename D::abi_guard guard(this->shim());
            *bounds = detach_from<winrt::Windows::Foundation::Rect>(this->shim().DrawBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall HitTest(winrt::Windows::Foundation::Numerics::float2 point, bool* isHit) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *isHit = detach_from<bool>(this->shim().HitTest(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall HitTestWithCoords(float x, float y, bool* isHit) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *isHit = detach_from<bool>(this->shim().HitTest(x, y));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall HitTestWithDescription(winrt::Windows::Foundation::Numerics::float2 point, struct struct_Microsoft_Graphics_Canvas_Text_CanvasTextLayoutRegion* textLayoutRegion, bool* isHit) noexcept final try
        {
            zero_abi<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion>(textLayoutRegion);
            typename D::abi_guard guard(this->shim());
            *isHit = detach_from<bool>(this->shim().HitTest(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion*>(textLayoutRegion)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall HitTestWithDescriptionAndCoords(float x, float y, struct struct_Microsoft_Graphics_Canvas_Text_CanvasTextLayoutRegion* textLayoutRegion, bool* isHit) noexcept final try
        {
            zero_abi<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion>(textLayoutRegion);
            typename D::abi_guard guard(this->shim());
            *isHit = detach_from<bool>(this->shim().HitTest(x, y, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion*>(textLayoutRegion)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall HitTestWithDescriptionAndTrailingSide(winrt::Windows::Foundation::Numerics::float2 point, struct struct_Microsoft_Graphics_Canvas_Text_CanvasTextLayoutRegion* textLayoutRegion, bool* trailingSideOfCharacter, bool* isHit) noexcept final try
        {
            zero_abi<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion>(textLayoutRegion);
            typename D::abi_guard guard(this->shim());
            *isHit = detach_from<bool>(this->shim().HitTest(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion*>(textLayoutRegion), *trailingSideOfCharacter));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall HitTestWithDescriptionAndCoordsAndTrailingSide(float x, float y, struct struct_Microsoft_Graphics_Canvas_Text_CanvasTextLayoutRegion* textLayoutRegion, bool* trailingSideOfCharacter, bool* isHit) noexcept final try
        {
            zero_abi<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion>(textLayoutRegion);
            typename D::abi_guard guard(this->shim());
            *isHit = detach_from<bool>(this->shim().HitTest(x, y, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion*>(textLayoutRegion), *trailingSideOfCharacter));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetCaretPosition(int32_t characterIndex, bool trailingSideOfCharacter, winrt::Windows::Foundation::Numerics::float2* location) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(location);
            typename D::abi_guard guard(this->shim());
            *location = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().GetCaretPosition(characterIndex, trailingSideOfCharacter));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetCaretPositionWithDescription(int32_t characterIndex, bool trailingSideOfCharacter, struct struct_Microsoft_Graphics_Canvas_Text_CanvasTextLayoutRegion* textLayoutRegion, winrt::Windows::Foundation::Numerics::float2* location) noexcept final try
        {
            zero_abi<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion>(textLayoutRegion);
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(location);
            typename D::abi_guard guard(this->shim());
            *location = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().GetCaretPosition(characterIndex, trailingSideOfCharacter, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayoutRegion*>(textLayoutRegion)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetCharacterRegions(int32_t characterIndex, int32_t characterCount, uint32_t* __hitTestDescriptionsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasTextLayoutRegion** hitTestDescriptions) noexcept final try
        {
            clear_abi(hitTestDescriptions);
            typename D::abi_guard guard(this->shim());
            std::tie(*__hitTestDescriptionsSize, *hitTestDescriptions) = detach_abi(this->shim().GetCharacterRegions(characterIndex, characterCount));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetPairKerning(int32_t characterIndex, bool* hasPairKerning) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *hasPairKerning = detach_from<bool>(this->shim().GetPairKerning(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetPairKerning(int32_t characterIndex, int32_t characterCount, bool hasPairKerning) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetPairKerning(characterIndex, characterCount, hasPairKerning);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetLeadingCharacterSpacing(int32_t characterIndex, float* leadingSpacing) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *leadingSpacing = detach_from<float>(this->shim().GetLeadingCharacterSpacing(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetTrailingCharacterSpacing(int32_t characterIndex, float* trailingSpacing) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *trailingSpacing = detach_from<float>(this->shim().GetTrailingCharacterSpacing(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetMinimumCharacterAdvance(int32_t characterIndex, float* minimumAdvance) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *minimumAdvance = detach_from<float>(this->shim().GetMinimumCharacterAdvance(characterIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetCharacterSpacing(int32_t characterIndex, int32_t characterCount, float leadingSpacing, float trailingSpacing, float minimumAdvance) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetCharacterSpacing(characterIndex, characterCount, leadingSpacing, trailingSpacing, minimumAdvance);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalGlyphOrientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation>(this->shim().VerticalGlyphOrientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalGlyphOrientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalGlyphOrientation(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment>(this->shim().OpticalAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OpticalAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OpticalAlignment(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasOpticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LastLineWrapping(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().LastLineWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LastLineWrapping(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LastLineWrapping(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Device(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::CanvasDevice>(this->shim().Device());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutFactory> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutFactory>
    {
        int32_t __stdcall Create(void* resourceCreator, void* textString, void* textFormat, float requestedWidth, float requestedHeight, void** canvasTextLayout) noexcept final try
        {
            clear_abi(canvasTextLayout);
            typename D::abi_guard guard(this->shim());
            *canvasTextLayout = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayout>(this->shim().Create(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::ICanvasResourceCreator const*>(&resourceCreator), *reinterpret_cast<hstring const*>(&textString), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat const*>(&textFormat), requestedWidth, requestedHeight));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutStatics> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutStatics>
    {
        int32_t __stdcall GetGlyphOrientationTransform(int32_t glyphOrientation, bool isSideways, winrt::Windows::Foundation::Numerics::float2 position, winrt::Windows::Foundation::Numerics::float3x2* transform) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float3x2>(transform);
            typename D::abi_guard guard(this->shim());
            *transform = detach_from<winrt::Windows::Foundation::Numerics::float3x2>(this->shim().GetGlyphOrientationTransform(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const*>(&glyphOrientation), isSideways, *reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&position)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer>
    {
        int32_t __stdcall DrawGlyphRun(winrt::Windows::Foundation::Numerics::float2 point, void* fontFace, float fontSize, uint32_t __glyphsSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasGlyph* glyphs, bool isSideways, uint32_t bidiLevel, void* brush, int32_t measuringMode, void* localeName, void* textString, uint32_t __clusterMapIndicesSize, int32_t* clusterMapIndices, uint32_t characterIndex, int32_t glyphOrientation) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DrawGlyphRun(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace const*>(&fontFace), fontSize, array_view<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const>(reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphs), reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyph const *>(glyphs) + __glyphsSize), isSideways, bidiLevel, *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&brush), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const*>(&measuringMode), *reinterpret_cast<hstring const*>(&localeName), *reinterpret_cast<hstring const*>(&textString), array_view<int32_t const>(reinterpret_cast<int32_t const *>(clusterMapIndices), reinterpret_cast<int32_t const *>(clusterMapIndices) + __clusterMapIndicesSize), characterIndex, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const*>(&glyphOrientation));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DrawStrikethrough(winrt::Windows::Foundation::Numerics::float2 point, float strikethroughWidth, float strikethroughThickness, float strikethroughOffset, int32_t textDirection, void* brush, int32_t textMeasuringMode, void* localeName, int32_t glyphOrientation) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DrawStrikethrough(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), strikethroughWidth, strikethroughThickness, strikethroughOffset, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const*>(&textDirection), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&brush), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const*>(&textMeasuringMode), *reinterpret_cast<hstring const*>(&localeName), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const*>(&glyphOrientation));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DrawUnderline(winrt::Windows::Foundation::Numerics::float2 point, float underlineWidth, float underlineThickness, float underlineOffset, float runHeight, int32_t textDirection, void* brush, int32_t textMeasuringMode, void* localeName, int32_t glyphOrientation) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DrawUnderline(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), underlineWidth, underlineThickness, underlineOffset, runHeight, *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const*>(&textDirection), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&brush), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextMeasuringMode const*>(&textMeasuringMode), *reinterpret_cast<hstring const*>(&localeName), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const*>(&glyphOrientation));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DrawInlineObject(winrt::Windows::Foundation::Numerics::float2 point, void* inlineObject, bool isSideways, bool isRightToLeft, void* brush, int32_t glyphOrientation) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DrawInlineObject(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&point), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject const*>(&inlineObject), isSideways, isRightToLeft, *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&brush), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const*>(&glyphOrientation));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PixelSnappingDisabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().PixelSnappingDisabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Transform(winrt::Windows::Foundation::Numerics::float3x2* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float3x2>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float3x2>(this->shim().Transform());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Dpi(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().Dpi());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters>
    {
        int32_t __stdcall get_RenderingMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode>(this->shim().RenderingMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GridFit(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextGridFit>(this->shim().GridFit());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParametersFactory> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParametersFactory>
    {
        int32_t __stdcall Create(int32_t textRenderingMode, int32_t gridFit, void** textRenderingParameters) noexcept final try
        {
            clear_abi(textRenderingParameters);
            typename D::abi_guard guard(this->shim());
            *textRenderingParameters = detach_from<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters>(this->shim().Create(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode const*>(&textRenderingMode), *reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextGridFit const*>(&gridFit)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography> : produce_base<D, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography>
    {
        int32_t __stdcall AddFeature(struct struct_Microsoft_Graphics_Canvas_Text_CanvasTypographyFeature feature) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AddFeature(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeature const*>(&feature));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddFeatureWithNameAndParameter(int32_t name, uint32_t parameter) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AddFeature(*reinterpret_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypographyFeatureName const*>(&name), parameter);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetFeatures(uint32_t* __featuresSize, struct struct_Microsoft_Graphics_Canvas_Text_CanvasTypographyFeature** features) noexcept final try
        {
            clear_abi(features);
            typename D::abi_guard guard(this->shim());
            std::tie(*__featuresSize, *features) = detach_abi(this->shim().GetFeatures());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
}
WINRT_EXPORT namespace winrt::Microsoft::Graphics::Canvas::Text
{
    constexpr auto operator|(CanvasClusterProperties const left, CanvasClusterProperties const right) noexcept
    {
        return static_cast<CanvasClusterProperties>(impl::to_underlying_type(left) | impl::to_underlying_type(right));
    }
    constexpr auto operator|=(CanvasClusterProperties& left, CanvasClusterProperties const right) noexcept
    {
        left = left | right;
        return left;
    }
    constexpr auto operator&(CanvasClusterProperties const left, CanvasClusterProperties const right) noexcept
    {
        return static_cast<CanvasClusterProperties>(impl::to_underlying_type(left) & impl::to_underlying_type(right));
    }
    constexpr auto operator&=(CanvasClusterProperties& left, CanvasClusterProperties const right) noexcept
    {
        left = left & right;
        return left;
    }
    constexpr auto operator~(CanvasClusterProperties const value) noexcept
    {
        return static_cast<CanvasClusterProperties>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(CanvasClusterProperties const left, CanvasClusterProperties const right) noexcept
    {
        return static_cast<CanvasClusterProperties>(impl::to_underlying_type(left) ^ impl::to_underlying_type(right));
    }
    constexpr auto operator^=(CanvasClusterProperties& left, CanvasClusterProperties const right) noexcept
    {
        left = left ^ right;
        return left;
    }
    constexpr auto operator|(CanvasDrawTextOptions const left, CanvasDrawTextOptions const right) noexcept
    {
        return static_cast<CanvasDrawTextOptions>(impl::to_underlying_type(left) | impl::to_underlying_type(right));
    }
    constexpr auto operator|=(CanvasDrawTextOptions& left, CanvasDrawTextOptions const right) noexcept
    {
        left = left | right;
        return left;
    }
    constexpr auto operator&(CanvasDrawTextOptions const left, CanvasDrawTextOptions const right) noexcept
    {
        return static_cast<CanvasDrawTextOptions>(impl::to_underlying_type(left) & impl::to_underlying_type(right));
    }
    constexpr auto operator&=(CanvasDrawTextOptions& left, CanvasDrawTextOptions const right) noexcept
    {
        left = left & right;
        return left;
    }
    constexpr auto operator~(CanvasDrawTextOptions const value) noexcept
    {
        return static_cast<CanvasDrawTextOptions>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(CanvasDrawTextOptions const left, CanvasDrawTextOptions const right) noexcept
    {
        return static_cast<CanvasDrawTextOptions>(impl::to_underlying_type(left) ^ impl::to_underlying_type(right));
    }
    constexpr auto operator^=(CanvasDrawTextOptions& left, CanvasDrawTextOptions const right) noexcept
    {
        left = left ^ right;
        return left;
    }
    constexpr auto operator|(CanvasFontSimulations const left, CanvasFontSimulations const right) noexcept
    {
        return static_cast<CanvasFontSimulations>(impl::to_underlying_type(left) | impl::to_underlying_type(right));
    }
    constexpr auto operator|=(CanvasFontSimulations& left, CanvasFontSimulations const right) noexcept
    {
        left = left | right;
        return left;
    }
    constexpr auto operator&(CanvasFontSimulations const left, CanvasFontSimulations const right) noexcept
    {
        return static_cast<CanvasFontSimulations>(impl::to_underlying_type(left) & impl::to_underlying_type(right));
    }
    constexpr auto operator&=(CanvasFontSimulations& left, CanvasFontSimulations const right) noexcept
    {
        left = left & right;
        return left;
    }
    constexpr auto operator~(CanvasFontSimulations const value) noexcept
    {
        return static_cast<CanvasFontSimulations>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(CanvasFontSimulations const left, CanvasFontSimulations const right) noexcept
    {
        return static_cast<CanvasFontSimulations>(impl::to_underlying_type(left) ^ impl::to_underlying_type(right));
    }
    constexpr auto operator^=(CanvasFontSimulations& left, CanvasFontSimulations const right) noexcept
    {
        left = left ^ right;
        return left;
    }
    inline CanvasFontSet::CanvasFontSet(winrt::Windows::Foundation::Uri const& uri) :
        CanvasFontSet(impl::call_factory<CanvasFontSet, ICanvasFontSetFactory>([&](ICanvasFontSetFactory const& f) { return f.Create(uri); }))
    {
    }
    inline auto CanvasFontSet::GetSystemFontSet()
    {
        return impl::call_factory_cast<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet(*)(ICanvasFontSetStatics const&), CanvasFontSet, ICanvasFontSetStatics>([](ICanvasFontSetStatics const& f) { return f.GetSystemFontSet(); });
    }
    inline CanvasNumberSubstitution::CanvasNumberSubstitution(winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitutionMethod const& method) :
        CanvasNumberSubstitution(impl::call_factory<CanvasNumberSubstitution, ICanvasNumberSubstitutionFactory>([&](ICanvasNumberSubstitutionFactory const& f) { return f.Create(method); }))
    {
    }
    inline CanvasNumberSubstitution::CanvasNumberSubstitution(winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitutionMethod const& method, param::hstring const& localeName, bool ignoreEnvironmentOverrides) :
        CanvasNumberSubstitution(impl::call_factory<CanvasNumberSubstitution, ICanvasNumberSubstitutionFactory>([&](ICanvasNumberSubstitutionFactory const& f) { return f.CreateWithLocaleAndIgnoreOverrides(method, localeName, ignoreEnvironmentOverrides); }))
    {
    }
    inline CanvasTextAnalyzer::CanvasTextAnalyzer(param::hstring const& text, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection) :
        CanvasTextAnalyzer(impl::call_factory<CanvasTextAnalyzer, ICanvasTextAnalyzerFactory>([&](ICanvasTextAnalyzerFactory const& f) { return f.Create(text, textDirection); }))
    {
    }
    inline CanvasTextAnalyzer::CanvasTextAnalyzer(param::hstring const& text, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection, winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution const& numberSubstitution, winrt::Microsoft::Graphics::Canvas::Text::CanvasVerticalGlyphOrientation const& verticalGlyphOrientation, uint32_t bidiLevel) :
        CanvasTextAnalyzer(impl::call_factory<CanvasTextAnalyzer, ICanvasTextAnalyzerFactory>([&](ICanvasTextAnalyzerFactory const& f) { return f.CreateWithNumberSubstitutionAndVerticalGlyphOrientationAndBidiLevel(text, textDirection, numberSubstitution, verticalGlyphOrientation, bidiLevel); }))
    {
    }
    inline CanvasTextAnalyzer::CanvasTextAnalyzer(param::hstring const& text, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextDirection const& textDirection, winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions const& options) :
        CanvasTextAnalyzer(impl::call_factory<CanvasTextAnalyzer, ICanvasTextAnalyzerFactory>([&](ICanvasTextAnalyzerFactory const& f) { return f.CreateWithOptions(text, textDirection, options); }))
    {
    }
    inline CanvasTextFormat::CanvasTextFormat() :
        CanvasTextFormat(impl::call_factory_cast<CanvasTextFormat(*)(winrt::Windows::Foundation::IActivationFactory const&), CanvasTextFormat>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<CanvasTextFormat>(); }))
    {
    }
    inline auto CanvasTextFormat::GetSystemFontFamilies()
    {
        return impl::call_factory_cast<com_array<hstring>(*)(ICanvasTextFormatStatics const&), CanvasTextFormat, ICanvasTextFormatStatics>([](ICanvasTextFormatStatics const& f) { return f.GetSystemFontFamilies(); });
    }
    inline auto CanvasTextFormat::GetSystemFontFamilies(param::vector_view<hstring> const& localeList)
    {
        return impl::call_factory<CanvasTextFormat, ICanvasTextFormatStatics>([&](ICanvasTextFormatStatics const& f) { return f.GetSystemFontFamilies(localeList); });
    }
    inline CanvasTextLayout::CanvasTextLayout(winrt::Microsoft::Graphics::Canvas::ICanvasResourceCreator const& resourceCreator, param::hstring const& textString, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat const& textFormat, float requestedWidth, float requestedHeight) :
        CanvasTextLayout(impl::call_factory<CanvasTextLayout, ICanvasTextLayoutFactory>([&](ICanvasTextLayoutFactory const& f) { return f.Create(resourceCreator, textString, textFormat, requestedWidth, requestedHeight); }))
    {
    }
    inline auto CanvasTextLayout::GetGlyphOrientationTransform(winrt::Microsoft::Graphics::Canvas::Text::CanvasGlyphOrientation const& glyphOrientation, bool isSideways, winrt::Windows::Foundation::Numerics::float2 const& position)
    {
        return impl::call_factory<CanvasTextLayout, ICanvasTextLayoutStatics>([&](ICanvasTextLayoutStatics const& f) { return f.GetGlyphOrientationTransform(glyphOrientation, isSideways, position); });
    }
    inline CanvasTextRenderingParameters::CanvasTextRenderingParameters(winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingMode const& textRenderingMode, winrt::Microsoft::Graphics::Canvas::Text::CanvasTextGridFit const& gridFit) :
        CanvasTextRenderingParameters(impl::call_factory<CanvasTextRenderingParameters, ICanvasTextRenderingParametersFactory>([&](ICanvasTextRenderingParametersFactory const& f) { return f.Create(textRenderingMode, gridFit); }))
    {
    }
    inline CanvasTypography::CanvasTypography() :
        CanvasTypography(impl::call_factory_cast<CanvasTypography(*)(winrt::Windows::Foundation::IActivationFactory const&), CanvasTypography>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<CanvasTypography>(); }))
    {
    }
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontFace> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSet> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasFontSetStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitution> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasNumberSubstitutionFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasScaledFont> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextAnalyzerOptions> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormat> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextFormatStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextInlineObject> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextLayoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParameters> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTextRenderingParametersFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::ICanvasTypography> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontFace> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasFontSet> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasNumberSubstitution> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasScaledFont> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextAnalyzer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextFormat> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasTextRenderingParameters> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Graphics::Canvas::Text::CanvasTypography> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif
