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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QueueSurrogate.cs
- Types.cs
- DataGridRowAutomationPeer.cs
- ByteFacetDescriptionElement.cs
- Size3D.cs
- RegisteredArrayDeclaration.cs
- _OverlappedAsyncResult.cs
- DateTimePicker.cs
- MeasureData.cs
- ZipFileInfoCollection.cs
- HttpContext.cs
- NativeRightsManagementAPIsStructures.cs
- ConfigurationLocationCollection.cs
- WebPartDisplayMode.cs
- SectionInput.cs
- PolicyValidator.cs
- BitConverter.cs
- DataRowComparer.cs
- HtmlHead.cs
- PerfCounterSection.cs
- HtmlTableRowCollection.cs
- DescendantOverDescendantQuery.cs
- TableLayoutStyle.cs
- XmlBinaryWriterSession.cs
- ConditionalAttribute.cs
- BasicHttpSecurity.cs
- securestring.cs
- PointCollectionValueSerializer.cs
- AddressHeader.cs
- KeyboardNavigation.cs
- HtmlInputControl.cs
- DrawToolTipEventArgs.cs
- EmptyCollection.cs
- DataSourceSelectArguments.cs
- XmlSchemaImport.cs
- _NegoState.cs
- StreamAsIStream.cs
- WindowInteropHelper.cs
- Certificate.cs
- SqlConnectionHelper.cs
- GridViewColumnCollectionChangedEventArgs.cs
- TypeDescriptorFilterService.cs
- PasswordDeriveBytes.cs
- WsdlBuildProvider.cs
- BufferedOutputStream.cs
- RuleRefElement.cs
- SizeAnimationBase.cs
- OrderedDictionaryStateHelper.cs
- SortDescriptionCollection.cs
- WebPartMovingEventArgs.cs
- TraceXPathNavigator.cs
- RuleDefinitions.cs
- AssemblyName.cs
- CacheHelper.cs
- TransactionsSectionGroup.cs
- SemanticKeyElement.cs
- LessThan.cs
- TargetControlTypeAttribute.cs
- SudsParser.cs
- InputScopeNameConverter.cs
- SettingsSavedEventArgs.cs
- Trace.cs
- _DynamicWinsockMethods.cs
- X509ChainElement.cs
- ClientRuntimeConfig.cs
- RectangleGeometry.cs
- SqlMethodAttribute.cs
- CalendarDay.cs
- ConditionalAttribute.cs
- Membership.cs
- CurrentChangedEventManager.cs
- LZCodec.cs
- XmlDataCollection.cs
- XomlSerializationHelpers.cs
- IdentityManager.cs
- XamlLoadErrorInfo.cs
- WorkflowHostingResponseContext.cs
- GenericWebPart.cs
- SerializationUtility.cs
- CurrentChangingEventArgs.cs
- DesignerTextBoxAdapter.cs
- AudioBase.cs
- AdministrationHelpers.cs
- LabelAutomationPeer.cs
- LocalizableAttribute.cs
- Queue.cs
- propertyentry.cs
- LinearGradientBrush.cs
- WorkflowService.cs
- XmlSchemaComplexType.cs
- AuthenticatingEventArgs.cs
- ModelUtilities.cs
- ToolStripDropDownClosedEventArgs.cs
- LinearQuaternionKeyFrame.cs
- WebBrowser.cs
- InvalidWMPVersionException.cs
- DataStreams.cs
- RequestResizeEvent.cs
- GroupItemAutomationPeer.cs
- PackWebRequestFactory.cs