XpsFont.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Print / Reach / Packaging / XpsFont.cs / 1 / XpsFont.cs

                            /*++ 

    Copyright (C) 2004 - 2005 Microsoft Corporation
    All rights reserved.
 
    Module Name:
        XpsFont.cs 
 
    Abstract:
        This file contains the definition  and implementation 
        for the XpsFont class.  This class inherits from
        XpsResource and controls font specific aspects of
        a resource added to a fixed page.
 
    Author:
        [....] ([....]) 1-November-2004 
 
    Revision History:
    Brian Adleberg ([....] ) 12-July-2005 Reach -> Xps 
--*/

using System;
using System.IO.Packaging; 

namespace System.Windows.Xps.Packaging 
{ 
    /// 
    /// 
    /// 
    public class XpsFont : XpsResource
    {
        #region Constructors 

        internal 
        XpsFont( 
            XpsManager    xpsManager,
            INode           parent, 
            PackagePart     part
            )
            : base(xpsManager, parent, part)
        { 
            _isObfuscated = (part.ContentType == XpsS0Markup.FontObfuscatedContentType.ToString());
        } 
 
        #endregion Constructors
 
        #region Public Properties
        /// 
        /// Is true when font is obfuscated
        ///  
        public
        bool 
        IsObfuscated 
        {
            get 
            {
                return _isObfuscated;
            }
        } 
        /// 
        /// Is true when font is obfuscated 
        ///  
        public
        bool 
        IsRestricted
        {
            get
            { 
                return _isResticted;
            } 
            set 
            {
                _isResticted = value; 
            }
        }
        #endregion Public Properties
 
        #region private members
        private bool _isObfuscated; 
        private bool _isResticted; 
        #endregion
        ///  
        /// Obfuscate font data
        /// in accordence with 6.2.7.3	Embedded Font Obfuscation
        /// of the metro spec
        ///  
        /// 
        ///  Data to obfuscate 
        ///  
        /// 
        /// Guid to be used in XORing the header 
        /// 
        public
        static
        void 
        ObfuscateFontData( byte[] fontData, Guid guid )
        { 
            System.Windows.Xps.Serialization.FEMCacheItem.ObfuscateData(fontData, guid ); 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK