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
- AccessDataSourceWizardForm.cs
- WebPartZone.cs
- UInt32.cs
- Aggregates.cs
- VerticalAlignConverter.cs
- DelegatingConfigHost.cs
- StorageEntityContainerMapping.cs
- TrackPoint.cs
- ArraySubsetEnumerator.cs
- TreeView.cs
- ProfileParameter.cs
- FormsAuthenticationEventArgs.cs
- FailedToStartupUIException.cs
- NamespaceCollection.cs
- ResourceDictionaryCollection.cs
- TraceContextEventArgs.cs
- HttpConfigurationContext.cs
- RoleGroup.cs
- TextAnchor.cs
- IxmlLineInfo.cs
- SmiEventSink.cs
- ListViewDataItem.cs
- NativeBuffer.cs
- MediaCommands.cs
- Wizard.cs
- EmptyElement.cs
- Control.cs
- MarkupProperty.cs
- BamlTreeUpdater.cs
- ImageList.cs
- UserMapPath.cs
- ConfigurationPropertyCollection.cs
- ContextMarshalException.cs
- ServiceReflector.cs
- MemberExpression.cs
- _AuthenticationState.cs
- EntitySqlQueryCacheEntry.cs
- QilStrConcat.cs
- NativeWrapper.cs
- KeyedCollection.cs
- CustomAttribute.cs
- Attributes.cs
- Light.cs
- EntityDataSourceEntitySetNameItem.cs
- __Filters.cs
- TreeViewCancelEvent.cs
- OutputCacheSettings.cs
- PerfCounters.cs
- VarInfo.cs
- BStrWrapper.cs
- OleDbTransaction.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- CfgSemanticTag.cs
- TextDecorationCollectionConverter.cs
- EntityDesignerDataSourceView.cs
- Rect.cs
- HttpHeaderCollection.cs
- ConnectionStringSettingsCollection.cs
- EastAsianLunisolarCalendar.cs
- MultiBinding.cs
- XmlComplianceUtil.cs
- BufferAllocator.cs
- Guid.cs
- RectAnimationBase.cs
- KoreanLunisolarCalendar.cs
- RichTextBox.cs
- HMACSHA1.cs
- Keywords.cs
- XamlVector3DCollectionSerializer.cs
- SystemTcpConnection.cs
- Crc32Helper.cs
- ToolStripInSituService.cs
- LicenseException.cs
- RenamedEventArgs.cs
- MenuBase.cs
- PathData.cs
- SqlInternalConnectionSmi.cs
- SymbolEqualComparer.cs
- RenameRuleObjectDialog.cs
- BufferAllocator.cs
- DBSchemaRow.cs
- SmiMetaDataProperty.cs
- CreateSequence.cs
- IHttpResponseInternal.cs
- GridViewRowCollection.cs
- SendKeys.cs
- AddingNewEventArgs.cs
- LinearGradientBrush.cs
- CacheEntry.cs
- EndEvent.cs
- BuildManagerHost.cs
- CopyOfAction.cs
- Assert.cs
- CSharpCodeProvider.cs
- ChangeNode.cs
- PropertyTabAttribute.cs
- TableProvider.cs
- UntrustedRecipientException.cs
- DataContractSet.cs
- ApplicationId.cs