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
- ModuleConfigurationInfo.cs
- ConnectionManagementElement.cs
- PanningMessageFilter.cs
- UserControl.cs
- DbSetClause.cs
- Blend.cs
- XmlNodeChangedEventArgs.cs
- AllMembershipCondition.cs
- GeometryGroup.cs
- MouseWheelEventArgs.cs
- ProcessModelSection.cs
- TextViewSelectionProcessor.cs
- ImmutableCommunicationTimeouts.cs
- EdmComplexTypeAttribute.cs
- LinkedResourceCollection.cs
- ConsoleKeyInfo.cs
- WorkItem.cs
- GridViewRow.cs
- QilChoice.cs
- SetStoryboardSpeedRatio.cs
- HebrewNumber.cs
- RegexTree.cs
- XmlSchemaFacet.cs
- LineInfo.cs
- NTAccount.cs
- EntityProxyFactory.cs
- EventMappingSettingsCollection.cs
- TabletDevice.cs
- KoreanLunisolarCalendar.cs
- EntityDataSourceDataSelection.cs
- EventBuilder.cs
- CodeExpressionStatement.cs
- TrackingProfile.cs
- PieceDirectory.cs
- ExpressionVisitor.cs
- ListItemCollection.cs
- RequiredFieldValidator.cs
- DateRangeEvent.cs
- WebDescriptionAttribute.cs
- ValidationHelpers.cs
- X500Name.cs
- CheckBox.cs
- Oid.cs
- LogRestartAreaEnumerator.cs
- StrokeDescriptor.cs
- MemberInfoSerializationHolder.cs
- NetworkAddressChange.cs
- Context.cs
- UserControl.cs
- FillBehavior.cs
- MenuItemStyleCollection.cs
- MsmqInputChannel.cs
- HotCommands.cs
- CodeCastExpression.cs
- HwndSource.cs
- DbUpdateCommandTree.cs
- HandlerBase.cs
- CommandID.cs
- __ComObject.cs
- PathFigureCollectionValueSerializer.cs
- HtmlInputImage.cs
- BrowserCapabilitiesFactory.cs
- Point3D.cs
- ConfigWriter.cs
- _DomainName.cs
- ServerValidateEventArgs.cs
- ToolStripPanelRenderEventArgs.cs
- SystemKeyConverter.cs
- ConfigurationManagerInternalFactory.cs
- AsyncDataRequest.cs
- AssemblySettingAttributes.cs
- ConnectionProviderAttribute.cs
- DocumentPageView.cs
- SpeechUI.cs
- RequestCachePolicy.cs
- ByteAnimationUsingKeyFrames.cs
- WebEventCodes.cs
- Helpers.cs
- SqlVersion.cs
- NumericUpDownAcceleration.cs
- MemberPath.cs
- CodeSubDirectoriesCollection.cs
- SqlTriggerContext.cs
- XPathDescendantIterator.cs
- FieldNameLookup.cs
- nulltextcontainer.cs
- BinaryFormatterWriter.cs
- Serializer.cs
- ConnectionProviderAttribute.cs
- SpeakCompletedEventArgs.cs
- ClientConfigurationSystem.cs
- TextContainerChangedEventArgs.cs
- AssemblySettingAttributes.cs
- RootBuilder.cs
- ProfileEventArgs.cs
- DbgCompiler.cs
- HotSpot.cs
- Encoder.cs
- StringUtil.cs
- DataGrid.cs