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
- DecimalAnimationUsingKeyFrames.cs
- Stack.cs
- XmlSchemaType.cs
- Accessible.cs
- TypeForwardedToAttribute.cs
- Gdiplus.cs
- StructuredTypeInfo.cs
- AesCryptoServiceProvider.cs
- SmtpFailedRecipientsException.cs
- ResizeGrip.cs
- ConfigXmlText.cs
- File.cs
- TextDecorationCollection.cs
- DirectoryObjectSecurity.cs
- Tuple.cs
- NamespaceDecl.cs
- DataGridViewCellParsingEventArgs.cs
- EndOfStreamException.cs
- RedBlackList.cs
- XpsFilter.cs
- ChangePassword.cs
- ReflectEventDescriptor.cs
- ClientFormsIdentity.cs
- ArrayElementGridEntry.cs
- CompilerCollection.cs
- NotImplementedException.cs
- ContextStaticAttribute.cs
- TemplateInstanceAttribute.cs
- ServicePointManagerElement.cs
- EntityDataSourceWrapperCollection.cs
- dataobject.cs
- QueryGenerator.cs
- PathParser.cs
- DataComponentNameHandler.cs
- MailHeaderInfo.cs
- CharacterBufferReference.cs
- Point3DAnimationBase.cs
- FieldTemplateFactory.cs
- FaultDescription.cs
- SchemaNotation.cs
- InternalsVisibleToAttribute.cs
- GatewayIPAddressInformationCollection.cs
- CodeGotoStatement.cs
- ObjectStateManagerMetadata.cs
- ContentElement.cs
- DropDownHolder.cs
- TreeBuilderBamlTranslator.cs
- DbgUtil.cs
- DbParameterCollectionHelper.cs
- FixedTextSelectionProcessor.cs
- SerializationSectionGroup.cs
- BindingCompleteEventArgs.cs
- MDIClient.cs
- MsmqAppDomainProtocolHandler.cs
- EmptyStringExpandableObjectConverter.cs
- PrintDialog.cs
- BaseProcessor.cs
- GenerateDerivedKeyRequest.cs
- StructuralComparisons.cs
- FileFormatException.cs
- DynamicValidatorEventArgs.cs
- JavaScriptString.cs
- DurableEnlistmentState.cs
- TraceUtils.cs
- WSDualHttpBindingCollectionElement.cs
- SafeHandle.cs
- DependencyObjectType.cs
- GPPOINT.cs
- SoapReflectionImporter.cs
- WmpBitmapEncoder.cs
- PropertyGeneratedEventArgs.cs
- Splitter.cs
- XmlBindingWorker.cs
- TreeBuilderXamlTranslator.cs
- GridViewColumnCollectionChangedEventArgs.cs
- Funcletizer.cs
- HtmlInputText.cs
- OperationCanceledException.cs
- SystemResources.cs
- SolidColorBrush.cs
- PropertyMappingExceptionEventArgs.cs
- ObjectComplexPropertyMapping.cs
- StylusButtonEventArgs.cs
- DesignSurfaceEvent.cs
- CharacterBufferReference.cs
- AssemblyAttributesGoHere.cs
- GenericTextProperties.cs
- Environment.cs
- SecurityNegotiationException.cs
- UriSection.cs
- SerializationSectionGroup.cs
- NetStream.cs
- DataRelationCollection.cs
- hwndwrapper.cs
- WrapPanel.cs
- DataTemplate.cs
- COM2FontConverter.cs
- InplaceBitmapMetadataWriter.cs
- RuntimeConfigurationRecord.cs
- SmtpNtlmAuthenticationModule.cs