Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / MS / Internal / FontCache / CachedTypeface.cs / 1 / 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
- Pen.cs
- HttpRuntimeSection.cs
- XamlSerializerUtil.cs
- PropertyConverter.cs
- PartialToken.cs
- COSERVERINFO.cs
- AudioLevelUpdatedEventArgs.cs
- CustomLineCap.cs
- RenderCapability.cs
- FastEncoderWindow.cs
- __ConsoleStream.cs
- PropagatorResult.cs
- DebugHandleTracker.cs
- EmptyElement.cs
- adornercollection.cs
- DrawingState.cs
- SymmetricAlgorithm.cs
- SslStream.cs
- TreeNode.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- HashStream.cs
- Pkcs7Recipient.cs
- ApplicationHost.cs
- Boolean.cs
- AudioLevelUpdatedEventArgs.cs
- CodeObject.cs
- HelpProvider.cs
- XamlClipboardData.cs
- _ChunkParse.cs
- FilteredAttributeCollection.cs
- PrintDocument.cs
- followingquery.cs
- ShaderEffect.cs
- BulletChrome.cs
- TypeEnumerableViewSchema.cs
- UInt32.cs
- FirstMatchCodeGroup.cs
- ResponseBodyWriter.cs
- RequestCacheEntry.cs
- ParentControlDesigner.cs
- SubqueryTrackingVisitor.cs
- ImmutableClientRuntime.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- ScriptManager.cs
- MD5CryptoServiceProvider.cs
- InsufficientMemoryException.cs
- WindowsStartMenu.cs
- DispatchChannelSink.cs
- SchemaCollectionCompiler.cs
- ReferenceEqualityComparer.cs
- GuidelineSet.cs
- QuotedStringWriteStateInfo.cs
- TargetException.cs
- TrustSection.cs
- InstanceDescriptor.cs
- SslStream.cs
- TypeGeneratedEventArgs.cs
- QuaternionValueSerializer.cs
- NewArray.cs
- DefaultParameterValueAttribute.cs
- SqlParameterizer.cs
- XPathScanner.cs
- XmlILOptimizerVisitor.cs
- webclient.cs
- Int32CollectionValueSerializer.cs
- AttachedPropertiesService.cs
- CacheForPrimitiveTypes.cs
- ErrorHandler.cs
- Table.cs
- XmlDictionaryReaderQuotasElement.cs
- SystemDiagnosticsSection.cs
- BitmapDecoder.cs
- XamlInt32CollectionSerializer.cs
- WebMessageEncoderFactory.cs
- ToolStripLocationCancelEventArgs.cs
- Style.cs
- xmlfixedPageInfo.cs
- StylusEventArgs.cs
- BreakRecordTable.cs
- SerializationException.cs
- basecomparevalidator.cs
- IdentifierService.cs
- UrlMappingsSection.cs
- HybridDictionary.cs
- PermissionSet.cs
- DynamicDocumentPaginator.cs
- WebPartZone.cs
- DocumentPageTextView.cs
- FontConverter.cs
- ButtonFieldBase.cs
- TypeSystem.cs
- RoleGroup.cs
- XamlBrushSerializer.cs
- AnnotationComponentChooser.cs
- BoundsDrawingContextWalker.cs
- MailBnfHelper.cs
- DataBoundControlDesigner.cs
- AttributeUsageAttribute.cs
- MobileResource.cs
- KeyTime.cs