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
- ToggleProviderWrapper.cs
- UpdateTracker.cs
- EventLogRecord.cs
- WebPartVerbCollection.cs
- PublisherIdentityPermission.cs
- TableLayout.cs
- SemanticTag.cs
- ControlPropertyNameConverter.cs
- EDesignUtil.cs
- Security.cs
- ParseHttpDate.cs
- ThreadNeutralSemaphore.cs
- ThrowOnMultipleAssignment.cs
- SqlPersonalizationProvider.cs
- SmtpFailedRecipientsException.cs
- ListControl.cs
- WhitespaceRule.cs
- UnsafeNativeMethods.cs
- HtmlButton.cs
- QueryAccessibilityHelpEvent.cs
- XmlWellformedWriter.cs
- SEHException.cs
- SqlRowUpdatingEvent.cs
- CompatibleIComparer.cs
- ObservableCollection.cs
- SectionRecord.cs
- FixedSOMContainer.cs
- QuaternionConverter.cs
- ObjectItemCachedAssemblyLoader.cs
- Rotation3D.cs
- DetailsViewUpdateEventArgs.cs
- ExeContext.cs
- PagedDataSource.cs
- RuntimeResourceSet.cs
- LayoutEditorPart.cs
- SourceFileInfo.cs
- ListDesigner.cs
- FontStretch.cs
- HttpListenerPrefixCollection.cs
- DefaultPropertyAttribute.cs
- StackBuilderSink.cs
- BitmapPalettes.cs
- TypeDependencyAttribute.cs
- FormViewCommandEventArgs.cs
- OperandQuery.cs
- ExpandedWrapper.cs
- SizeAnimation.cs
- DataGridViewRowCancelEventArgs.cs
- ResourcePool.cs
- InstanceCreationEditor.cs
- EnvironmentPermission.cs
- MemoryFailPoint.cs
- ErrorView.xaml.cs
- Camera.cs
- streamingZipPartStream.cs
- HtmlLink.cs
- DataGridView.cs
- Pts.cs
- ImageListUtils.cs
- WindowHideOrCloseTracker.cs
- SynchronizationValidator.cs
- ConnectionPoolManager.cs
- StreamInfo.cs
- PictureBox.cs
- DataStorage.cs
- SafeBitVector32.cs
- String.cs
- MimeTypePropertyAttribute.cs
- WpfWebRequestHelper.cs
- FtpRequestCacheValidator.cs
- FixedSOMFixedBlock.cs
- ContextMenuStrip.cs
- AVElementHelper.cs
- ImmutableCollection.cs
- GlyphsSerializer.cs
- EventLogPropertySelector.cs
- Cell.cs
- OdbcParameterCollection.cs
- Point3DAnimationBase.cs
- WebControlsSection.cs
- PointAnimationUsingPath.cs
- Evidence.cs
- NullableLongSumAggregationOperator.cs
- RedirectionProxy.cs
- PointLightBase.cs
- Header.cs
- BaseParaClient.cs
- ConfigXmlElement.cs
- MethodBuilderInstantiation.cs
- FatalException.cs
- DropDownButton.cs
- NativeMethods.cs
- BinaryObjectInfo.cs
- AvtEvent.cs
- Control.cs
- SchemaCollectionCompiler.cs
- DbConnectionPoolCounters.cs
- ConfigurationValidatorBase.cs
- __Filters.cs
- StringToken.cs