Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EmptyControlCollection.cs
- MarkupProperty.cs
- WebPartRestoreVerb.cs
- FormsAuthentication.cs
- ISO2022Encoding.cs
- ChildrenQuery.cs
- FontWeight.cs
- ObjectStateFormatter.cs
- LogEntryHeaderSerializer.cs
- SystemIPv4InterfaceProperties.cs
- InvalidateEvent.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- DataGridCell.cs
- SafeNativeMethods.cs
- ProgressBar.cs
- LinearKeyFrames.cs
- SqlErrorCollection.cs
- DataGridViewSelectedColumnCollection.cs
- PropertyConverter.cs
- SmtpNegotiateAuthenticationModule.cs
- COM2ComponentEditor.cs
- WebPartZone.cs
- WinEventHandler.cs
- TextCompositionManager.cs
- TracingConnection.cs
- HitTestDrawingContextWalker.cs
- LowerCaseStringConverter.cs
- ProcessInfo.cs
- AnimationClockResource.cs
- FrameworkTemplate.cs
- DateTimeStorage.cs
- SharedDp.cs
- TagNameToTypeMapper.cs
- ASCIIEncoding.cs
- AutomationPropertyChangedEventArgs.cs
- DataTemplateSelector.cs
- SerialPinChanges.cs
- ColumnCollection.cs
- XmlExtensionFunction.cs
- StringStorage.cs
- StateBag.cs
- LongTypeConverter.cs
- HTMLTagNameToTypeMapper.cs
- Utils.cs
- ConnectionPool.cs
- XPathNodePointer.cs
- UIElementParaClient.cs
- MenuItemAutomationPeer.cs
- SelectionHighlightInfo.cs
- ExpressionBuilder.cs
- DataMisalignedException.cs
- XmlSchemaFacet.cs
- TrueReadOnlyCollection.cs
- ActiveXHost.cs
- WebPartEventArgs.cs
- ObjectTag.cs
- Overlapped.cs
- ValidationResult.cs
- XmlSerializerVersionAttribute.cs
- ValueUtilsSmi.cs
- Content.cs
- Vector3DValueSerializer.cs
- MenuItem.cs
- ValidationRuleCollection.cs
- LayoutEditorPart.cs
- RenameRuleObjectDialog.Designer.cs
- PackageDigitalSignature.cs
- NumberFormatter.cs
- PersonalizableAttribute.cs
- ChangeTracker.cs
- LinqDataSourceStatusEventArgs.cs
- CodeParameterDeclarationExpressionCollection.cs
- FileChangesMonitor.cs
- BasicCellRelation.cs
- HttpProcessUtility.cs
- AnnotationMap.cs
- SmtpMail.cs
- VirtualizingPanel.cs
- PersonalizationProvider.cs
- CheckedListBox.cs
- DataBoundLiteralControl.cs
- XmlTextAttribute.cs
- SqlServices.cs
- UpdateRecord.cs
- PostBackOptions.cs
- DesignerForm.cs
- CfgParser.cs
- CharacterShapingProperties.cs
- XmlDataLoader.cs
- IdentityHolder.cs
- CombinedTcpChannel.cs
- TextRunTypographyProperties.cs
- IndentTextWriter.cs
- StorageMappingItemCollection.cs
- DetailsViewRowCollection.cs
- SurrogateSelector.cs
- OleStrCAMarshaler.cs
- DummyDataSource.cs
- AxDesigner.cs
- AccessDataSourceWizardForm.cs