Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- GetKeyedHashRequest.cs
- HtmlEncodedRawTextWriter.cs
- DataGridRelationshipRow.cs
- ListItemCollection.cs
- XmlSerializerAssemblyAttribute.cs
- WebMessageFormatHelper.cs
- AsyncOperationManager.cs
- UIHelper.cs
- RepeaterDataBoundAdapter.cs
- Expander.cs
- DataSourceConverter.cs
- UiaCoreApi.cs
- XmlSignificantWhitespace.cs
- RegistryKey.cs
- NativeBuffer.cs
- XmlTextReaderImplHelpers.cs
- SqlCacheDependencyDatabaseCollection.cs
- PathSegmentCollection.cs
- EdmItemError.cs
- DynamicRouteExpression.cs
- TracingConnectionListener.cs
- ScriptModule.cs
- ReferentialConstraintRoleElement.cs
- SpellerStatusTable.cs
- FamilyCollection.cs
- RoutedCommand.cs
- Solver.cs
- GeneralTransformCollection.cs
- PropertyOverridesTypeEditor.cs
- SQLDoubleStorage.cs
- NonPrimarySelectionGlyph.cs
- Enlistment.cs
- RangeContentEnumerator.cs
- MatrixAnimationUsingKeyFrames.cs
- ErrorWebPart.cs
- DPTypeDescriptorContext.cs
- ResourceBinder.cs
- WinEventWrap.cs
- ZipFileInfo.cs
- EndpointAddressElementBase.cs
- SqlDataSource.cs
- ContainsSearchOperator.cs
- NotImplementedException.cs
- NullableConverter.cs
- DataSourceControlBuilder.cs
- OracleString.cs
- DataSourceBooleanViewSchemaConverter.cs
- Types.cs
- ByteStreamGeometryContext.cs
- SkipQueryOptionExpression.cs
- LeftCellWrapper.cs
- Comparer.cs
- SecurityHelper.cs
- DrawingAttributeSerializer.cs
- SiteMembershipCondition.cs
- SessionStateUtil.cs
- WorkflowNamespace.cs
- OptionUsage.cs
- UIPermission.cs
- x509store.cs
- SocketAddress.cs
- StreamResourceInfo.cs
- ArcSegment.cs
- DocumentsTrace.cs
- XmlAttributeOverrides.cs
- UpdatePanelTriggerCollection.cs
- xdrvalidator.cs
- ColorBuilder.cs
- ScopeCollection.cs
- NetSectionGroup.cs
- MgmtConfigurationRecord.cs
- AliasExpr.cs
- MissingSatelliteAssemblyException.cs
- Highlights.cs
- HtmlSelect.cs
- CharUnicodeInfo.cs
- DataListItemEventArgs.cs
- Int16.cs
- Buffer.cs
- ToolStripItemCollection.cs
- VoiceInfo.cs
- CodeNamespaceImport.cs
- Semaphore.cs
- DataGridViewCellPaintingEventArgs.cs
- DbException.cs
- mediaeventshelper.cs
- D3DImage.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SubqueryRules.cs
- ToolStripDropDownMenu.cs
- SymbolTable.cs
- AssemblyHash.cs
- MediaCommands.cs
- RoutedEventConverter.cs
- VectorCollectionValueSerializer.cs
- _LocalDataStore.cs
- NamedElement.cs
- GreenMethods.cs
- XmlKeywords.cs
- BitmapFrameDecode.cs