Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: Source/core/css/BinaryDataFontFaceSource.cpp

Issue 983973004: Provide user friendly messages for OTS parsing of fonts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase patch Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/css/BinaryDataFontFaceSource.h ('k') | Source/core/css/FontFace.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « Source/core/css/BinaryDataFontFaceSource.h ('k') | Source/core/css/FontFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698