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