Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- GridViewPageEventArgs.cs
- ChtmlPhoneCallAdapter.cs
- OpacityConverter.cs
- WindowShowOrOpenTracker.cs
- DbException.cs
- WsatEtwTraceListener.cs
- SqlCharStream.cs
- WindowsSlider.cs
- LayoutTableCell.cs
- AndCondition.cs
- XPathSingletonIterator.cs
- PagerSettings.cs
- SyndicationDeserializer.cs
- System.Data.OracleClient_BID.cs
- GorillaCodec.cs
- Math.cs
- __ComObject.cs
- ZipFileInfo.cs
- CompilerState.cs
- DateRangeEvent.cs
- X509Certificate2.cs
- DataGridViewRowStateChangedEventArgs.cs
- cache.cs
- invalidudtexception.cs
- DataGridViewComboBoxCell.cs
- ViewStateModeByIdAttribute.cs
- EndOfStreamException.cs
- Decoder.cs
- IxmlLineInfo.cs
- MsmqProcessProtocolHandler.cs
- WebScriptMetadataMessageEncoderFactory.cs
- OuterGlowBitmapEffect.cs
- OutputCacheSettingsSection.cs
- SmiEventSink_Default.cs
- HeaderedContentControl.cs
- Accessible.cs
- ListQueryResults.cs
- TreeViewAutomationPeer.cs
- PointHitTestResult.cs
- MetadataAssemblyHelper.cs
- PlanCompiler.cs
- ApplicationException.cs
- CodeTypeReference.cs
- ObjectParameterCollection.cs
- XamlHostingConfiguration.cs
- SupportingTokenChannel.cs
- StringSorter.cs
- ThrowHelper.cs
- SettingsPropertyCollection.cs
- GlyphsSerializer.cs
- TableLayoutStyle.cs
- ApplicationInfo.cs
- ToolboxDataAttribute.cs
- TraceHwndHost.cs
- RadioButtonStandardAdapter.cs
- OptionalColumn.cs
- HttpApplicationStateWrapper.cs
- StringToken.cs
- UnsafeNativeMethods.cs
- GeometryConverter.cs
- MarkupCompilePass1.cs
- DataKey.cs
- FeatureSupport.cs
- ListDictionary.cs
- ButtonChrome.cs
- DownloadProgressEventArgs.cs
- InteropAutomationProvider.cs
- CannotUnloadAppDomainException.cs
- ParameterCollection.cs
- MinimizableAttributeTypeConverter.cs
- PropertyStore.cs
- SingleStorage.cs
- ZoneButton.cs
- ValueType.cs
- QilList.cs
- ExeConfigurationFileMap.cs
- SimpleBitVector32.cs
- EventEntry.cs
- TextTreeText.cs
- CustomAttributeBuilder.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- TableAutomationPeer.cs
- Cloud.cs
- EventsTab.cs
- TextOnlyOutput.cs
- DeliveryStrategy.cs
- StylusPointPropertyInfo.cs
- ISAPIApplicationHost.cs
- RepeatInfo.cs
- GridViewSelectEventArgs.cs
- MethodToken.cs
- PointConverter.cs
- Switch.cs
- CdpEqualityComparer.cs
- MSAANativeProvider.cs
- AssemblyCollection.cs
- OverlappedAsyncResult.cs
- TextServicesPropertyRanges.cs
- DataGridBoolColumn.cs
- XamlReaderHelper.cs