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
- SecurityDocument.cs
- StringPropertyBuilder.cs
- FixedTextContainer.cs
- __ConsoleStream.cs
- AnalyzedTree.cs
- DrawingGroup.cs
- SplitContainer.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- CodeNamespace.cs
- QuaternionRotation3D.cs
- TextContainer.cs
- HtmlTableRowCollection.cs
- ColumnWidthChangingEvent.cs
- UIElementParaClient.cs
- GeometryDrawing.cs
- TimeSpanValidatorAttribute.cs
- ACE.cs
- ToolStripProgressBar.cs
- WebResponse.cs
- OrderByExpression.cs
- Message.cs
- JsonGlobals.cs
- WebPartDisplayModeCancelEventArgs.cs
- JoinGraph.cs
- StrongNameUtility.cs
- PerfCounterSection.cs
- Quack.cs
- TextDocumentView.cs
- NativeMethods.cs
- ProcessMonitor.cs
- Trace.cs
- WebServiceTypeData.cs
- ImportContext.cs
- DynamicDiscoSearcher.cs
- DirectionalLight.cs
- TextCompositionManager.cs
- OracleMonthSpan.cs
- ChannelFactoryRefCache.cs
- MSG.cs
- ChtmlTextWriter.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ToolStripMenuItem.cs
- OleDbConnectionFactory.cs
- TypeExtensions.cs
- UriTemplateDispatchFormatter.cs
- TextBounds.cs
- LogicalExpressionEditor.cs
- DateTimeFormat.cs
- WebPartEventArgs.cs
- VectorConverter.cs
- WebBrowserNavigatedEventHandler.cs
- KnownAssembliesSet.cs
- Int32CAMarshaler.cs
- DetailsViewDeletedEventArgs.cs
- BitmapSizeOptions.cs
- GenericIdentity.cs
- GeometryDrawing.cs
- TypeDescriptionProviderAttribute.cs
- DocumentSchemaValidator.cs
- SerializerWriterEventHandlers.cs
- Gdiplus.cs
- HashAlgorithm.cs
- IEnumerable.cs
- SHA384.cs
- OdbcDataAdapter.cs
- TransformerTypeCollection.cs
- EntityDataSourceChangedEventArgs.cs
- InfoCardRSACryptoProvider.cs
- InfoCardClaim.cs
- IgnoreSection.cs
- DataControlFieldCollection.cs
- SynchronizedInputPattern.cs
- RegexCapture.cs
- FragmentQueryKB.cs
- ThreadPool.cs
- TimestampInformation.cs
- XmlJsonWriter.cs
- IndicShape.cs
- DependencyPropertyChangedEventArgs.cs
- ResXResourceReader.cs
- MediaTimeline.cs
- HideDisabledControlAdapter.cs
- CodeSnippetCompileUnit.cs
- IItemContainerGenerator.cs
- WindowsProgressbar.cs
- TextTreeRootTextBlock.cs
- FixedNode.cs
- BufferBuilder.cs
- IUnknownConstantAttribute.cs
- UIElement3D.cs
- BrowserCapabilitiesCompiler.cs
- MSAANativeProvider.cs
- PrinterResolution.cs
- ToolStripContentPanelDesigner.cs
- LinkButton.cs
- BasePattern.cs
- assertwrapper.cs
- BufferedStream.cs
- TimeSpan.cs
- HostedHttpContext.cs