Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / FontCache / CachedTypeface.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PersonalizableAttribute.cs
- StylusPointPropertyInfoDefaults.cs
- WeakRefEnumerator.cs
- Vector3DCollectionConverter.cs
- SoapAttributeAttribute.cs
- PersonalizableTypeEntry.cs
- CountAggregationOperator.cs
- AppearanceEditorPart.cs
- QueryAccessibilityHelpEvent.cs
- CompilerScopeManager.cs
- ToolZoneDesigner.cs
- odbcmetadatacolumnnames.cs
- AdRotatorDesigner.cs
- InvokeGenerator.cs
- XmlSchemaDocumentation.cs
- behaviorssection.cs
- Sql8ExpressionRewriter.cs
- ChangeBlockUndoRecord.cs
- BuildProvider.cs
- Module.cs
- WeakReference.cs
- JpegBitmapDecoder.cs
- SqlTypesSchemaImporter.cs
- SafeNativeMethods.cs
- ContentType.cs
- SoapSchemaMember.cs
- Event.cs
- JoinCqlBlock.cs
- RootProfilePropertySettingsCollection.cs
- ButtonBaseAutomationPeer.cs
- _SSPISessionCache.cs
- ShapingWorkspace.cs
- FontInfo.cs
- DesignOnlyAttribute.cs
- PathFigureCollection.cs
- StrokeNodeOperations2.cs
- ResourcePool.cs
- ControlDesignerState.cs
- MouseBinding.cs
- PenLineCapValidation.cs
- OutputWindow.cs
- EmptyReadOnlyDictionaryInternal.cs
- EventWaitHandleSecurity.cs
- DynamicResourceExtensionConverter.cs
- SectionUpdates.cs
- InvokePattern.cs
- JsonFormatReaderGenerator.cs
- LogicalExpr.cs
- DirectoryNotFoundException.cs
- AuthenticatingEventArgs.cs
- PeerObject.cs
- PrintSchema.cs
- FormsAuthentication.cs
- SoapAttributeOverrides.cs
- SecurityTokenAttachmentMode.cs
- Renderer.cs
- WebPartEventArgs.cs
- Native.cs
- ProcessModuleCollection.cs
- ProgressBarAutomationPeer.cs
- ResourceExpressionBuilder.cs
- DataSourceControlBuilder.cs
- SqlDeflator.cs
- BindingList.cs
- RegisteredArrayDeclaration.cs
- XPathPatternParser.cs
- WebPartHelpVerb.cs
- ConnectionModeReader.cs
- UserPreferenceChangedEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- ComUdtElement.cs
- WindowsListBox.cs
- ClientCredentials.cs
- ScrollChrome.cs
- MetadataSource.cs
- log.cs
- Int16.cs
- DomNameTable.cs
- WebPartsPersonalizationAuthorization.cs
- LambdaCompiler.Lambda.cs
- WorkflowShape.cs
- PluralizationServiceUtil.cs
- CompositionDesigner.cs
- BamlStream.cs
- DuplicateWaitObjectException.cs
- GenericRootAutomationPeer.cs
- Renderer.cs
- MatcherBuilder.cs
- TextSelectionHighlightLayer.cs
- SimpleRecyclingCache.cs
- AddDataControlFieldDialog.cs
- RecognizerInfo.cs
- PolicyException.cs
- AssociationTypeEmitter.cs
- PrivateFontCollection.cs
- TextOptionsInternal.cs
- DataGridState.cs
- DataSourceCacheDurationConverter.cs
- PropertyEmitter.cs
- SerializationFieldInfo.cs