| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "config.h" | |
| 6 | |
| 7 #if ENABLE(SVG_FONTS) | |
| 8 #include "core/svg/SVGFontFaceSource.h" | |
| 9 | |
| 10 #include "core/svg/SVGFontData.h" | |
| 11 #include "core/svg/SVGFontFaceElement.h" | |
| 12 #include "platform/fonts/FontDescription.h" | |
| 13 #include "platform/fonts/SimpleFontData.h" | |
| 14 | |
| 15 namespace blink { | |
| 16 | |
| 17 SVGFontFaceSource::SVGFontFaceSource(SVGFontFaceElement* element) | |
| 18 : m_svgFontFaceElement(element) | |
| 19 { | |
| 20 } | |
| 21 | |
| 22 PassRefPtr<SimpleFontData> SVGFontFaceSource::createFontData(const FontDescripti
on& fontDescription) | |
| 23 { | |
| 24 return SimpleFontData::create( | |
| 25 SVGFontData::create(m_svgFontFaceElement.get()), | |
| 26 fontDescription.effectiveFontSize(), | |
| 27 fontDescription.isSyntheticBold(), | |
| 28 fontDescription.isSyntheticItalic()); | |
| 29 } | |
| 30 | |
| 31 void SVGFontFaceSource::trace(Visitor* visitor) | |
| 32 { | |
| 33 visitor->trace(m_svgFontFaceElement); | |
| 34 CSSFontFaceSource::trace(visitor); | |
| 35 } | |
| 36 | |
| 37 } // namespace blink | |
| 38 | |
| 39 #endif // ENABLE(SVG_FONTS) | |
| OLD | NEW |