• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • JeremyAnsel.DirectX.D2D1
      • D2D1AlphaMode
      • D2D1AntialiasMode
      • D2D1ArcSegment
      • D2D1ArcSize
      • D2D1BezierSegment
      • D2D1Bitmap
      • D2D1BitmapBrush
      • D2D1BitmapBrushProperties
      • D2D1BitmapInterpolationMode
      • D2D1BitmapProperties
      • D2D1BitmapRenderTarget
      • D2D1Brush
      • D2D1BrushProperties
      • D2D1CapStyle
      • D2D1ColorF
      • D2D1CombineMode
      • D2D1CompatibleRenderTargetOptions
      • D2D1Constants
      • D2D1DCInitializeMode
      • D2D1DCRenderTarget
      • D2D1DashStyle
      • D2D1DebugLevel
      • D2D1DrawTextOptions
      • D2D1DrawingStateBlock
      • D2D1DrawingStateDescription
      • D2D1Ellipse
      • D2D1EllipseGeometry
      • D2D1Error
      • D2D1ExtendMode
      • D2D1Factory
      • D2D1FactoryOptions
      • D2D1FactoryType
      • D2D1FeatureLevel
      • D2D1FigureBegin
      • D2D1FigureEnd
      • D2D1FillMode
      • D2D1Gamma
      • D2D1Geometry
      • D2D1GeometryGroup
      • D2D1GeometryRelation
      • D2D1GeometrySimplificationOption
      • D2D1GeometrySink
      • D2D1GradientStop
      • D2D1GradientStopCollection
      • D2D1HwndRenderTarget
      • D2D1HwndRenderTargetProperties
      • D2D1Image
      • D2D1InterpolationModeDefinition
      • D2D1KnownColor
      • D2D1Layer
      • D2D1LayerOptions
      • D2D1LayerParameters
      • D2D1LineJoin
      • D2D1LinearGradientBrush
      • D2D1LinearGradientBrushProperties
      • D2D1Matrix3X2F
      • D2D1Matrix4X3F
      • D2D1Matrix4X4F
      • D2D1Matrix5X4F
      • D2D1Mesh
      • D2D1OpacityMaskContent
      • D2D1PathGeometry
      • D2D1PathSegmentOptions
      • D2D1PixelFormat
      • D2D1Point2F
      • D2D1Point2L
      • D2D1Point2U
      • D2D1PresentOptions
      • D2D1QuadraticBezierSegment
      • D2D1RadialGradientBrush
      • D2D1RadialGradientBrushProperties
      • D2D1RectF
      • D2D1RectL
      • D2D1RectU
      • D2D1RectangleGeometry
      • D2D1RenderTarget
      • D2D1RenderTargetProperties
      • D2D1RenderTargetType
      • D2D1RenderTargetUsages
      • D2D1Resource
      • D2D1RoundedRect
      • D2D1RoundedRectangleGeometry
      • D2D1SimplifiedGeometrySink
      • D2D1SizeF
      • D2D1SizeU
      • D2D1SolidColorBrush
      • D2D1StrokeStyle
      • D2D1StrokeStyleProperties
      • D2D1SweepDirection
      • D2D1TessellationSink
      • D2D1TextAntialiasMode
      • D2D1TransformedGeometry
      • D2D1Triangle
      • D2D1Vector2F
      • D2D1Vector3F
      • D2D1Vector4F
      • D2D1WindowStates
    • JeremyAnsel.DirectX.D3D10
      • D3D10CreateDeviceOptions
      • D3D10Device1
      • D3D10DriverType
      • D3D10Error
      • D3D10FeatureLevel
    • JeremyAnsel.DirectX.D3D11
      • D3D11AsyncGetDataOptions
      • D3D11Asynchronous
      • D3D11BindOptions
      • D3D11BlendDesc
      • D3D11BlendOperation
      • D3D11BlendState
      • D3D11BlendValue
      • D3D11Box
      • D3D11Buffer
      • D3D11BufferDesc
      • D3D11BufferExSrv
      • D3D11BufferExSrvOptions
      • D3D11BufferRtv
      • D3D11BufferSrv
      • D3D11BufferUav
      • D3D11BufferUavOptions
      • D3D11ClassInstance
      • D3D11ClassInstanceDesc
      • D3D11ClassLinkage
      • D3D11ClearOptions
      • D3D11ColorWriteEnables
      • D3D11CommandList
      • D3D11ComparisonFunction
      • D3D11ComputeShader
      • D3D11Constants
      • D3D11Counter
      • D3D11CounterDataType
      • D3D11CounterDesc
      • D3D11CounterInfo
      • D3D11CounterType
      • D3D11CpuAccessOptions
      • D3D11CreateDeviceOptions
      • D3D11CullMode
      • D3D11DepthStencilDesc
      • D3D11DepthStencilOperationDesc
      • D3D11DepthStencilState
      • D3D11DepthStencilView
      • D3D11DepthStencilViewDesc
      • D3D11DepthStencilViewOptions
      • D3D11DepthWriteMask
      • D3D11Device
      • D3D11DeviceAndContext
      • D3D11DeviceChild
      • D3D11DeviceContext
      • D3D11DeviceContextType
      • D3D11DomainShader
      • D3D11DriverType
      • D3D11DsvDimension
      • D3D11Error
      • D3D11Feature
      • D3D11FeatureDataArchitectureInfo
      • D3D11FeatureDataD3D10XHardwareOptions
      • D3D11FeatureDataD3D11Options
      • D3D11FeatureDataD3D11Options1
      • D3D11FeatureDataD3D9Options
      • D3D11FeatureDataD3D9Options1
      • D3D11FeatureDataD3D9ShadowSupport
      • D3D11FeatureDataD3D9SimpleInstancingSupport
      • D3D11FeatureDataDoubles
      • D3D11FeatureDataFormatSupport
      • D3D11FeatureDataFormatSupport2
      • D3D11FeatureDataMarkerSupport
      • D3D11FeatureDataShaderMinPrecisionSupport
      • D3D11FeatureDataThreading
      • D3D11FeatureLevel
      • D3D11FillMode
      • D3D11Filter
      • D3D11FormatSupport
      • D3D11FormatSupport2
      • D3D11GeometryShader
      • D3D11HullShader
      • D3D11InputClassification
      • D3D11InputElementDesc
      • D3D11InputLayout
      • D3D11MapCpuPermission
      • D3D11MapOptions
      • D3D11MappedSubResource
      • D3D11PixelShader
      • D3D11Predicate
      • D3D11Primitive
      • D3D11PrimitiveTopology
      • D3D11Query
      • D3D11QueryDataPipelineStatistics
      • D3D11QueryDataStreamOutputStatistics
      • D3D11QueryDataTimestampDisjoint
      • D3D11QueryDesc
      • D3D11QueryMiscOptions
      • D3D11QueryType
      • D3D11RaiseOptions
      • D3D11RasterizerDesc
      • D3D11RasterizerState
      • D3D11Rect
      • D3D11RenderTargetBlendDesc
      • D3D11RenderTargetView
      • D3D11RenderTargetViewDesc
      • D3D11Resource
      • D3D11ResourceDimension
      • D3D11ResourceMiscOptions
      • D3D11RtvDimension
      • D3D11SamplerDesc
      • D3D11SamplerState
      • D3D11ShaderMinPrecisionSupports
      • D3D11ShaderResourceView
      • D3D11ShaderResourceViewDesc
      • D3D11SrvDimension
      • D3D11StencilOperation
      • D3D11StreamOutputDeclarationEntry
      • D3D11SubResourceData
      • D3D11SubResourceDataPtr
      • D3D11Texture1D
      • D3D11Texture1DArrayDsv
      • D3D11Texture1DArrayRtv
      • D3D11Texture1DArraySrv
      • D3D11Texture1DArrayUav
      • D3D11Texture1DDesc
      • D3D11Texture1DDsv
      • D3D11Texture1DRtv
      • D3D11Texture1DSrv
      • D3D11Texture1DUav
      • D3D11Texture2D
      • D3D11Texture2DArrayDsv
      • D3D11Texture2DArrayRtv
      • D3D11Texture2DArraySrv
      • D3D11Texture2DArrayUav
      • D3D11Texture2DDesc
      • D3D11Texture2DDsv
      • D3D11Texture2DMsArrayDsv
      • D3D11Texture2DMsArrayRtv
      • D3D11Texture2DMsArraySrv
      • D3D11Texture2DMsDsv
      • D3D11Texture2DMsRtv
      • D3D11Texture2DMsSrv
      • D3D11Texture2DRtv
      • D3D11Texture2DSrv
      • D3D11Texture2DUav
      • D3D11Texture3D
      • D3D11Texture3DDesc
      • D3D11Texture3DRtv
      • D3D11Texture3DSrv
      • D3D11Texture3DUav
      • D3D11TextureAddressMode
      • D3D11TextureCubeArraySrv
      • D3D11TextureCubeFace
      • D3D11TextureCubeSrv
      • D3D11TiledResourcesTier
      • D3D11UavDimension
      • D3D11UnorderedAccessView
      • D3D11UnorderedAccessViewDesc
      • D3D11Usage
      • D3D11Utils
      • D3D11VertexBufferBinding
      • D3D11VertexShader
      • D3D11View
      • D3D11Viewport
      • D3D11WellKnownPrivateDataId
      • DxgiSwapChainExtensions
    • JeremyAnsel.DirectX.D3DCompiler
      • D3DCompile
      • D3DCompileOptions
      • D3DCompileResult
      • D3DDisassembleOptions
      • D3DShaderMacro
      • D3DTargets
    • JeremyAnsel.DirectX.DWrite
      • DWriteBreakCondition
      • DWriteClusterMetrics
      • DWriteError
      • DWriteFactory
      • DWriteFactoryType
      • DWriteFlowDirection
      • DWriteFont
      • DWriteFontCollection
      • DWriteFontFace
      • DWriteFontFaceType
      • DWriteFontFamily
      • DWriteFontFeature
      • DWriteFontFeatureTag
      • DWriteFontFile
      • DWriteFontFileType
      • DWriteFontList
      • DWriteFontMetrics
      • DWriteFontSimulations
      • DWriteFontStretch
      • DWriteFontStyle
      • DWriteFontWeight
      • DWriteGlyphMetrics
      • DWriteGlyphOffset
      • DWriteGlyphRun
      • DWriteGlyphRunDescription
      • DWriteHitTestMetrics
      • DWriteInformationalStringId
      • DWriteInlineObjectMetrics
      • DWriteLineBreakpoint
      • DWriteLineMetrics
      • DWriteLineSpacingMethod
      • DWriteLocalizedStrings
      • DWriteMatrix
      • DWriteMeasuringMode
      • DWriteNumberSubstitutionMethod
      • DWriteOverhangMetrics
      • DWriteParagraphAlignment
      • DWritePixelGeometry
      • DWriteReadingDirection
      • DWriteRect
      • DWriteRenderingMode
      • DWriteRenderingParams
      • DWriteScriptAnalysis
      • DWriteScriptShape
      • DWriteShapingGlyphProperties
      • DWriteShapingTextProperties
      • DWriteSize
      • DWriteStrikethrough
      • DWriteTextAlignment
      • DWriteTextFormat
      • DWriteTextLayout
      • DWriteTextMetrics
      • DWriteTextRange
      • DWriteTextureType
      • DWriteTrimming
      • DWriteTrimmingGranularity
      • DWriteTypography
      • DWriteUnderline
      • DWriteWordWrapping
    • JeremyAnsel.DirectX.DXCommon
      • DXComObject
      • DXMarshal
      • DXProcessMemoryCounters
      • DXUtils
    • JeremyAnsel.DirectX.DXMath
      • XMColor
      • XMComparisonRecord
      • XMFloat2
      • XMFloat3
      • XMFloat3X3
      • XMFloat4
      • XMFloat4X3
      • XMFloat4X4
      • XMInt2
      • XMInt3
      • XMInt4
      • XMKnownColor
      • XMMath
      • XMMatrix
      • XMPermutation
      • XMPlane
      • XMQuaternion
      • XMScalar
      • XMSelection
      • XMSwizzle
      • XMUInt2
      • XMUInt3
      • XMUInt4
      • XMVector
      • XMVector2
      • XMVector3
      • XMVector4
    • JeremyAnsel.DirectX.DXMath.Collision
      • BoundingBox
      • BoundingFrustum
      • BoundingOrientedBox
      • BoundingSphere
      • ContainmentType
      • PlaneIntersectionType
      • TriangleTest
    • JeremyAnsel.DirectX.DXMath.PackedVector
      • Half
      • XMByte2
      • XMByte4
      • XMByteN2
      • XMByteN4
      • XMColorRgba
      • XMDec4
      • XMDecN4
      • XMFloat3Packed
      • XMFloat3SharedExponent
      • XMHalf2
      • XMHalf4
      • XMShort2
      • XMShort4
      • XMShortN2
      • XMShortN4
      • XMU555
      • XMU565
      • XMUByte2
      • XMUByte4
      • XMUByteN2
      • XMUByteN4
      • XMUDec4
      • XMUDecN4
      • XMUDecN4XR
      • XMUNibble4
      • XMUShort2
      • XMUShort4
      • XMUShortN2
      • XMUShortN4
      • XMXDec4
      • XMXDecN4
    • JeremyAnsel.DirectX.DirectInput
      • DirectInputConstants
      • DirectInputCooperativeLevels
      • DirectInputDataFormat
      • DirectInputDataOptions
      • DirectInputDefaultEffectType
      • DirectInputDevice
      • DirectInputDeviceCapabilities
      • DirectInputDeviceCapabilitiesOptions
      • DirectInputDeviceEnumClasses
      • DirectInputDeviceEnumOptions
      • DirectInputDeviceInfo
      • DirectInputDeviceObjectInfo
      • DirectInputEffect
      • DirectInputEffectConstants
      • DirectInputEffectData
      • DirectInputEffectDataCondition
      • DirectInputEffectDataConstantForce
      • DirectInputEffectDataCustomForce
      • DirectInputEffectDataPeriodic
      • DirectInputEffectDataRampForce
      • DirectInputEffectEnvelope
      • DirectInputEffectInfo
      • DirectInputEffectParameterOptions
      • DirectInputEffectParametersData
      • DirectInputEffectParametersDataOptions
      • DirectInputEffectStartOptions
      • DirectInputEffectStatus
      • DirectInputEffectTypes
      • DirectInputFactory
      • DirectInputForceFeedbackCommands
      • DirectInputForceFeedbackStates
      • DirectInputGuids
      • DirectInputHowTypes
      • DirectInputJoystick2Objects
      • DirectInputJoystickObjects
      • DirectInputJoystickState
      • DirectInputJoystickState2
      • DirectInputKeyboardKeys
      • DirectInputKeyboardState
      • DirectInputMouse2Objects
      • DirectInputMouseObjects
      • DirectInputMouseState
      • DirectInputMouseState2
      • DirectInputObjectDataFormat
      • DirectInputObjectDataOptions
      • DirectInputObjectDataTypes
      • DirectInputPropertyTypes
    • JeremyAnsel.DirectX.Dxgi
      • DxgiAdapter
      • DxgiAdapter1
      • DxgiAdapter2
      • DxgiAdapter3
      • DxgiAdapter4
      • DxgiAdapterDesc
      • DxgiAdapterDesc1
      • DxgiAdapterDesc2
      • DxgiAdapterType
      • DxgiAlphaMode
      • DxgiColorRgb
      • DxgiColorRgba
      • DxgiComputePreemptionGranularity
      • DxgiCpuAccess
      • DxgiCreateFactoryOptions
      • DxgiDevice
      • DxgiDevice1
      • DxgiDevice2
      • DxgiDevice3
      • DxgiDeviceSubObject
      • DxgiEnumModes
      • DxgiError
      • DxgiFactory
      • DxgiFactory1
      • DxgiFactory2
      • DxgiFactory3
      • DxgiFormat
      • DxgiFrameStatistics
      • DxgiGammaControl
      • DxgiGammaControlCapabilities
      • DxgiGraphicsPreemptionGranularity
      • DxgiKeyedMutex
      • DxgiMapOptions
      • DxgiMappedRect
      • DxgiMatrix3x2F
      • DxgiMemorySegmentGroup
      • DxgiModeDesc
      • DxgiModeDesc1
      • DxgiModeRotation
      • DxgiModeScaling
      • DxgiModeScanlineOrder
      • DxgiObject
      • DxgiOfferResourcePriority
      • DxgiOutput
      • DxgiOutput1
      • DxgiOutput2
      • DxgiOutput3
      • DxgiOutputDesc
      • DxgiPoint
      • DxgiPresentOptions
      • DxgiPresentParameters
      • DxgiQueryVideoMemoryInfo
      • DxgiRational
      • DxgiRect
      • DxgiResidency
      • DxgiResource
      • DxgiResource1
      • DxgiResource2
      • DxgiResource3
      • DxgiResourceEvictionPriority
      • DxgiSampleDesc
      • DxgiScaling
      • DxgiSharedResource
      • DxgiSharedResourceAccess
      • DxgiSurface
      • DxgiSurface1
      • DxgiSurface2
      • DxgiSurface3
      • DxgiSurfaceDesc
      • DxgiSwapChain
      • DxgiSwapChain1
      • DxgiSwapChain2
      • DxgiSwapChain3
      • DxgiSwapChainDesc
      • DxgiSwapChainDesc1
      • DxgiSwapChainFullscreenDesc
      • DxgiSwapChainOptions
      • DxgiSwapEffect
      • DxgiUsages
      • DxgiWindowAssociationOptions
    • JeremyAnsel.DirectX.WinCodec
      • Wic8BIMIptcDigestProperties
      • Wic8BIMIptcProperties
      • Wic8BIMResolutionInfoProperties
      • WicBitmap
      • WicBitmapAlphaChannelOption
      • WicBitmapChainType
      • WicBitmapClipper
      • WicBitmapCodecInfo
      • WicBitmapCreateCacheOption
      • WicBitmapDecoder
      • WicBitmapDecoderCapabilities
      • WicBitmapDecoderInfo
      • WicBitmapDitherType
      • WicBitmapEncoder
      • WicBitmapEncoderCacheOption
      • WicBitmapEncoderInfo
      • WicBitmapFlipRotator
      • WicBitmapFrameDecode
      • WicBitmapFrameEncode
      • WicBitmapInterpolationMode
      • WicBitmapLock
      • WicBitmapLockFlags
      • WicBitmapPaletteType
      • WicBitmapPlane
      • WicBitmapPlaneDescription
      • WicBitmapScaler
      • WicBitmapSource
      • WicBitmapToneMappingMode
      • WicBitmapTransformOptions
      • WicColor
      • WicColorContext
      • WicColorContextType
      • WicColorTransform
      • WicComponentEnumerateOptions
      • WicComponentInfo
      • WicComponentSigning
      • WicComponentType
      • WicD2D1AlphaMode
      • WicD2D1PixelFormat
      • WicDdsAlphaMode
      • WicDdsDecoder
      • WicDdsDimension
      • WicDdsEncoder
      • WicDdsFormatInfo
      • WicDdsFrameDecode
      • WicDdsParameters
      • WicDecodeOptions
      • WicDxgiFormat
      • WicFormatConverter
      • WicFormatConverterInfo
      • WicGainMapProperties
      • WicGifApplicationExtensionProperties
      • WicGifCommentExtensionProperties
      • WicGifGraphicControlExtensionProperties
      • WicGifImageDescriptorProperties
      • WicGifLogicalScreenDescriptorProperties
      • WicGuids
      • WicHeifCompressionOption
      • WicHeifHdrProperties
      • WicHeifProperties
      • WicImageEncoder
      • WicImageParameters
      • WicImagingFactory
      • WicJpegChrominanceProperties
      • WicJpegCommentProperties
      • WicJpegIndexingOptions
      • WicJpegLuminanceProperties
      • WicJpegScanType
      • WicJpegTransferMatrix
      • WicJpegXLAnimFrameProperties
      • WicJpegXLAnimProperties
      • WicJpegYCrCbSubsamplingOption
      • WicNamedWhitePoint
      • WicPalette
      • WicPixelFormatGuid
      • WicPixelFormatInfo
      • WicPixelFormatNumericRepresentation
      • WicPlanarBitmapFrameEncode
      • WicPlanarFormatConverter
      • WicPlanarOptions
      • WicPngBkgdProperties
      • WicPngChrmProperties
      • WicPngFilterOption
      • WicPngGamaProperties
      • WicPngHistProperties
      • WicPngIccpProperties
      • WicPngItxtProperties
      • WicPngSrgbProperties
      • WicPngTimeProperties
      • WicProgressNotification
      • WicProgressOperation
      • WicRawCapabilities
      • WicRawParameterSet
      • WicRawRenderMode
      • WicRawRotationCapabilities
      • WicRect
      • WicSectionAccessLevel
      • WicTiffCompressionOption
      • WicWebpAnimProperties
      • WicWebpAnmfProperties
      • WicWin32GenericAccessRights

    Class DWriteTextLayout

    The IDWriteTextLayout interface represents a block of text after it has been fully analyzed and formatted. All coordinates are in device independent pixels (DIPs).

    Inheritance
    object
    DXComObject
    DWriteTextFormat
    DWriteTextLayout
    Implements
    IDisposable
    Inherited Members
    DWriteTextFormat.DWriteTextFormatGuid
    DWriteTextFormat.TextAlignment
    DWriteTextFormat.ParagraphAlignment
    DWriteTextFormat.WordWrapping
    DWriteTextFormat.ReadingDirection
    DWriteTextFormat.FlowDirection
    DWriteTextFormat.IncrementalTabStop
    DWriteTextFormat.FontWeight
    DWriteTextFormat.FontStyle
    DWriteTextFormat.FontStretch
    DWriteTextFormat.FontSize
    DWriteTextFormat.SetTrimming(in DWriteTrimming)
    DWriteTextFormat.SetLineSpacing(DWriteLineSpacingMethod, float, float)
    DWriteTextFormat.GetTrimming()
    DWriteTextFormat.GetLineSpacing(out DWriteLineSpacingMethod, out float, out float)
    DWriteTextFormat.GetFontCollection()
    DWriteTextFormat.GetFontFamilyNameLength()
    DWriteTextFormat.GetFontFamilyName()
    DWriteTextFormat.GetFontFamilyName(Span<char>)
    DWriteTextFormat.GetLocaleNameLength()
    DWriteTextFormat.GetLocaleName()
    DWriteTextFormat.GetLocaleName(Span<char>)
    DXComObject.Handle
    DXComObject.Dispose()
    DXComObject.AddRef()
    DXComObject.Release()
    DXComObject.QueryInterface(in Guid)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: JeremyAnsel.DirectX.DWrite
    Assembly: JeremyAnsel.DirectX.DWrite.dll
    Syntax
    [SecurityCritical]
    public class DWriteTextLayout : DWriteTextFormat, IDisposable

    Constructors

    | Edit this page View Source

    DWriteTextLayout(nint)

    Initializes a new instance of the DWriteTextLayout class.

    Declaration
    public DWriteTextLayout(nint comPtr)
    Parameters
    Type Name Description
    nint comPtr

    Fields

    | Edit this page View Source

    DWriteTextLayoutGuid

    The interface GUID.

    Declaration
    public static readonly Guid DWriteTextLayoutGuid
    Field Value
    Type Description
    Guid

    Properties

    | Edit this page View Source

    MaxHeight

    Gets or sets the layout maximum height

    Declaration
    public float MaxHeight { get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    MaxWidth

    Gets or sets the layout maximum width

    Declaration
    public float MaxWidth { get; set; }
    Property Value
    Type Description
    float

    Methods

    | Edit this page View Source

    DetermineMinWidth()

    Determines the minimum possible width the layout can be set to without emergency breaking between the characters of whole words.

    Declaration
    public float DetermineMinWidth()
    Returns
    Type Description
    float

    float

    | Edit this page View Source

    GetFontCollection(uint, out DWriteTextRange)

    Get the font collection where the current position is at.

    Declaration
    public DWriteFontCollection GetFontCollection(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    Text range to which this change applies.

    Returns
    Type Description
    DWriteFontCollection

    DWriteFontCollection

    | Edit this page View Source

    GetFontFamilyName(uint, out DWriteTextRange)

    Copy the font family name where the current position is at.

    Declaration
    public string GetFontFamilyName(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    string

    string

    | Edit this page View Source

    GetFontFamilyName(uint, out DWriteTextRange, Span<char>)

    Copy the font family name where the current position is at.

    Declaration
    public void GetFontFamilyName(uint currentPosition, out DWriteTextRange textRange, Span<char> name)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Span<char> name

    The name.

    | Edit this page View Source

    GetFontFamilyNameLength(uint, out DWriteTextRange)

    Get the length of the font family name where the current position is at.

    Declaration
    public uint GetFontFamilyNameLength(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    uint
    | Edit this page View Source

    GetFontSize(uint, out DWriteTextRange)

    Get the font em height where the current position is at.

    Declaration
    public float GetFontSize(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    float

    float

    | Edit this page View Source

    GetFontStretch(uint, out DWriteTextRange)

    Get the font stretch where the current position is at.

    Declaration
    public DWriteFontStretch GetFontStretch(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    DWriteFontStretch

    DWriteFontStretch

    | Edit this page View Source

    GetFontStyle(uint, out DWriteTextRange)

    Get the font style where the current position is at.

    Declaration
    public DWriteFontStyle GetFontStyle(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    DWriteFontStyle

    DWriteFontStyle

    | Edit this page View Source

    GetFontWeight(uint, out DWriteTextRange)

    Get the font weight where the current position is at.

    Declaration
    public DWriteFontWeight GetFontWeight(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    DWriteFontWeight

    DWriteFontWeight

    | Edit this page View Source

    GetLocaleName(uint, out DWriteTextRange)

    Get the locale name where the current position is at.

    Declaration
    public string GetLocaleName(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    string

    string

    | Edit this page View Source

    GetLocaleName(uint, out DWriteTextRange, Span<char>)

    Get the locale name where the current position is at.

    Declaration
    public void GetLocaleName(uint currentPosition, out DWriteTextRange textRange, Span<char> name)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Span<char> name

    The name.

    | Edit this page View Source

    GetLocaleNameLength(uint, out DWriteTextRange)

    Get the length of the locale name where the current position is at.

    Declaration
    public uint GetLocaleNameLength(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    uint
    | Edit this page View Source

    GetMetrics()

    GetMetrics retrieves overall metrics for the formatted string.

    Declaration
    public DWriteTextMetrics GetMetrics()
    Returns
    Type Description
    DWriteTextMetrics

    DWriteTextMetrics

    Remarks

    Drawing effects like underline and strikethrough do not contribute to the text size, which is essentially the sum of advance widths and line heights. Additionally, visible swashes and other graphic adornments may extend outside the returned width and height.

    | Edit this page View Source

    GetOverhangMetrics()

    GetOverhangMetrics returns the overhangs (in DIPs) of the layout and all objects contained in it, including text glyphs and inline objects.

    Declaration
    public DWriteOverhangMetrics GetOverhangMetrics()
    Returns
    Type Description
    DWriteOverhangMetrics

    DWriteOverhangMetrics

    Remarks

    Any underline and strikethrough do not contribute to the black box determination, since these are actually drawn by the renderer, which is allowed to draw them in any variety of styles.

    | Edit this page View Source

    GetStrikethrough(uint, out DWriteTextRange)

    Get the strikethrough presence where the current position is at.

    Declaration
    public bool GetStrikethrough(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    GetTypography(uint, out DWriteTextRange)

    Get the typography setting where the current position is at.

    Declaration
    public DWriteTypography GetTypography(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    DWriteTypography

    DWriteTypography

    | Edit this page View Source

    GetUnderline(uint, out DWriteTextRange)

    Get the underline presence where the current position is at.

    Declaration
    public bool GetUnderline(uint currentPosition, out DWriteTextRange textRange)
    Parameters
    Type Name Description
    uint currentPosition

    The current text position.

    DWriteTextRange textRange

    The position range of the current format.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    HitTestPoint(float, float, out bool, out bool)

    Given a coordinate (in DIPs) relative to the top-left of the layout box, this returns the corresponding hit-test metrics of the text string where the hit-test has occurred. This is useful for mapping mouse clicks to caret positions. When the given coordinate is outside the text string, the function sets the output value isInside to false but returns the nearest character position.

    Declaration
    public DWriteHitTestMetrics HitTestPoint(float pointX, float pointY, out bool isTrailingHit, out bool isInside)
    Parameters
    Type Name Description
    float pointX

    X coordinate to hit-test, relative to the top-left location of the layout box.

    float pointY

    Y coordinate to hit-test, relative to the top-left location of the layout box.

    bool isTrailingHit

    Output flag indicating whether the hit-test location is at the leading or the trailing side of the character. When the output isInside value is set to false, this value is set according to the output position value to represent the edge closest to the hit-test location.

    bool isInside

    Output flag indicating whether the hit-test location is inside the text string. When false, the position nearest the text's edge is returned.

    Returns
    Type Description
    DWriteHitTestMetrics

    DWriteHitTestMetrics

    | Edit this page View Source

    HitTestTextPosition(uint, bool, out float, out float)

    Given a text position and whether the caret is on the leading or trailing edge of that position, this returns the corresponding coordinate (in DIPs) relative to the top-left of the layout box. This is most useful for drawing the caret's current position, but it could also be used to anchor an IME to the typed text or attach a floating menu near the point of interest. It may also be used to programmatically obtain the geometry of a particular text position for UI automation.

    Declaration
    public DWriteHitTestMetrics HitTestTextPosition(uint textPosition, bool isTrailingHit, out float pointX, out float pointY)
    Parameters
    Type Name Description
    uint textPosition

    Text position to get the coordinate of.

    bool isTrailingHit

    Flag indicating whether the location is of the leading or the trailing side of the specified text position.

    float pointX

    Output caret X, relative to the top-left of the layout box.

    float pointY

    Output caret Y, relative to the top-left of the layout box.

    Returns
    Type Description
    DWriteHitTestMetrics

    DWriteHitTestMetrics

    Remarks

    When drawing a caret at the returned X,Y, it should be centered on X and drawn from the Y coordinate down. The height will be the size of the hit-tested text (which can vary in size within a line). Reading direction also affects which side of the character the caret is drawn. However, the returned X coordinate will be correct for either case. You can get a text length back that is larger than a single character. This happens for complex scripts when multiple characters form a single cluster, when diacritics join their base character, or when you test a surrogate pair.

    | Edit this page View Source

    SetFontCollection(DWriteFontCollection?, DWriteTextRange)

    Set the font collection.

    Declaration
    public void SetFontCollection(DWriteFontCollection? fontCollection, DWriteTextRange textRange)
    Parameters
    Type Name Description
    DWriteFontCollection fontCollection

    The font collection to set

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetFontFamilyName(ReadOnlySpan<char>, DWriteTextRange)

    Set null-terminated font family name.

    Declaration
    public void SetFontFamilyName(ReadOnlySpan<char> fontFamilyName, DWriteTextRange textRange)
    Parameters
    Type Name Description
    ReadOnlySpan<char> fontFamilyName

    Font family name

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetFontFamilyName(string, DWriteTextRange)

    Set null-terminated font family name.

    Declaration
    public void SetFontFamilyName(string fontFamilyName, DWriteTextRange textRange)
    Parameters
    Type Name Description
    string fontFamilyName

    Font family name

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetFontSize(float, DWriteTextRange)

    Set font em height.

    Declaration
    public void SetFontSize(float fontSize, DWriteTextRange textRange)
    Parameters
    Type Name Description
    float fontSize

    Font em height

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetFontStretch(DWriteFontStretch, DWriteTextRange)

    Set font stretch.

    Declaration
    public void SetFontStretch(DWriteFontStretch fontStretch, DWriteTextRange textRange)
    Parameters
    Type Name Description
    DWriteFontStretch fontStretch

    font stretch

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetFontStyle(DWriteFontStyle, DWriteTextRange)

    Set font style.

    Declaration
    public void SetFontStyle(DWriteFontStyle fontStyle, DWriteTextRange textRange)
    Parameters
    Type Name Description
    DWriteFontStyle fontStyle

    Font style

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetFontWeight(DWriteFontWeight, DWriteTextRange)

    Set font weight.

    Declaration
    public void SetFontWeight(DWriteFontWeight fontWeight, DWriteTextRange textRange)
    Parameters
    Type Name Description
    DWriteFontWeight fontWeight

    Font weight

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetLocaleName(ReadOnlySpan<char>, DWriteTextRange)

    Set locale name.

    Declaration
    public void SetLocaleName(ReadOnlySpan<char> localeName, DWriteTextRange textRange)
    Parameters
    Type Name Description
    ReadOnlySpan<char> localeName

    Locale name

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetLocaleName(string, DWriteTextRange)

    Set locale name.

    Declaration
    public void SetLocaleName(string localeName, DWriteTextRange textRange)
    Parameters
    Type Name Description
    string localeName

    Locale name

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetStrikethrough(bool, DWriteTextRange)

    Set strikethrough.

    Declaration
    public void SetStrikethrough(bool hasStrikethrough, DWriteTextRange textRange)
    Parameters
    Type Name Description
    bool hasStrikethrough

    The Boolean flag indicates whether strikethrough takes place

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetTypography(DWriteTypography?, DWriteTextRange)

    Set font typography features.

    Declaration
    public void SetTypography(DWriteTypography? typography, DWriteTextRange textRange)
    Parameters
    Type Name Description
    DWriteTypography typography

    Pointer to font typography setting.

    DWriteTextRange textRange

    Text range to which this change applies.

    | Edit this page View Source

    SetUnderline(bool, DWriteTextRange)

    Set underline.

    Declaration
    public void SetUnderline(bool hasUnderline, DWriteTextRange textRange)
    Parameters
    Type Name Description
    bool hasUnderline

    The Boolean flag indicates whether underline takes place

    DWriteTextRange textRange

    Text range to which this change applies.

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2014-2026 Jérémy Ansel