Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SecurityHelper.cs
- StickyNoteAnnotations.cs
- PlatformNotSupportedException.cs
- validationstate.cs
- CompositeCollection.cs
- BooleanKeyFrameCollection.cs
- SqlLiftWhereClauses.cs
- DetailsView.cs
- InstanceCreationEditor.cs
- WebPartUserCapability.cs
- DataServiceQueryOfT.cs
- AbandonedMutexException.cs
- TogglePattern.cs
- ListBoxItemAutomationPeer.cs
- TraceHandlerErrorFormatter.cs
- ReadOnlyPropertyMetadata.cs
- GlyphRunDrawing.cs
- ProtectedProviderSettings.cs
- AdapterUtil.cs
- XmlSchemaSet.cs
- RouteCollection.cs
- InternalTransaction.cs
- jithelpers.cs
- _SslState.cs
- Point3D.cs
- BaseTemplateParser.cs
- ToolStripItemDataObject.cs
- DataListItemEventArgs.cs
- PropertyGridView.cs
- CallTemplateAction.cs
- ExecutionContext.cs
- BrowserCapabilitiesFactory35.cs
- IPHostEntry.cs
- ConfigurationPropertyAttribute.cs
- BufferAllocator.cs
- TextWriterTraceListener.cs
- UnhandledExceptionEventArgs.cs
- DocumentPageHost.cs
- TypeDependencyAttribute.cs
- TypeCodeDomSerializer.cs
- CryptoProvider.cs
- CodeIdentifiers.cs
- SmiEventSink_Default.cs
- Reference.cs
- CompModSwitches.cs
- BindValidationContext.cs
- HMACRIPEMD160.cs
- InvokePatternIdentifiers.cs
- DEREncoding.cs
- TextRangeEdit.cs
- SoapReflectionImporter.cs
- BaseAutoFormat.cs
- IdentityValidationException.cs
- SoapHelper.cs
- XmlRootAttribute.cs
- SymLanguageType.cs
- SecurityManager.cs
- XmlHierarchicalDataSourceView.cs
- ApplicationHost.cs
- WindowsToolbarAsMenu.cs
- PersonalizationEntry.cs
- cookiecollection.cs
- HtmlInputFile.cs
- ExceptionUtil.cs
- MessageDecoder.cs
- TableItemPatternIdentifiers.cs
- DefaultTextStoreTextComposition.cs
- ImageKeyConverter.cs
- ImageBrush.cs
- MultiDataTrigger.cs
- PerformanceCounterManager.cs
- HwndKeyboardInputProvider.cs
- PrintDocument.cs
- InkCollectionBehavior.cs
- ContractUtils.cs
- SelectionRangeConverter.cs
- FormatSettings.cs
- printdlgexmarshaler.cs
- TokenCreationParameter.cs
- ByteStack.cs
- WorkflowValidationFailedException.cs
- PageCodeDomTreeGenerator.cs
- SqlDataRecord.cs
- XmlSortKeyAccumulator.cs
- Exception.cs
- ToolboxItem.cs
- SimpleTypeResolver.cs
- ValueExpressions.cs
- BStrWrapper.cs
- DecimalStorage.cs
- GenericParameterDataContract.cs
- SmtpFailedRecipientsException.cs
- ScrollBarAutomationPeer.cs
- EventMappingSettingsCollection.cs
- IconBitmapDecoder.cs
- InteropExecutor.cs
- XappLauncher.cs
- _NegoState.cs
- Menu.cs
- MenuBase.cs