Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / MS / Internal / FontCache / CachedTypeface.cs / 1 / CachedTypeface.cs
//---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: CachedTypeface // // History: 6-08-2005 [....], 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RegisterInfo.cs
- TemplateXamlParser.cs
- LineSegment.cs
- BoundField.cs
- CollectionBase.cs
- BinaryNode.cs
- BrushConverter.cs
- ButtonPopupAdapter.cs
- BuildProviderAppliesToAttribute.cs
- ShapeTypeface.cs
- HtmlInputCheckBox.cs
- XmlObjectSerializerReadContextComplex.cs
- SessionStateSection.cs
- CodeEntryPointMethod.cs
- DataGridViewCellEventArgs.cs
- WCFModelStrings.Designer.cs
- TypeSystem.cs
- DataService.cs
- XMLUtil.cs
- DiagnosticTrace.cs
- GuidelineCollection.cs
- CodeCommentStatement.cs
- TreeNodeStyle.cs
- ThreadStateException.cs
- ArraySubsetEnumerator.cs
- WorkflowEnvironment.cs
- URLMembershipCondition.cs
- BlurEffect.cs
- MouseOverProperty.cs
- TreeNodeCollectionEditor.cs
- DataKey.cs
- ChannelManager.cs
- BasicHttpMessageSecurity.cs
- ValidatingReaderNodeData.cs
- Sentence.cs
- BigInt.cs
- MultiPageTextView.cs
- DataGridViewCellParsingEventArgs.cs
- XamlBuildTaskServices.cs
- SafeNativeMethods.cs
- PointCollection.cs
- BaseWebProxyFinder.cs
- WindowsStatic.cs
- TextProviderWrapper.cs
- InitializationEventAttribute.cs
- FastPropertyAccessor.cs
- SqlInternalConnectionTds.cs
- AssociationTypeEmitter.cs
- SerialErrors.cs
- WebPartCatalogAddVerb.cs
- ServiceChannelManager.cs
- SqlUtil.cs
- GridView.cs
- TokenBasedSet.cs
- XamlPathDataSerializer.cs
- DataKeyCollection.cs
- DictionaryGlobals.cs
- XmlSecureResolver.cs
- LogExtentCollection.cs
- RelationshipType.cs
- RepeaterItemCollection.cs
- prompt.cs
- SqlCaseSimplifier.cs
- ACL.cs
- DispatcherOperation.cs
- BindingCompleteEventArgs.cs
- Wow64ConfigurationLoader.cs
- CallInfo.cs
- UserPreferenceChangedEventArgs.cs
- TextReader.cs
- VerificationAttribute.cs
- IdentityHolder.cs
- ColumnMapProcessor.cs
- ProfilePropertyNameValidator.cs
- PersistChildrenAttribute.cs
- CombinedTcpChannel.cs
- ViewBase.cs
- TextBoxDesigner.cs
- InputLanguageCollection.cs
- BufferAllocator.cs
- ContentDesigner.cs
- Int16.cs
- ConnectionsZoneAutoFormat.cs
- XPathNavigatorException.cs
- Console.cs
- PathParser.cs
- SoapReflectionImporter.cs
- XPathNavigatorKeyComparer.cs
- Composition.cs
- Renderer.cs
- CaseInsensitiveHashCodeProvider.cs
- BrushMappingModeValidation.cs
- GiveFeedbackEventArgs.cs
- ValidatedControlConverter.cs
- LoginCancelEventArgs.cs
- XmlSchemaSimpleContent.cs
- TextDecorationCollection.cs
- ProfileProvider.cs
- SkinBuilder.cs
- AutomationAttributeInfo.cs