Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / MS / Internal / FontCache / CachedTypeface.cs / 1 / CachedTypeface.cs
//---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: CachedTypeface // // History: 6-08-2005 [....], 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DelimitedListTraceListener.cs
- SortQueryOperator.cs
- ActivityMarkupSerializationProvider.cs
- HostedTcpTransportManager.cs
- FixedSOMContainer.cs
- TextEditorContextMenu.cs
- XmlSchema.cs
- followingquery.cs
- HttpException.cs
- ControlBuilder.cs
- TimelineCollection.cs
- Events.cs
- XmlCodeExporter.cs
- PrimitiveRenderer.cs
- StoreItemCollection.cs
- SystemSounds.cs
- FrameworkTextComposition.cs
- MediaPlayerState.cs
- ServiceAuthorizationElement.cs
- ForeignKeyConstraint.cs
- XmlToDatasetMap.cs
- ConfigurationSchemaErrors.cs
- XamlVector3DCollectionSerializer.cs
- CmsInterop.cs
- BinaryConverter.cs
- PagedDataSource.cs
- TypeResolvingOptions.cs
- HttpGetProtocolImporter.cs
- OrderedEnumerableRowCollection.cs
- RegionData.cs
- GroupBoxRenderer.cs
- TrackingLocation.cs
- _IPv6Address.cs
- WeakReadOnlyCollection.cs
- RadioButtonPopupAdapter.cs
- UriScheme.cs
- Rules.cs
- Cursors.cs
- SelectionUIService.cs
- RSAOAEPKeyExchangeFormatter.cs
- _LazyAsyncResult.cs
- HttpContextWrapper.cs
- DockProviderWrapper.cs
- Hash.cs
- StorageEndPropertyMapping.cs
- ProxyFragment.cs
- HttpConfigurationContext.cs
- WebPartDisplayMode.cs
- SelectionProviderWrapper.cs
- Logging.cs
- CompilerErrorCollection.cs
- FontSource.cs
- UnionCqlBlock.cs
- HashMembershipCondition.cs
- EntityDataSourceValidationException.cs
- WebPartHelpVerb.cs
- CodeCommentStatement.cs
- RootBrowserWindowAutomationPeer.cs
- ContractAdapter.cs
- MessageQuerySet.cs
- ExceptionUtil.cs
- CustomError.cs
- OleDbStruct.cs
- ObjectDesignerDataSourceView.cs
- WinFormsSecurity.cs
- IPEndPointCollection.cs
- UnionQueryOperator.cs
- OdbcException.cs
- DefaultValueTypeConverter.cs
- InternalConfirm.cs
- assemblycache.cs
- BinaryQueryOperator.cs
- IsolatedStorage.cs
- SafeCryptContextHandle.cs
- DesignerRegionCollection.cs
- HandlerFactoryCache.cs
- AnimatedTypeHelpers.cs
- RoutedEventConverter.cs
- Trigger.cs
- JumpPath.cs
- XmlBaseReader.cs
- FormatSettings.cs
- Context.cs
- CurrencyManager.cs
- TreeNodeCollection.cs
- ConfigurationSettings.cs
- TabPageDesigner.cs
- Vector3DKeyFrameCollection.cs
- ComponentCollection.cs
- ChannelServices.cs
- StringKeyFrameCollection.cs
- ThreadSafeList.cs
- PersistencePipeline.cs
- EnumConverter.cs
- CustomAttributeBuilder.cs
- ButtonChrome.cs
- CompositionAdorner.cs
- ParameterCollection.cs
- Function.cs
- SiteMapNodeCollection.cs