Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / FontCache / CachedTypeface.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- infer.cs
- GrammarBuilder.cs
- FontEmbeddingManager.cs
- SectionVisual.cs
- DefaultPropertyAttribute.cs
- CellPartitioner.cs
- ServicePrincipalNameElement.cs
- WebRequestModuleElementCollection.cs
- DbParameterCollection.cs
- DecoderBestFitFallback.cs
- MethodImplAttribute.cs
- RuleSetCollection.cs
- HitTestResult.cs
- SmiContextFactory.cs
- DataGridViewComboBoxColumn.cs
- GridViewUpdatedEventArgs.cs
- DESCryptoServiceProvider.cs
- safemediahandle.cs
- CodeNamespace.cs
- CollectionEditor.cs
- PtsPage.cs
- NumberAction.cs
- CodeTypeMember.cs
- CorrelationManager.cs
- SerialReceived.cs
- AsymmetricCryptoHandle.cs
- RegexNode.cs
- LiteralControl.cs
- CommandEventArgs.cs
- ServiceModelInstallComponent.cs
- QueryResponse.cs
- clipboard.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- ConnectionProviderAttribute.cs
- Variable.cs
- ResourceManager.cs
- CodeAttributeArgument.cs
- Expression.cs
- MetaModel.cs
- RIPEMD160.cs
- Underline.cs
- HitTestParameters.cs
- EventLogEntry.cs
- TemplateColumn.cs
- HtmlTextBoxAdapter.cs
- InputLangChangeRequestEvent.cs
- HtmlWindowCollection.cs
- HitTestDrawingContextWalker.cs
- ZipIOExtraFieldElement.cs
- Translator.cs
- WebBrowserSiteBase.cs
- MessageBuilder.cs
- WhitespaceRuleReader.cs
- CodeVariableDeclarationStatement.cs
- ImmutableClientRuntime.cs
- LocalizableAttribute.cs
- TextEditorMouse.cs
- SafeNativeMemoryHandle.cs
- DateTimeFormat.cs
- DiscoveryClientOutputChannel.cs
- RoutedEventHandlerInfo.cs
- ArrayConverter.cs
- WebPartDisplayModeCancelEventArgs.cs
- AnchoredBlock.cs
- URI.cs
- HttpVersion.cs
- JsonEnumDataContract.cs
- LoggedException.cs
- ExpandCollapseProviderWrapper.cs
- TypedTableBaseExtensions.cs
- ArraySegment.cs
- CodeSubDirectory.cs
- _NegoStream.cs
- RequestSecurityTokenForGetBrowserToken.cs
- DictionaryItemsCollection.cs
- DataContractSerializerSection.cs
- BrowsableAttribute.cs
- Simplifier.cs
- XmlFormatExtensionAttribute.cs
- HttpContext.cs
- PaperSize.cs
- QilPatternVisitor.cs
- HandledMouseEvent.cs
- ContainerVisual.cs
- PolicyDesigner.cs
- EventLogEntryCollection.cs
- SectionVisual.cs
- ExtendedProtectionPolicy.cs
- TableLayoutStyleCollection.cs
- TypeSystemHelpers.cs
- StaticSiteMapProvider.cs
- CodeBlockBuilder.cs
- TypeLoadException.cs
- ListCollectionView.cs
- RawStylusInputCustomData.cs
- SplitContainer.cs
- ContractMapping.cs
- SqlDataSourceSummaryPanel.cs
- FragmentNavigationEventArgs.cs
- ImageInfo.cs