Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- DataSetFieldSchema.cs
- WebBrowsableAttribute.cs
- XpsS0ValidatingLoader.cs
- SqlNotificationEventArgs.cs
- KeyPressEvent.cs
- SqlClientPermission.cs
- MetaData.cs
- TextDecoration.cs
- PathHelper.cs
- TextBoxAutoCompleteSourceConverter.cs
- StandardOleMarshalObject.cs
- SharedDp.cs
- OdbcConnection.cs
- GuidelineSet.cs
- UniqueTransportManagerRegistration.cs
- BamlRecordReader.cs
- LogArchiveSnapshot.cs
- Psha1DerivedKeyGeneratorHelper.cs
- TextMessageEncoder.cs
- GridViewActionList.cs
- StructuredCompositeActivityDesigner.cs
- EventDescriptor.cs
- ClosableStream.cs
- BindingListCollectionView.cs
- XamlDebuggerXmlReader.cs
- RawStylusInputCustomData.cs
- FieldAccessException.cs
- BindingUtils.cs
- WriteableBitmap.cs
- MailSettingsSection.cs
- WindowsNonControl.cs
- DataControlImageButton.cs
- parserscommon.cs
- SamlAudienceRestrictionCondition.cs
- NativeMethodsOther.cs
- SuppressIldasmAttribute.cs
- DiscoveryMessageSequence.cs
- TrackingQueryElement.cs
- DebuggerAttributes.cs
- TitleStyle.cs
- FormViewUpdateEventArgs.cs
- BitmapScalingModeValidation.cs
- PathFigure.cs
- DataServiceQueryContinuation.cs
- AttachedAnnotationChangedEventArgs.cs
- securitycriticaldata.cs
- TransformPattern.cs
- CachedRequestParams.cs
- cache.cs
- WindowsFormsSynchronizationContext.cs
- KnownTypes.cs
- SvcMapFileLoader.cs
- ScrollChrome.cs
- ProfilePropertyNameValidator.cs
- SoapMessage.cs
- TemplateBindingExpressionConverter.cs
- CornerRadiusConverter.cs
- RadioButtonList.cs
- DurableDispatcherAddressingFault.cs
- StringBuilder.cs
- StickyNoteAnnotations.cs
- Stopwatch.cs
- WebBrowserNavigatedEventHandler.cs
- MultipartContentParser.cs
- ToolStripScrollButton.cs
- PhonemeConverter.cs
- DbTransaction.cs
- SingleConverter.cs
- DependencyPropertyKind.cs
- BuildDependencySet.cs
- PageCatalogPart.cs
- ChannelFactoryRefCache.cs
- ListViewHitTestInfo.cs
- ComContractElement.cs
- PassportAuthenticationModule.cs
- GridLengthConverter.cs
- XmlUTF8TextWriter.cs
- ObjectResult.cs
- XmlObjectSerializerContext.cs
- DataTableMapping.cs
- xamlnodes.cs
- StylusButtonEventArgs.cs
- Merger.cs
- xsdvalidator.cs
- DataBindingCollection.cs
- EncoderBestFitFallback.cs
- CodeEventReferenceExpression.cs
- ValidationErrorCollection.cs
- VariableAction.cs
- CloudCollection.cs
- DataPagerFieldItem.cs
- MemberInfoSerializationHolder.cs
- X509LogoTypeExtension.cs
- SmtpNtlmAuthenticationModule.cs
- ZoneLinkButton.cs
- PasswordBoxAutomationPeer.cs
- ComponentResourceKey.cs
- XmlAtomicValue.cs
- HtmlElement.cs
- HttpApplicationFactory.cs