File: Core\CSharp\System\Windows\Media\TextFormatting\TextRunProperties.cs
Project: wpf\src\PresentationCore.csproj (PresentationCore)
//-----------------------------------------------------------------------
//
//  Microsoft Windows Client Platform
//  Copyright (C) Microsoft Corporation
//
//  File:      TextRunProperties.cs
//
//  Contents:  Text run properties
//
//  Spec:      http://team/sites/Avalon/Specs/Text%20Formatting%20API.doc
//
//  Created:   1-7-2005 Worachai Chaoweeraprasit (wchao)
//
//------------------------------------------------------------------------
 
 
using System;
using System.Globalization;
using System.Windows;
using MS.Internal;
 
namespace System.Windows.Media.TextFormatting
{
    /// <summary>
    /// Properties that can change from one run to the next, such as typeface or foreground brush.
    /// </summary>
    /// <remarks>
    /// The client provides a concrete implementation of this abstract run properties class. This
    /// allows client to implement their run properties the way that fits with their run formatting
    /// store.
    /// </remarks>
    public abstract class TextRunProperties
    {
        /// <summary>
        /// Run typeface
        /// </summary>
        public abstract Typeface Typeface
        { get; }
 
 
        /// <summary>
        /// Em size of font used to format and display text
        /// </summary>
        public abstract double FontRenderingEmSize
        { get; }
 
 
        /// <summary>
        /// Em size of font to determine subtle change in font hinting default value is 12pt
        /// </summary>
        public abstract double FontHintingEmSize
        { get; }
 
        ///<summary>
        /// Run TextDecorations. 
        ///</summary>
        public abstract TextDecorationCollection TextDecorations
        { get; }
 
        /// <summary>
        /// Brush used to fill text
        /// </summary>
        public abstract Brush ForegroundBrush
        { get; }
 
 
        /// <summary>
        /// Brush used to paint background of run
        /// </summary>
        public abstract Brush BackgroundBrush
        { get; }
 
 
        /// <summary>
        /// Run text culture info
        /// </summary>
        public abstract CultureInfo CultureInfo
        { get; }
 
 
        /// <summary>
        /// Run Text effect collection
        /// </summary>
        public abstract TextEffectCollection TextEffects
        { get; }
 
 
        /// <summary>
        /// Run vertical box alignment
        /// </summary>
        public virtual BaselineAlignment BaselineAlignment
        {
            get { return BaselineAlignment.Baseline; }
        }
 
 
        /// <summary>
        /// Run typography properties
        /// </summary>
        public virtual TextRunTypographyProperties TypographyProperties
        {
            get { return null; }
        }
 
 
        /// <summary>
        /// Number substitution options.
        /// </summary>
        public virtual NumberSubstitution NumberSubstitution
        {
            get { return null; }
        }
 
        /// <summary>
        /// PixelsPerDip at which the text should be rendered.
        /// </summary>
        public double PixelsPerDip
        {
            get { return _pixelsPerDip; }
            set { _pixelsPerDip = value; }
        }
 
        private double _pixelsPerDip = MS.Internal.FontCache.Util.PixelsPerDip;
    }
}