| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void setSpaceWidth(float spaceWidth) { m_spaceWidth = spaceWidth; } | 117 void setSpaceWidth(float spaceWidth) { m_spaceWidth = spaceWidth; } |
| 118 | 118 |
| 119 Glyph spaceGlyph() const { return m_spaceGlyph; } | 119 Glyph spaceGlyph() const { return m_spaceGlyph; } |
| 120 void setSpaceGlyph(Glyph spaceGlyph) { m_spaceGlyph = spaceGlyph; } | 120 void setSpaceGlyph(Glyph spaceGlyph) { m_spaceGlyph = spaceGlyph; } |
| 121 Glyph zeroWidthSpaceGlyph() const { return m_zeroWidthSpaceGlyph; } | 121 Glyph zeroWidthSpaceGlyph() const { return m_zeroWidthSpaceGlyph; } |
| 122 void setZeroWidthSpaceGlyph(Glyph spaceGlyph) { m_zeroWidthSpaceGlyph = spac
eGlyph; } | 122 void setZeroWidthSpaceGlyph(Glyph spaceGlyph) { m_zeroWidthSpaceGlyph = spac
eGlyph; } |
| 123 bool isZeroWidthSpaceGlyph(Glyph glyph) const { return glyph == m_zeroWidthS
paceGlyph && glyph; } | 123 bool isZeroWidthSpaceGlyph(Glyph glyph) const { return glyph == m_zeroWidthS
paceGlyph && glyph; } |
| 124 Glyph zeroGlyph() const { return m_zeroGlyph; } | 124 Glyph zeroGlyph() const { return m_zeroGlyph; } |
| 125 void setZeroGlyph(Glyph zeroGlyph) { m_zeroGlyph = zeroGlyph; } | 125 void setZeroGlyph(Glyph zeroGlyph) { m_zeroGlyph = zeroGlyph; } |
| 126 | 126 |
| 127 virtual const SimpleFontData* fontDataForCharacter(UChar32) const OVERRIDE; | 127 virtual const SimpleFontData* fontDataForCharacter(UChar32) const override; |
| 128 | 128 |
| 129 Glyph glyphForCharacter(UChar32) const; | 129 Glyph glyphForCharacter(UChar32) const; |
| 130 | 130 |
| 131 void determinePitch(); | 131 void determinePitch(); |
| 132 Pitch pitch() const { return m_treatAsFixedPitch ? FixedPitch : VariablePitc
h; } | 132 Pitch pitch() const { return m_treatAsFixedPitch ? FixedPitch : VariablePitc
h; } |
| 133 | 133 |
| 134 bool isSVGFont() const { return m_customFontData && m_customFontData->isSVGF
ont(); } | 134 bool isSVGFont() const { return m_customFontData && m_customFontData->isSVGF
ont(); } |
| 135 virtual bool isCustomFont() const OVERRIDE { return m_customFontData; } | 135 virtual bool isCustomFont() const override { return m_customFontData; } |
| 136 virtual bool isLoading() const OVERRIDE { return m_customFontData ? m_custom
FontData->isLoading() : false; } | 136 virtual bool isLoading() const override { return m_customFontData ? m_custom
FontData->isLoading() : false; } |
| 137 virtual bool isLoadingFallback() const OVERRIDE { return m_customFontData ?
m_customFontData->isLoadingFallback() : false; } | 137 virtual bool isLoadingFallback() const override { return m_customFontData ?
m_customFontData->isLoadingFallback() : false; } |
| 138 virtual bool isSegmented() const OVERRIDE; | 138 virtual bool isSegmented() const override; |
| 139 virtual bool shouldSkipDrawing() const OVERRIDE { return m_customFontData &&
m_customFontData->shouldSkipDrawing(); } | 139 virtual bool shouldSkipDrawing() const override { return m_customFontData &&
m_customFontData->shouldSkipDrawing(); } |
| 140 | 140 |
| 141 const GlyphData& missingGlyphData() const { return m_missingGlyphData; } | 141 const GlyphData& missingGlyphData() const { return m_missingGlyphData; } |
| 142 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData =
glyphData; } | 142 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData =
glyphData; } |
| 143 | 143 |
| 144 #if OS(MACOSX) | 144 #if OS(MACOSX) |
| 145 NSFont* getNSFont() const { return m_platformData.font(); } | 145 NSFont* getNSFont() const { return m_platformData.font(); } |
| 146 #endif | 146 #endif |
| 147 | 147 |
| 148 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; | 148 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; |
| 149 | 149 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 width = platformWidthForGlyph(glyph); | 252 width = platformWidthForGlyph(glyph); |
| 253 | 253 |
| 254 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 254 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
| 255 return width; | 255 return width; |
| 256 } | 256 } |
| 257 | 257 |
| 258 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); | 258 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); |
| 259 | 259 |
| 260 } // namespace blink | 260 } // namespace blink |
| 261 #endif // SimpleFontData_h | 261 #endif // SimpleFontData_h |
| OLD | NEW |