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
- EntityDataSourceDataSelectionPanel.cs
- Invariant.cs
- CompoundFileIOPermission.cs
- SiteMapNodeCollection.cs
- MouseCaptureWithinProperty.cs
- SoapSchemaImporter.cs
- WebBrowserBase.cs
- AttributeQuery.cs
- VisualStyleRenderer.cs
- FormViewModeEventArgs.cs
- RectKeyFrameCollection.cs
- EventNotify.cs
- Vector3DCollectionConverter.cs
- MethodToken.cs
- StringOutput.cs
- ApplicationInterop.cs
- Mapping.cs
- RelOps.cs
- FocusTracker.cs
- GPPOINT.cs
- CodeCatchClauseCollection.cs
- CellPartitioner.cs
- InvariantComparer.cs
- DllNotFoundException.cs
- DbDeleteCommandTree.cs
- LockedHandleGlyph.cs
- GridViewHeaderRowPresenter.cs
- SqlDataSourceCache.cs
- indexingfiltermarshaler.cs
- Single.cs
- DbCommandTree.cs
- ZoneMembershipCondition.cs
- UnaryExpression.cs
- BoundColumn.cs
- RegexWorker.cs
- UnsafeNativeMethods.cs
- ObjectItemAssemblyLoader.cs
- TextSearch.cs
- DummyDataSource.cs
- CollectionViewGroupInternal.cs
- ECDsa.cs
- ColorConverter.cs
- UnmanagedMemoryStream.cs
- Triplet.cs
- IOThreadTimer.cs
- DataGridViewTextBoxColumn.cs
- CodeConstructor.cs
- NamedPipeHostedTransportConfiguration.cs
- DrawingAttributeSerializer.cs
- ThreadAbortException.cs
- XmlSchemaImporter.cs
- RadioButton.cs
- SystemSounds.cs
- ScrollViewerAutomationPeer.cs
- HttpCapabilitiesBase.cs
- VirtualPathExtension.cs
- QualifiedCellIdBoolean.cs
- OracleBFile.cs
- DSACryptoServiceProvider.cs
- ProjectedSlot.cs
- TrackingMemoryStream.cs
- Part.cs
- ClientBuildManager.cs
- TypeContext.cs
- TextContainerChangeEventArgs.cs
- ImageInfo.cs
- ClientUtils.cs
- DataPagerField.cs
- SoapException.cs
- XamlStackWriter.cs
- KeyValueSerializer.cs
- ConstraintEnumerator.cs
- ObjectManager.cs
- graph.cs
- Padding.cs
- LogRecordSequence.cs
- AdPostCacheSubstitution.cs
- _SslState.cs
- parserscommon.cs
- SoapDocumentMethodAttribute.cs
- PersonalizationState.cs
- ImagingCache.cs
- LocalizableAttribute.cs
- EntitySqlException.cs
- Odbc32.cs
- DataGridPagerStyle.cs
- RegisteredHiddenField.cs
- OLEDB_Enum.cs
- CompiledELinqQueryState.cs
- PropertyManager.cs
- UnhandledExceptionEventArgs.cs
- ModelPerspective.cs
- ToolStripSplitButton.cs
- FileUtil.cs
- ColumnReorderedEventArgs.cs
- UrlPath.cs
- ExceptionUtil.cs
- SHA1Cng.cs
- XPathNodeIterator.cs
- GridViewDeleteEventArgs.cs