| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const SimpleFontData* fontData = m_font.primaryFont(); | 50 const SimpleFontData* fontData = m_font.primaryFont(); |
| 51 if (!fontData->isSVGFont()) { | 51 if (!fontData->isSVGFont()) { |
| 52 m_lastGlyph = 0; | 52 m_lastGlyph = 0; |
| 53 return 0; | 53 return 0; |
| 54 } | 54 } |
| 55 | 55 |
| 56 ASSERT(fontData->isCustomFont()); | 56 ASSERT(fontData->isCustomFont()); |
| 57 ASSERT(fontData->isSVGFont()); | 57 ASSERT(fontData->isSVGFont()); |
| 58 | 58 |
| 59 RefPtr<CustomFontData> customFontData = fontData->customFontData(); | 59 RefPtr<CustomFontData> customFontData = fontData->customFontData(); |
| 60 const SVGFontData* svgFontData = static_cast<const SVGFontData*>(customFontD
ata.get()); | 60 SVGFontFaceElement* svgFontFace = toSVGFontData(customFontData)->svgFontFace
Element(); |
| 61 SVGFontFaceElement* svgFontFace = svgFontData->svgFontFaceElement(); | |
| 62 ASSERT(svgFontFace); | 61 ASSERT(svgFontFace); |
| 63 | 62 |
| 64 SVGFontElement* svgFont = svgFontFace->associatedFontElement(); | 63 SVGFontElement* svgFont = svgFontFace->associatedFontElement(); |
| 65 if (!svgFont) { | 64 if (!svgFont) { |
| 66 m_lastGlyph = 0; | 65 m_lastGlyph = 0; |
| 67 return 0; | 66 return 0; |
| 68 } | 67 } |
| 69 | 68 |
| 70 float kerning = 0; | 69 float kerning = 0; |
| 71 if (m_lastGlyph) { | 70 if (m_lastGlyph) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 98 spacing += m_font.fontDescription().wordSpacing(); | 97 spacing += m_font.fontDescription().wordSpacing(); |
| 99 } | 98 } |
| 100 | 99 |
| 101 if (m_effectiveZoom != 1) | 100 if (m_effectiveZoom != 1) |
| 102 spacing = spacing / m_effectiveZoom; | 101 spacing = spacing / m_effectiveZoom; |
| 103 | 102 |
| 104 return spacing; | 103 return spacing; |
| 105 } | 104 } |
| 106 | 105 |
| 107 } | 106 } |
| OLD | NEW |