Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / MS / Internal / FontCache / CachedTypeface.cs / 1 / CachedTypeface.cs
//---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: CachedTypeface // // History: 6-08-2005 [....], 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IndexerNameAttribute.cs
- basecomparevalidator.cs
- DataMemberConverter.cs
- AuthenticationModulesSection.cs
- FocusWithinProperty.cs
- AutoCompleteStringCollection.cs
- DefaultEventAttribute.cs
- AttributeTable.cs
- ToolStripContentPanel.cs
- DiscriminatorMap.cs
- Header.cs
- XmlNullResolver.cs
- SoundPlayer.cs
- TypeValidationEventArgs.cs
- StickyNote.cs
- ColumnHeaderConverter.cs
- PrintDialog.cs
- RegistrationServices.cs
- LoginCancelEventArgs.cs
- Propagator.Evaluator.cs
- ToggleButton.cs
- RemoteWebConfigurationHostStream.cs
- ErasingStroke.cs
- Schema.cs
- ConfigUtil.cs
- DbConnectionFactory.cs
- BamlMapTable.cs
- CompiledQueryCacheKey.cs
- ContextStack.cs
- TypeListConverter.cs
- GiveFeedbackEvent.cs
- SettingsPropertyIsReadOnlyException.cs
- QuaternionConverter.cs
- SingleAnimationBase.cs
- LicFileLicenseProvider.cs
- AttachInfo.cs
- ToolStripContainer.cs
- XmlObjectSerializerWriteContext.cs
- BindingMAnagerBase.cs
- MessageVersion.cs
- Variant.cs
- EntityParameter.cs
- SchemaCollectionPreprocessor.cs
- SQLGuid.cs
- TreeView.cs
- AuthenticationModuleElement.cs
- ValidationEventArgs.cs
- WindowsHyperlink.cs
- Missing.cs
- TextServicesDisplayAttribute.cs
- HttpRuntimeSection.cs
- WindowVisualStateTracker.cs
- TextTreeUndo.cs
- StreamUpdate.cs
- SoapHeaders.cs
- SchemaImporterExtensionElementCollection.cs
- DataGridViewMethods.cs
- StringHandle.cs
- AutoCompleteStringCollection.cs
- UTF8Encoding.cs
- ObjectListDesigner.cs
- UnaryNode.cs
- FunctionDescription.cs
- TextProperties.cs
- TransformConverter.cs
- HtmlControl.cs
- StylusButtonEventArgs.cs
- ProfilePropertySettingsCollection.cs
- PolyLineSegment.cs
- SynchronizedDisposablePool.cs
- MenuCommand.cs
- RayMeshGeometry3DHitTestResult.cs
- ReturnType.cs
- DataSourceExpression.cs
- ActivityExecutionWorkItem.cs
- KeyGesture.cs
- SystemNetworkInterface.cs
- LineProperties.cs
- DataError.cs
- _NtlmClient.cs
- ResourceAssociationSetEnd.cs
- _StreamFramer.cs
- ADConnectionHelper.cs
- CssTextWriter.cs
- FindRequestContext.cs
- PolicyValidationException.cs
- InteropTrackingRecord.cs
- SecurityTokenRequirement.cs
- SingleAnimation.cs
- BasicExpressionVisitor.cs
- TextChange.cs
- SynthesizerStateChangedEventArgs.cs
- ButtonDesigner.cs
- ValueType.cs
- HelpProvider.cs
- DataGridViewLinkColumn.cs
- DataSourceSelectArguments.cs
- WebHttpSecurityElement.cs
- NativeMethods.cs
- SqlProcedureAttribute.cs