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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
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) |
| 136 NSFont* getNSFont() const { return m_platformData.font(); } |
| 137 #endif |
| 138 |
135 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; | 139 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; |
136 | 140 |
137 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData;
} | 141 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData;
} |
138 | 142 |
139 // Implemented by the platform. | 143 // Implemented by the platform. |
140 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned
length, UChar* buffer, unsigned bufferLength) const; | 144 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned
length, UChar* buffer, unsigned bufferLength) const; |
141 | 145 |
142 protected: | 146 protected: |
143 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat
a, bool isTextOrientationFallback = false); | 147 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat
a, bool isTextOrientationFallback = false); |
144 | 148 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 width = platformWidthForGlyph(glyph); | 234 width = platformWidthForGlyph(glyph); |
231 | 235 |
232 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 236 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
233 return width; | 237 return width; |
234 } | 238 } |
235 | 239 |
236 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); | 240 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); |
237 | 241 |
238 } // namespace blink | 242 } // namespace blink |
239 #endif // SimpleFontData_h | 243 #endif // SimpleFontData_h |
OLD | NEW |