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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 virtual bool isCustomFont() const override { return m_customFontData; } | 126 virtual bool isCustomFont() const override { return m_customFontData; } |
127 virtual bool isLoading() const override { return m_customFontData ? m_custom
FontData->isLoading() : false; } | 127 virtual bool isLoading() const override { return m_customFontData ? m_custom
FontData->isLoading() : false; } |
128 virtual bool isLoadingFallback() const override { return m_customFontData ?
m_customFontData->isLoadingFallback() : false; } | 128 virtual bool isLoadingFallback() const override { return m_customFontData ?
m_customFontData->isLoadingFallback() : false; } |
129 virtual bool isSegmented() const override; | 129 virtual bool isSegmented() const override; |
130 virtual bool shouldSkipDrawing() const override { return m_customFontData &&
m_customFontData->shouldSkipDrawing(); } | 130 virtual bool shouldSkipDrawing() const override { return m_customFontData &&
m_customFontData->shouldSkipDrawing(); } |
131 | 131 |
132 const GlyphData& missingGlyphData() const { return m_missingGlyphData; } | 132 const GlyphData& missingGlyphData() const { return m_missingGlyphData; } |
133 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData =
glyphData; } | 133 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData =
glyphData; } |
134 | 134 |
135 #if OS(MACOSX) | 135 #if OS(MACOSX) |
136 NSFont* getNSFont() const { return m_platformData.font(); } | 136 // TODO(dro): Where is this really used other than WebSubStringUtil.mm |
| 137 const NSFont* getNSFont() const { return reinterpret_cast<const NSFont*>(m_p
latformData.ctFont()); } |
137 #endif | 138 #endif |
138 | 139 |
139 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; | 140 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; |
140 | 141 |
141 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData;
} | 142 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData;
} |
142 | 143 |
143 // Implemented by the platform. | 144 // Implemented by the platform. |
144 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned
length, UChar* buffer, unsigned bufferLength) const; | 145 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned
length, UChar* buffer, unsigned bufferLength) const; |
145 | 146 |
146 protected: | 147 protected: |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 width = platformWidthForGlyph(glyph); | 235 width = platformWidthForGlyph(glyph); |
235 | 236 |
236 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 237 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
237 return width; | 238 return width; |
238 } | 239 } |
239 | 240 |
240 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); | 241 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); |
241 | 242 |
242 } // namespace blink | 243 } // namespace blink |
243 #endif // SimpleFontData_h | 244 #endif // SimpleFontData_h |
OLD | NEW |