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
- ConnectionInterfaceCollection.cs
- ExtensionQuery.cs
- SpotLight.cs
- CodeParameterDeclarationExpressionCollection.cs
- PropertyEntry.cs
- SHA512Cng.cs
- VisualTreeUtils.cs
- Variant.cs
- DataKey.cs
- FileVersionInfo.cs
- EventMetadata.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- AttributeAction.cs
- CellTreeNode.cs
- ContextMenuService.cs
- StructuredProperty.cs
- PopupEventArgs.cs
- NameTable.cs
- Matrix.cs
- XmlValidatingReaderImpl.cs
- ClientTargetSection.cs
- PropertyInformationCollection.cs
- PropertyPathWorker.cs
- WebConfigurationHost.cs
- SecurityTokenSerializer.cs
- DeploymentExceptionMapper.cs
- HttpValueCollection.cs
- ExternalCalls.cs
- AutoResizedEvent.cs
- Window.cs
- ComplexType.cs
- XmlTextWriter.cs
- SqlConnectionString.cs
- TransportConfigurationTypeElementCollection.cs
- ImageDrawing.cs
- WindowsGraphics.cs
- NativeCppClassAttribute.cs
- CodeThrowExceptionStatement.cs
- VideoDrawing.cs
- PrivilegedConfigurationManager.cs
- CompilationUnit.cs
- PersonalizationEntry.cs
- TrimSurroundingWhitespaceAttribute.cs
- UriTemplateHelpers.cs
- AtomServiceDocumentSerializer.cs
- TextServicesContext.cs
- HtmlInputCheckBox.cs
- RepeatButtonAutomationPeer.cs
- SlotInfo.cs
- RedirectionProxy.cs
- XmlNullResolver.cs
- WindowHideOrCloseTracker.cs
- DataFieldConverter.cs
- PathNode.cs
- DoubleAnimationUsingPath.cs
- NullableFloatMinMaxAggregationOperator.cs
- StyleBamlRecordReader.cs
- DataGridItemCollection.cs
- Quaternion.cs
- DropTarget.cs
- CodeMemberField.cs
- AttachmentCollection.cs
- ScaleTransform3D.cs
- StoragePropertyMapping.cs
- EmptyControlCollection.cs
- MachineSettingsSection.cs
- DataSourceCacheDurationConverter.cs
- SmtpReplyReaderFactory.cs
- VisualBasicSettingsHandler.cs
- _Events.cs
- Rijndael.cs
- DelegateTypeInfo.cs
- IncrementalCompileAnalyzer.cs
- NavigationHelper.cs
- CustomErrorCollection.cs
- PropertyGeneratedEventArgs.cs
- NamespaceInfo.cs
- MouseOverProperty.cs
- ResourceProviderFactory.cs
- SecurityRuntime.cs
- Button.cs
- StringFormat.cs
- MatrixStack.cs
- __Filters.cs
- BehaviorEditorPart.cs
- TextRunTypographyProperties.cs
- Marshal.cs
- SqlConnectionString.cs
- ServiceDescription.cs
- UInt64.cs
- CapabilitiesRule.cs
- XPathNodeHelper.cs
- SerializationUtility.cs
- ACE.cs
- FormViewPagerRow.cs
- DaylightTime.cs
- TextLineResult.cs
- DataGridTextColumn.cs
- ListItemParagraph.cs
- PointCollection.cs