Changeset 28867 for trunk/WebCore/platform/graphics/FontDescription.h
- Timestamp:
- 12/19/07 11:24:10 (12 months ago)
- Files:
-
- 1 modified
-
trunk/WebCore/platform/graphics/FontDescription.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/platform/graphics/FontDescription.h
r28234 r28867 32 32 const unsigned cBoldWeight = 63; 33 33 34 // This setting is used to provide ways of switching between multiple rendering modes that may have different 35 // metrics. It is used to switch between CG and GDI text on Windows. 36 enum FontRenderingMode { NormalRenderingMode, AlternateRenderingMode }; 37 34 38 class FontDescription { 35 39 public: … … 40 44 : m_specifiedSize(0), m_computedSize(0), 41 45 m_italic(false), m_smallCaps(false), m_isAbsoluteSize(false), m_weight(cNormalWeight), 42 m_genericFamily(NoFamily), m_usePrinterFont(false), m_ keywordSize(0)46 m_genericFamily(NoFamily), m_usePrinterFont(false), m_renderingMode(NormalRenderingMode), m_keywordSize(0) 43 47 {} 44 48 … … 58 62 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyType>(m_genericFamily); } 59 63 bool usePrinterFont() const { return m_usePrinterFont; } 64 FontRenderingMode renderingMode() const { return static_cast<FontRenderingMode>(m_renderingMode); } 60 65 int keywordSize() const { return m_keywordSize; } 61 66 … … 70 75 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = genericFamily; } 71 76 void setUsePrinterFont(bool p) { m_usePrinterFont = p; } 77 void setRenderingMode(FontRenderingMode mode) { m_renderingMode = mode; } 72 78 void setKeywordSize(int s) { m_keywordSize = s; } 73 79 … … 86 92 unsigned m_genericFamily : 3; // GenericFamilyType 87 93 bool m_usePrinterFont : 1; 88 94 95 unsigned m_renderingMode : 1; // Used to switch between CG and GDI text on Windows. 96 89 97 int m_keywordSize : 4; // We cache whether or not a font is currently represented by a CSS keyword (e.g., medium). If so, 90 98 // then we can accurately translate across different generic families to adjust for different preference settings … … 103 111 && m_genericFamily == other.m_genericFamily 104 112 && m_usePrinterFont == other.m_usePrinterFont 113 && m_renderingMode == other.m_renderingMode 105 114 && m_keywordSize == other.m_keywordSize; 106 115 }