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
- TreeViewDesigner.cs
- WindowsPrincipal.cs
- invalidudtexception.cs
- DropShadowEffect.cs
- ImagingCache.cs
- DriveInfo.cs
- DataSpaceManager.cs
- CellTreeNode.cs
- RemoteWebConfigurationHost.cs
- NetworkCredential.cs
- XmlSchemaAnnotation.cs
- ActivityTypeDesigner.xaml.cs
- XpsResource.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- webeventbuffer.cs
- PolicyStatement.cs
- ManagedIStream.cs
- DynamicActivityTypeDescriptor.cs
- DEREncoding.cs
- TransactionContextValidator.cs
- ConnectionStringSettingsCollection.cs
- MediaScriptCommandRoutedEventArgs.cs
- PathFigureCollection.cs
- FileChangesMonitor.cs
- ContextStaticAttribute.cs
- ReferencedAssembly.cs
- SchemaImporter.cs
- XsltException.cs
- CreationContext.cs
- CompositionTarget.cs
- MultiView.cs
- JoinQueryOperator.cs
- ApplicationActivator.cs
- PropertyRef.cs
- IndexerNameAttribute.cs
- ComponentEditorPage.cs
- WizardSideBarListControlItemEventArgs.cs
- SiteMapNodeItem.cs
- StringArrayConverter.cs
- ConfigurationCollectionAttribute.cs
- XXXInfos.cs
- BlobPersonalizationState.cs
- DataMemberConverter.cs
- DataFormat.cs
- FontDifferentiator.cs
- DataChangedEventManager.cs
- ToolStripDropDownItem.cs
- Pair.cs
- CodeDefaultValueExpression.cs
- SqlCacheDependencySection.cs
- DynamicRouteExpression.cs
- UnicastIPAddressInformationCollection.cs
- RoleManagerModule.cs
- WebPartEventArgs.cs
- Models.cs
- SiteMapDataSource.cs
- RuleInfoComparer.cs
- RectangleHotSpot.cs
- WebServiceTypeData.cs
- HtmlPageAdapter.cs
- Parameter.cs
- DocumentApplication.cs
- HexParser.cs
- DynamicDataResources.Designer.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ListViewAutomationPeer.cs
- entitydatasourceentitysetnameconverter.cs
- CapabilitiesSection.cs
- Clipboard.cs
- ToolStripRenderer.cs
- DesignerActionVerbItem.cs
- SByteConverter.cs
- ItemsControlAutomationPeer.cs
- KnownTypesProvider.cs
- QuaternionAnimation.cs
- PropertyItem.cs
- UserValidatedEventArgs.cs
- TraceShell.cs
- ContextQuery.cs
- CatalogZone.cs
- RedirectionProxy.cs
- RayHitTestParameters.cs
- NotEqual.cs
- MergablePropertyAttribute.cs
- ThemeableAttribute.cs
- EmptyCollection.cs
- ScrollPattern.cs
- ProgressBarRenderer.cs
- DbInsertCommandTree.cs
- ToolStripPanelRenderEventArgs.cs
- EventMappingSettings.cs
- ControlParameter.cs
- DataControlCommands.cs
- TextElementCollection.cs
- AnnotationStore.cs
- CacheMemory.cs
- Operand.cs
- BufferedWebEventProvider.cs
- ResourceReferenceExpression.cs
- SinglePageViewer.cs