Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- TemplateColumn.cs
- Compiler.cs
- DispatcherOperation.cs
- ProbeMatchesApril2005.cs
- SqlNodeAnnotation.cs
- Models.cs
- OperatingSystem.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- Dictionary.cs
- DataBinder.cs
- FrameworkName.cs
- BypassElement.cs
- TheQuery.cs
- InsufficientExecutionStackException.cs
- TableDetailsRow.cs
- RequestDescription.cs
- VectorCollectionConverter.cs
- Native.cs
- TextContainerHelper.cs
- DocumentReference.cs
- EntityType.cs
- BindingNavigator.cs
- AutoResetEvent.cs
- X509RawDataKeyIdentifierClause.cs
- DataGridRelationshipRow.cs
- TypeConverterHelper.cs
- DataPagerFieldItem.cs
- Int16AnimationUsingKeyFrames.cs
- AdvancedBindingEditor.cs
- EventLog.cs
- GenericEnumerator.cs
- ProbeMatchesCD1.cs
- MissingMemberException.cs
- MissingMemberException.cs
- SoapHeaderException.cs
- EventHandlersStore.cs
- ConstrainedDataObject.cs
- SecureStringHasher.cs
- FlowDocumentFormatter.cs
- StylusPointPropertyInfoDefaults.cs
- ClonableStack.cs
- HtmlToClrEventProxy.cs
- EpmSyndicationContentDeSerializer.cs
- StateManagedCollection.cs
- BasicCellRelation.cs
- RegexCompilationInfo.cs
- SemanticValue.cs
- TrackingWorkflowEventArgs.cs
- RealizationDrawingContextWalker.cs
- SortDescriptionCollection.cs
- XmlDownloadManager.cs
- SourceFileBuildProvider.cs
- TdsParser.cs
- EntityDesignPluralizationHandler.cs
- DbDeleteCommandTree.cs
- StylusPointPropertyUnit.cs
- Empty.cs
- DataGridViewCellValidatingEventArgs.cs
- TextFormatter.cs
- XmlWriterSettings.cs
- OrderedDictionary.cs
- ContentPlaceHolder.cs
- XmlChildEnumerator.cs
- BaseCollection.cs
- HttpCookieCollection.cs
- SqlFunctionAttribute.cs
- NetNamedPipeBinding.cs
- EncoderFallback.cs
- UrlEncodedParameterWriter.cs
- EditorPartCollection.cs
- DataSourceControl.cs
- SafeWaitHandle.cs
- DataSetMappper.cs
- InputChannel.cs
- RuleInfoComparer.cs
- MenuItemStyleCollection.cs
- DomNameTable.cs
- ScrollPatternIdentifiers.cs
- WeakReference.cs
- ObjectParameter.cs
- PackagingUtilities.cs
- HtmlInputFile.cs
- UIElementParaClient.cs
- OrderByExpression.cs
- MachineKeyConverter.cs
- ViewBox.cs
- ImageFormatConverter.cs
- HotSpot.cs
- NativeCompoundFileAPIs.cs
- VBIdentifierTrimConverter.cs
- ChangeNode.cs
- Oid.cs
- SerializationInfoEnumerator.cs
- Lease.cs
- QueueProcessor.cs
- TextCompositionManager.cs
- DataReceivedEventArgs.cs
- XmlNamespaceDeclarationsAttribute.cs
- ServiceModelEnumValidatorAttribute.cs
- CheckBox.cs