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
- DockPanel.cs
- ObjectQueryProvider.cs
- ArgumentsParser.cs
- SplashScreenNativeMethods.cs
- ReflectionPermission.cs
- FrameworkContextData.cs
- WebRequestModulesSection.cs
- DataGridComboBoxColumn.cs
- DependentTransaction.cs
- ConfigurationStrings.cs
- MultiSelectRootGridEntry.cs
- SocketException.cs
- HuffmanTree.cs
- SmtpReplyReaderFactory.cs
- HttpListenerRequest.cs
- ServicesUtilities.cs
- XmlExtensionFunction.cs
- XmlTextWriter.cs
- BitmapFrameDecode.cs
- CustomBinding.cs
- BamlLocalizableResource.cs
- SqlServer2KCompatibilityAnnotation.cs
- WinFormsSpinner.cs
- OperationPickerDialog.cs
- Light.cs
- Message.cs
- AspNetSynchronizationContext.cs
- FlowLayoutPanel.cs
- HttpProfileBase.cs
- DockProviderWrapper.cs
- CalendarItem.cs
- NameValuePermission.cs
- FixedPageStructure.cs
- PinnedBufferMemoryStream.cs
- DecimalConstantAttribute.cs
- MenuItemBindingCollection.cs
- CreatingCookieEventArgs.cs
- OperationContext.cs
- ThreadStartException.cs
- TdsParser.cs
- unsafenativemethodstextservices.cs
- ColorBuilder.cs
- UniformGrid.cs
- LogSwitch.cs
- InteropBitmapSource.cs
- TextEditorLists.cs
- IgnoreFlushAndCloseStream.cs
- XmlDataSource.cs
- BrushMappingModeValidation.cs
- RootBrowserWindowProxy.cs
- MappingSource.cs
- DragDeltaEventArgs.cs
- SqlDataRecord.cs
- FontFamilyValueSerializer.cs
- DataTableExtensions.cs
- SQLSingleStorage.cs
- ListView.cs
- TimeStampChecker.cs
- ServicePointManagerElement.cs
- cookieexception.cs
- ImageMapEventArgs.cs
- RowCache.cs
- SrgsElementList.cs
- XslNumber.cs
- BufferedGraphics.cs
- URLString.cs
- FlagsAttribute.cs
- ValidationEventArgs.cs
- Int16Converter.cs
- OdbcStatementHandle.cs
- MemberDomainMap.cs
- DataTablePropertyDescriptor.cs
- BinaryKeyIdentifierClause.cs
- MultidimensionalArrayItemReference.cs
- TransformerConfigurationWizardBase.cs
- SystemNetworkInterface.cs
- IMembershipProvider.cs
- SqlAggregateChecker.cs
- ManagedFilter.cs
- NumberFormatInfo.cs
- ThreadSafeList.cs
- DataFormats.cs
- FloaterBaseParaClient.cs
- HttpCapabilitiesEvaluator.cs
- entityreference_tresulttype.cs
- AsyncCompletedEventArgs.cs
- DataListCommandEventArgs.cs
- IdleTimeoutMonitor.cs
- RelationshipConstraintValidator.cs
- HMACSHA256.cs
- StringAnimationBase.cs
- UnsafeNativeMethodsCLR.cs
- ManagementEventWatcher.cs
- ToolStripHighContrastRenderer.cs
- UnsafeNativeMethods.cs
- documentsequencetextpointer.cs
- WebPartDesigner.cs
- StylusEventArgs.cs
- WeakEventTable.cs
- NameValuePair.cs