| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Holger Hans Peter Freyther | 3 * Copyright (C) 2008 Holger Hans Peter Freyther |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 GlyphData WidthIterator::glyphDataForCharacter(UChar32 character, bool mirror, i
nt currentCharacter, unsigned& advanceLength) | 71 GlyphData WidthIterator::glyphDataForCharacter(UChar32 character, bool mirror, i
nt currentCharacter, unsigned& advanceLength) |
| 72 { | 72 { |
| 73 ASSERT(m_font); | 73 ASSERT(m_font); |
| 74 | 74 |
| 75 #if ENABLE(SVG_FONTS) | 75 #if ENABLE(SVG_FONTS) |
| 76 if (TextRun::RenderingContext* renderingContext = m_run.renderingContext()) | 76 if (TextRun::RenderingContext* renderingContext = m_run.renderingContext()) |
| 77 return renderingContext->glyphDataForCharacter(*m_font, m_run, *this, ch
aracter, mirror, currentCharacter, advanceLength); | 77 return renderingContext->glyphDataForCharacter(*m_font, m_run, *this, ch
aracter, mirror, currentCharacter, advanceLength); |
| 78 #else | |
| 79 UNUSED_PARAM(currentCharacter); | |
| 80 UNUSED_PARAM(advanceLength); | |
| 81 #endif | 78 #endif |
| 82 | 79 |
| 83 return m_font->glyphDataForCharacter(character, mirror); | 80 return m_font->glyphDataForCharacter(character, mirror); |
| 84 } | 81 } |
| 85 | 82 |
| 86 struct OriginalAdvancesForCharacterTreatedAsSpace { | 83 struct OriginalAdvancesForCharacterTreatedAsSpace { |
| 87 public: | 84 public: |
| 88 OriginalAdvancesForCharacterTreatedAsSpace(bool isSpace, float advanceBefore
, float advanceAt) | 85 OriginalAdvancesForCharacterTreatedAsSpace(bool isSpace, float advanceBefore
, float advanceAt) |
| 89 : characterIsSpace(isSpace) | 86 : characterIsSpace(isSpace) |
| 90 , advanceBeforeCharacter(advanceBefore) | 87 , advanceBeforeCharacter(advanceBefore) |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 unsigned oldSize = glyphBuffer.size(); | 334 unsigned oldSize = glyphBuffer.size(); |
| 338 advance(m_currentCharacter + 1, &glyphBuffer); | 335 advance(m_currentCharacter + 1, &glyphBuffer); |
| 339 float w = 0; | 336 float w = 0; |
| 340 for (unsigned i = oldSize; i < glyphBuffer.size(); ++i) | 337 for (unsigned i = oldSize; i < glyphBuffer.size(); ++i) |
| 341 w += glyphBuffer.advanceAt(i); | 338 w += glyphBuffer.advanceAt(i); |
| 342 width = w; | 339 width = w; |
| 343 return glyphBuffer.size() > oldSize; | 340 return glyphBuffer.size() > oldSize; |
| 344 } | 341 } |
| 345 | 342 |
| 346 } | 343 } |
| OLD | NEW |