| 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 #include "core/css/BinaryDataFontFaceSource.h" | 6 #include "core/css/BinaryDataFontFaceSource.h" |
| 7 | 7 |
| 8 #include "platform/SharedBuffer.h" | 8 #include "platform/SharedBuffer.h" |
| 9 #include "platform/fonts/FontCustomPlatformData.h" | 9 #include "platform/fonts/FontCustomPlatformData.h" |
| 10 #include "platform/fonts/FontDescription.h" | 10 #include "platform/fonts/FontDescription.h" |
| 11 #include "platform/fonts/SimpleFontData.h" | 11 #include "platform/fonts/SimpleFontData.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 BinaryDataFontFaceSource::BinaryDataFontFaceSource(SharedBuffer* data) | 15 BinaryDataFontFaceSource::BinaryDataFontFaceSource(SharedBuffer* data, String& o
tsParseMessage) |
| 16 : m_customPlatformData(FontCustomPlatformData::create(data)) | 16 : m_customPlatformData(FontCustomPlatformData::create(data, otsParseMessage)
) |
| 17 { | 17 { |
| 18 } | 18 } |
| 19 | 19 |
| 20 BinaryDataFontFaceSource::~BinaryDataFontFaceSource() | 20 BinaryDataFontFaceSource::~BinaryDataFontFaceSource() |
| 21 { | 21 { |
| 22 } | 22 } |
| 23 | 23 |
| 24 bool BinaryDataFontFaceSource::isValid() const | 24 bool BinaryDataFontFaceSource::isValid() const |
| 25 { | 25 { |
| 26 return m_customPlatformData; | 26 return m_customPlatformData; |
| 27 } | 27 } |
| 28 | 28 |
| 29 PassRefPtr<SimpleFontData> BinaryDataFontFaceSource::createFontData(const FontDe
scription& fontDescription) | 29 PassRefPtr<SimpleFontData> BinaryDataFontFaceSource::createFontData(const FontDe
scription& fontDescription) |
| 30 { | 30 { |
| 31 return SimpleFontData::create( | 31 return SimpleFontData::create( |
| 32 m_customPlatformData->fontPlatformData(fontDescription.effectiveFontSize
(), | 32 m_customPlatformData->fontPlatformData(fontDescription.effectiveFontSize
(), |
| 33 fontDescription.isSyntheticBold(), fontDescription.isSyntheticItalic
(), | 33 fontDescription.isSyntheticBold(), fontDescription.isSyntheticItalic
(), |
| 34 fontDescription.orientation()), CustomFontData::create()); | 34 fontDescription.orientation()), CustomFontData::create()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 } // namespace blink | 37 } // namespace blink |
| OLD | NEW |