Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewHeaderCell.cs
- ListViewDeleteEventArgs.cs
- TimeStampChecker.cs
- UIElementCollection.cs
- PathFigureCollectionConverter.cs
- Transaction.cs
- ConfigXmlText.cs
- DataColumnCollection.cs
- PropertyToken.cs
- DebugControllerThread.cs
- NodeLabelEditEvent.cs
- FileSystemInfo.cs
- SecUtil.cs
- DeclarativeExpressionConditionDeclaration.cs
- ContentPropertyAttribute.cs
- FontDialog.cs
- ToolboxItemAttribute.cs
- JpegBitmapEncoder.cs
- DateTimeStorage.cs
- BookmarkList.cs
- PersonalizationStateQuery.cs
- Attributes.cs
- ObjectMemberMapping.cs
- PasswordRecoveryDesigner.cs
- InternalSafeNativeMethods.cs
- UserMapPath.cs
- Compress.cs
- Semaphore.cs
- TypedElement.cs
- InstallerTypeAttribute.cs
- ToggleButtonAutomationPeer.cs
- DataPagerFieldCommandEventArgs.cs
- PerformanceCounter.cs
- DataSourceExpressionCollection.cs
- Control.cs
- TimelineGroup.cs
- BeginEvent.cs
- RegistryPermission.cs
- ComponentChangedEvent.cs
- ServiceContractGenerator.cs
- StringToken.cs
- GetLedgerEntryForRecipientRequest.cs
- ProcessInfo.cs
- BeginEvent.cs
- TypeTypeConverter.cs
- TableCellCollection.cs
- Image.cs
- ThemeDictionaryExtension.cs
- CredentialCache.cs
- ValidationEventArgs.cs
- DbCommandDefinition.cs
- ScriptControl.cs
- Query.cs
- ConstraintEnumerator.cs
- AutoSizeToolBoxItem.cs
- TableCell.cs
- MemoryFailPoint.cs
- ResourceExpressionBuilder.cs
- GenericTypeParameterBuilder.cs
- WhitespaceReader.cs
- ControlParameter.cs
- SessionState.cs
- HandlerWithFactory.cs
- ValueOfAction.cs
- WindowsAuthenticationEventArgs.cs
- BaseCollection.cs
- FacetValues.cs
- PrintPageEvent.cs
- AutomationAttributeInfo.cs
- HiddenFieldPageStatePersister.cs
- PointHitTestResult.cs
- GridPattern.cs
- DurationConverter.cs
- ApplicationException.cs
- COM2PropertyPageUITypeConverter.cs
- PageThemeParser.cs
- DiagnosticsElement.cs
- CompilationUnit.cs
- configsystem.cs
- NonParentingControl.cs
- LocatorGroup.cs
- TraceHwndHost.cs
- SoapFormatter.cs
- XNameConverter.cs
- TextDecorationUnitValidation.cs
- storepermission.cs
- ProcessHostServerConfig.cs
- PartManifestEntry.cs
- CombinedGeometry.cs
- LinkButton.cs
- WebPartEditorOkVerb.cs
- GenericIdentity.cs
- ProtectedUri.cs
- AnimationClockResource.cs
- BaseValidator.cs
- DataView.cs
- MediaContextNotificationWindow.cs
- CheckedPointers.cs
- WebServiceHandler.cs
- ObjectContext.cs