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
- ResourceAssociationTypeEnd.cs
- DetailsViewInsertEventArgs.cs
- BindingRestrictions.cs
- ValueUnavailableException.cs
- OleDbPermission.cs
- Activator.cs
- SaveFileDialog.cs
- Constant.cs
- MobileControlBuilder.cs
- QilList.cs
- Matrix.cs
- NotificationContext.cs
- AlphabetConverter.cs
- WindowsFormsLinkLabel.cs
- NumericUpDown.cs
- ScanQueryOperator.cs
- GlyphRunDrawing.cs
- _DomainName.cs
- DataGridBoolColumn.cs
- RelationshipEntry.cs
- FloaterParaClient.cs
- GlobalizationAssembly.cs
- XPathDescendantIterator.cs
- TokenBasedSetEnumerator.cs
- DataControlPagerLinkButton.cs
- PageContentAsyncResult.cs
- ObjectQueryExecutionPlan.cs
- FramingDecoders.cs
- ErrorTableItemStyle.cs
- SignerInfo.cs
- AuthenticationSection.cs
- ColumnTypeConverter.cs
- RemotingAttributes.cs
- FormCollection.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- InvalidProgramException.cs
- StackSpiller.Temps.cs
- DrawingVisual.cs
- ProfileInfo.cs
- FileDialogCustomPlace.cs
- ClrPerspective.cs
- TypeHelpers.cs
- CompilerState.cs
- ParallelActivityDesigner.cs
- GC.cs
- Frame.cs
- StorageEndPropertyMapping.cs
- ObjectViewQueryResultData.cs
- InputScopeManager.cs
- CmsInterop.cs
- CachedFontFace.cs
- DataGridColumn.cs
- AsyncStreamReader.cs
- UnsettableComboBox.cs
- TdsValueSetter.cs
- EventRoute.cs
- ListViewCancelEventArgs.cs
- ExceptionUtility.cs
- IncrementalReadDecoders.cs
- oledbmetadatacolumnnames.cs
- Mouse.cs
- NativeMethods.cs
- MetadataItemSerializer.cs
- Timer.cs
- odbcmetadatacollectionnames.cs
- FixedSOMTextRun.cs
- KnownIds.cs
- TabletDevice.cs
- ping.cs
- SerializerProvider.cs
- DictionaryManager.cs
- ListBindingHelper.cs
- BadImageFormatException.cs
- InspectionWorker.cs
- ReflectionHelper.cs
- MarshalDirectiveException.cs
- EntityDataSourceWizardForm.cs
- MergeFailedEvent.cs
- XmlStreamStore.cs
- DefaultTextStore.cs
- DynamicArgumentDesigner.xaml.cs
- ResourcePool.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- Operand.cs
- TextRangeAdaptor.cs
- XmlSchemaSimpleContent.cs
- XmlSchemaSimpleContentRestriction.cs
- ListViewSortEventArgs.cs
- TextElementAutomationPeer.cs
- CompareValidator.cs
- __Error.cs
- AttributeTableBuilder.cs
- TraceContextRecord.cs
- SetterBase.cs
- ObjectStorage.cs
- DocumentViewerBase.cs
- TextRunCache.cs
- TablePattern.cs
- ProfilePropertyMetadata.cs
- ClientTargetSection.cs