Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / MS / Internal / FontCache / CachedTypeface.cs / 1 / CachedTypeface.cs
//---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: CachedTypeface // // History: 6-08-2005 garyyang, Created. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Media; using MS.Internal.FontFace; namespace MS.Internal.FontCache { ////// CachedTypeface stores the canonical values and font data of a Typeface. It is looked up or constructed /// when client does shaping or query metrics from Typeface objects. Caching this object allows /// many equal typeface objects to share the same piece of canonicalized data. /// internal class CachedTypeface { private FontStyle _canonicalStyle; private FontWeight _canonicalWeight; private FontStretch _canonicalStretch; private IFontFamily _firstFontFamily; private ITypefaceMetrics _typefaceMetrics; private bool _nullFont; internal CachedTypeface( FontStyle canonicalStyle, FontWeight canonicalWeight, FontStretch canonicalStretch, IFontFamily firstFontFamily, ITypefaceMetrics typefaceMetrics, bool nullFont ) { _canonicalStyle = canonicalStyle; _canonicalWeight = canonicalWeight; _canonicalStretch = canonicalStretch; Invariant.Assert(firstFontFamily != null && typefaceMetrics != null); _firstFontFamily = firstFontFamily; _typefaceMetrics = typefaceMetrics; _nullFont = nullFont; } internal FontStyle CanonicalStyle { get { return _canonicalStyle; } } internal FontWeight CanonicalWeight { get { return _canonicalWeight; } } internal FontStretch CanonicalStretch { get { return _canonicalStretch; } } internal IFontFamily FirstFontFamily { get { return _firstFontFamily; } } internal ITypefaceMetrics TypefaceMetrics { get { return _typefaceMetrics; } } internal bool NullFont { get { return _nullFont; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: CachedTypeface // // History: 6-08-2005 garyyang, Created. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Media; using MS.Internal.FontFace; namespace MS.Internal.FontCache { ////// CachedTypeface stores the canonical values and font data of a Typeface. It is looked up or constructed /// when client does shaping or query metrics from Typeface objects. Caching this object allows /// many equal typeface objects to share the same piece of canonicalized data. /// internal class CachedTypeface { private FontStyle _canonicalStyle; private FontWeight _canonicalWeight; private FontStretch _canonicalStretch; private IFontFamily _firstFontFamily; private ITypefaceMetrics _typefaceMetrics; private bool _nullFont; internal CachedTypeface( FontStyle canonicalStyle, FontWeight canonicalWeight, FontStretch canonicalStretch, IFontFamily firstFontFamily, ITypefaceMetrics typefaceMetrics, bool nullFont ) { _canonicalStyle = canonicalStyle; _canonicalWeight = canonicalWeight; _canonicalStretch = canonicalStretch; Invariant.Assert(firstFontFamily != null && typefaceMetrics != null); _firstFontFamily = firstFontFamily; _typefaceMetrics = typefaceMetrics; _nullFont = nullFont; } internal FontStyle CanonicalStyle { get { return _canonicalStyle; } } internal FontWeight CanonicalWeight { get { return _canonicalWeight; } } internal FontStretch CanonicalStretch { get { return _canonicalStretch; } } internal IFontFamily FirstFontFamily { get { return _firstFontFamily; } } internal ITypefaceMetrics TypefaceMetrics { get { return _typefaceMetrics; } } internal bool NullFont { get { return _nullFont; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectMemberMapping.cs
- EncryptedReference.cs
- HttpCachePolicy.cs
- LocalizableResourceBuilder.cs
- messageonlyhwndwrapper.cs
- RenderDataDrawingContext.cs
- PersistenceMetadataNamespace.cs
- PropertyGroupDescription.cs
- CodeEntryPointMethod.cs
- ToolboxService.cs
- ToolStripScrollButton.cs
- AspNetSynchronizationContext.cs
- BuildTopDownAttribute.cs
- PngBitmapDecoder.cs
- RecordBuilder.cs
- XsltSettings.cs
- ToolStripDropDownButton.cs
- NativeMethods.cs
- ConstraintCollection.cs
- DateTimeAutomationPeer.cs
- PropertyNames.cs
- XmlToDatasetMap.cs
- SoapIgnoreAttribute.cs
- HttpModulesSection.cs
- DbCommandTree.cs
- FrameworkContextData.cs
- DiscoveryClientChannelBase.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- CustomAttributeBuilder.cs
- JoinGraph.cs
- InternalPermissions.cs
- HashMembershipCondition.cs
- AsymmetricCryptoHandle.cs
- RevocationPoint.cs
- WaitForChangedResult.cs
- EdmRelationshipRoleAttribute.cs
- TraceFilter.cs
- XmlSchemaAnnotated.cs
- ResolvedKeyFrameEntry.cs
- SystemColors.cs
- BuildProvider.cs
- TextInfo.cs
- WeakEventTable.cs
- HtmlTableCellCollection.cs
- Accessible.cs
- TextOptions.cs
- BaseCodePageEncoding.cs
- DbParameterHelper.cs
- BitmapCodecInfoInternal.cs
- SystemIPInterfaceStatistics.cs
- DesignerGenericWebPart.cs
- CommonProperties.cs
- ProvidePropertyAttribute.cs
- XmlUrlResolver.cs
- InvalidAsynchronousStateException.cs
- JournalNavigationScope.cs
- CredentialCache.cs
- FrameworkObject.cs
- PreDigestedSignedInfo.cs
- QilUnary.cs
- dataSvcMapFileLoader.cs
- X509ScopedServiceCertificateElementCollection.cs
- DownloadProgressEventArgs.cs
- UIElementIsland.cs
- DataColumnMappingCollection.cs
- PersonalizationProvider.cs
- GB18030Encoding.cs
- precedingsibling.cs
- DispatchChannelSink.cs
- AutomationPattern.cs
- DrawingBrush.cs
- InvalidWMPVersionException.cs
- XsdDateTime.cs
- RelationshipConverter.cs
- MediaSystem.cs
- DoubleLink.cs
- ReadOnlyHierarchicalDataSource.cs
- ClientConfigurationSystem.cs
- GroupDescription.cs
- DropTarget.cs
- counter.cs
- RecordsAffectedEventArgs.cs
- ModuleElement.cs
- FilterFactory.cs
- ProfileSettings.cs
- MetabaseSettingsIis7.cs
- ApplicationCommands.cs
- MonthCalendar.cs
- FieldBuilder.cs
- XsdValidatingReader.cs
- MarshalByRefObject.cs
- LinqDataSourceInsertEventArgs.cs
- BoolExpressionVisitors.cs
- DataListCommandEventArgs.cs
- DashStyles.cs
- validationstate.cs
- GraphicsState.cs
- XPathNodeInfoAtom.cs
- __ComObject.cs
- isolationinterop.cs