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
- MappingMetadataHelper.cs
- LogEntrySerializationException.cs
- DetailsViewUpdatedEventArgs.cs
- Timer.cs
- DataGridViewCellValidatingEventArgs.cs
- PolicyUnit.cs
- RIPEMD160.cs
- OdbcStatementHandle.cs
- SocketException.cs
- NativeBuffer.cs
- ControlCachePolicy.cs
- GridLength.cs
- Schedule.cs
- FileReservationCollection.cs
- ElementHostAutomationPeer.cs
- CollectionChangeEventArgs.cs
- AutoCompleteStringCollection.cs
- FlowLayoutSettings.cs
- SHA384Cng.cs
- CollectionDataContract.cs
- DataGridSortingEventArgs.cs
- DataGridViewControlCollection.cs
- OdbcPermission.cs
- RuleSetReference.cs
- NativeWindow.cs
- Input.cs
- TemplateControlBuildProvider.cs
- RequestStatusBarUpdateEventArgs.cs
- SystemIcmpV4Statistics.cs
- TextFindEngine.cs
- GridViewColumnHeader.cs
- WebPartMovingEventArgs.cs
- ISessionStateStore.cs
- LambdaExpression.cs
- DefaultTraceListener.cs
- RawStylusInputReport.cs
- BridgeDataRecord.cs
- TextDecorationLocationValidation.cs
- NameValuePermission.cs
- TouchPoint.cs
- NodeFunctions.cs
- PropertyGridCommands.cs
- SQLString.cs
- XmlWrappingWriter.cs
- xmlformatgeneratorstatics.cs
- CombinedGeometry.cs
- ContextMenu.cs
- ConvertEvent.cs
- SmtpDigestAuthenticationModule.cs
- ListDictionaryInternal.cs
- UniqueConstraint.cs
- XmlReader.cs
- DataGridViewButtonCell.cs
- NativeMethods.cs
- WebServiceParameterData.cs
- HttpContextWrapper.cs
- TypeUtil.cs
- FileLogRecord.cs
- DataGridPagerStyle.cs
- CodeDomSerializerBase.cs
- CLRBindingWorker.cs
- OleDbCommandBuilder.cs
- TiffBitmapDecoder.cs
- InitializingNewItemEventArgs.cs
- ColorBlend.cs
- TextServicesPropertyRanges.cs
- EastAsianLunisolarCalendar.cs
- DataKeyPropertyAttribute.cs
- InputBuffer.cs
- WsatTransactionInfo.cs
- SiteIdentityPermission.cs
- WindowsFont.cs
- PeerReferralPolicy.cs
- ScalarRestriction.cs
- DataSetFieldSchema.cs
- EmptyStringExpandableObjectConverter.cs
- InternalTypeHelper.cs
- ListViewCommandEventArgs.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- RuleInfoComparer.cs
- RequestQueryParser.cs
- Event.cs
- TargetControlTypeCache.cs
- FlowDocument.cs
- AnonymousIdentificationSection.cs
- DateTimeUtil.cs
- ResizeGrip.cs
- TypeDescriptionProviderAttribute.cs
- DictionaryBase.cs
- StringArrayConverter.cs
- UInt32Converter.cs
- DotExpr.cs
- ListViewCommandEventArgs.cs
- TextAnchor.cs
- SchemaElementDecl.cs
- BitmapEffectCollection.cs
- String.cs
- SmtpReplyReader.cs
- SamlDelegatingWriter.cs
- DescendantBaseQuery.cs