Changeset 31338 for trunk/WebCore/svg/SVGFont.cpp
- Timestamp:
- 03/26/08 18:52:55 (2 years ago)
- Files:
-
- 1 modified
-
trunk/WebCore/svg/SVGFont.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/svg/SVGFont.cpp
r31324 r31338 28 28 #include "RenderObject.h" 29 29 #include "SimpleFontData.h" 30 #include "SVGAltGlyphElement.h" 30 31 #include "SVGFontData.h" 31 32 #include "SVGGlyphElement.h" … … 250 251 int endOfScanRange = to + m_walkerData.extraCharsAvailable; 251 252 253 bool haveAltGlyph = false; 254 SVGGlyphIdentifier altGlyphIdentifier; 255 if (RenderObject* renderObject = run.referencingRenderObject()) { 256 if (renderObject->element() && renderObject->element()->hasTagName(SVGNames::altGlyphTag)) { 257 SVGGlyphElement* glyphElement = static_cast<SVGAltGlyphElement*>(renderObject->element())->glyphElement(); 258 if (glyphElement) { 259 haveAltGlyph = true; 260 altGlyphIdentifier = glyphElement->buildGlyphIdentifier(); 261 altGlyphIdentifier.isValid = true; 262 altGlyphIdentifier.nameLength = to - from; 263 } 264 } 265 } 266 252 267 for (int i = from; i < to; ++i) { 253 268 // If characterLookupRange is > 0, then the font defined ligatures (length of unicode property value > 1). … … 257 272 258 273 String lookupString(run.data(run.rtl() ? run.length() - (i + characterLookupRange) : i), characterLookupRange); 259 260 274 Vector<SVGGlyphIdentifier> glyphs; 261 m_fontElement->getGlyphIdentifiersForString(lookupString, glyphs); 275 if (haveAltGlyph) 276 glyphs.append(altGlyphIdentifier); 277 else 278 m_fontElement->getGlyphIdentifiersForString(lookupString, glyphs); 279 262 280 Vector<SVGGlyphIdentifier>::iterator it = glyphs.begin(); 263 281 Vector<SVGGlyphIdentifier>::iterator end = glyphs.end();