Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DefaultWorkflowLoaderService.cs
- XmlQueryOutput.cs
- PagedDataSource.cs
- CodeSnippetTypeMember.cs
- CqlWriter.cs
- InputLangChangeEvent.cs
- AnnotationHighlightLayer.cs
- SuppressIldasmAttribute.cs
- ValidationErrorCollection.cs
- SEHException.cs
- SiteMapProvider.cs
- SqlConnectionStringBuilder.cs
- JavascriptCallbackMessageInspector.cs
- IList.cs
- EndpointNameMessageFilter.cs
- EventTrigger.cs
- PerformanceCountersElement.cs
- SchemaAttDef.cs
- AttributeProviderAttribute.cs
- RouteCollection.cs
- TypeSource.cs
- TextContainerHelper.cs
- ImageAttributes.cs
- FrameworkContentElement.cs
- UrlMapping.cs
- DataSvcMapFile.cs
- Inflater.cs
- DataGridViewAddColumnDialog.cs
- EmbeddedObject.cs
- Grant.cs
- RijndaelManagedTransform.cs
- RtfFormatStack.cs
- EntityViewGenerationConstants.cs
- NumberSubstitution.cs
- BigInt.cs
- SecurityException.cs
- CodeIndexerExpression.cs
- StandardMenuStripVerb.cs
- WpfWebRequestHelper.cs
- XmlTypeMapping.cs
- InvalidOleVariantTypeException.cs
- ControlBindingsCollection.cs
- TimeoutConverter.cs
- DataTableMapping.cs
- Baml2006KnownTypes.cs
- FontSourceCollection.cs
- Timer.cs
- UnsafeNativeMethodsMilCoreApi.cs
- IncrementalCompileAnalyzer.cs
- WebPartCancelEventArgs.cs
- RetrieveVirtualItemEventArgs.cs
- HealthMonitoringSection.cs
- StatusBarPanelClickEvent.cs
- ObjectMemberMapping.cs
- RegexBoyerMoore.cs
- ReferencedCollectionType.cs
- EmptyQuery.cs
- TileBrush.cs
- SQLInt16Storage.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- SoapCommonClasses.cs
- DockAndAnchorLayout.cs
- GeometryHitTestParameters.cs
- ServiceDebugElement.cs
- ButtonBase.cs
- Span.cs
- XamlGridLengthSerializer.cs
- FederatedMessageSecurityOverHttp.cs
- DetailsViewRowCollection.cs
- TextAnchor.cs
- TokenBasedSetEnumerator.cs
- WebInvokeAttribute.cs
- DbTypeMap.cs
- DescendantBaseQuery.cs
- _LocalDataStore.cs
- Calendar.cs
- Thumb.cs
- TaiwanLunisolarCalendar.cs
- ProcessModuleCollection.cs
- CompositeCollection.cs
- XPathDocumentBuilder.cs
- EncoderParameters.cs
- XslAst.cs
- ClientBuildManager.cs
- ValidationError.cs
- DataGridViewBindingCompleteEventArgs.cs
- EventLogEntry.cs
- _ProxyChain.cs
- StringExpressionSet.cs
- TraceContextEventArgs.cs
- SoapUnknownHeader.cs
- TypeToStringValueConverter.cs
- HtmlForm.cs
- InstanceOwnerQueryResult.cs
- ValidatingReaderNodeData.cs
- Perspective.cs
- ApplicationServiceManager.cs
- EdmFunctionAttribute.cs
- PropertyIdentifier.cs
- TraceData.cs