| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the internal font implementation. | 2 * This file is part of the internal font implementation. |
| 3 * | 3 * |
| 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 5 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 #if OS(MACOSX) | 159 #if OS(MACOSX) |
| 160 const SimpleFontData* getCompositeFontReferenceFontData(NSFont *key) const; | 160 const SimpleFontData* getCompositeFontReferenceFontData(NSFont *key) const; |
| 161 NSFont* getNSFont() const { return m_platformData.font(); } | 161 NSFont* getNSFont() const { return m_platformData.font(); } |
| 162 #endif | 162 #endif |
| 163 | 163 |
| 164 #if OS(MACOSX) | 164 #if OS(MACOSX) |
| 165 CFDictionaryRef getCFStringAttributes(TypesettingFeatures, FontOrientation)
const; | 165 CFDictionaryRef getCFStringAttributes(TypesettingFeatures, FontOrientation)
const; |
| 166 #endif | 166 #endif |
| 167 | 167 |
| 168 #if OS(MACOSX) || USE(HARFBUZZ) | |
| 169 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; | 168 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; |
| 170 #endif | |
| 171 | 169 |
| 172 bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, Typeset
tingFeatures) const | 170 bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, Typeset
tingFeatures) const |
| 173 { | 171 { |
| 174 return false; | 172 return false; |
| 175 } | 173 } |
| 176 | 174 |
| 177 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData;
} | 175 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData;
} |
| 178 | 176 |
| 179 private: | 177 private: |
| 180 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat
a, bool isTextOrientationFallback = false); | 178 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat
a, bool isTextOrientationFallback = false); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 mutable OwnPtr<DerivedFontData> m_derivedFontData; | 240 mutable OwnPtr<DerivedFontData> m_derivedFontData; |
| 243 | 241 |
| 244 RefPtr<CustomFontData> m_customFontData; | 242 RefPtr<CustomFontData> m_customFontData; |
| 245 | 243 |
| 246 #if OS(MACOSX) | 244 #if OS(MACOSX) |
| 247 float m_syntheticBoldOffset; | 245 float m_syntheticBoldOffset; |
| 248 | 246 |
| 249 mutable HashMap<unsigned, RetainPtr<CFDictionaryRef> > m_CFStringAttributes; | 247 mutable HashMap<unsigned, RetainPtr<CFDictionaryRef> > m_CFStringAttributes; |
| 250 #endif | 248 #endif |
| 251 | 249 |
| 252 #if OS(MACOSX) || USE(HARFBUZZ) | |
| 253 mutable OwnPtr<HashMap<String, bool> > m_combiningCharacterSequenceSupport; | 250 mutable OwnPtr<HashMap<String, bool> > m_combiningCharacterSequenceSupport; |
| 254 #endif | |
| 255 }; | 251 }; |
| 256 | 252 |
| 257 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const | 253 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const |
| 258 { | 254 { |
| 259 if (isZeroWidthSpaceGlyph(glyph)) | 255 if (isZeroWidthSpaceGlyph(glyph)) |
| 260 return FloatRect(); | 256 return FloatRect(); |
| 261 | 257 |
| 262 FloatRect bounds; | 258 FloatRect bounds; |
| 263 if (m_glyphToBoundsMap) { | 259 if (m_glyphToBoundsMap) { |
| 264 bounds = m_glyphToBoundsMap->metricsForGlyph(glyph); | 260 bounds = m_glyphToBoundsMap->metricsForGlyph(glyph); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 294 #endif | 290 #endif |
| 295 else | 291 else |
| 296 width = platformWidthForGlyph(glyph); | 292 width = platformWidthForGlyph(glyph); |
| 297 | 293 |
| 298 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 294 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
| 299 return width; | 295 return width; |
| 300 } | 296 } |
| 301 | 297 |
| 302 } // namespace WebCore | 298 } // namespace WebCore |
| 303 #endif // SimpleFontData_h | 299 #endif // SimpleFontData_h |
| OLD | NEW |