OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/testing/FontTestHelpers.h" | 5 #include "platform/testing/FontTestHelpers.h" |
6 | 6 |
7 #include "platform/fonts/Font.h" | 7 #include "platform/fonts/Font.h" |
8 #include "platform/fonts/FontCustomPlatformData.h" | 8 #include "platform/fonts/FontCustomPlatformData.h" |
9 #include "platform/fonts/FontDescription.h" | 9 #include "platform/fonts/FontDescription.h" |
10 #include "platform/fonts/FontSelector.h" | 10 #include "platform/fonts/FontSelector.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 fontDescription.effectiveFontSize(), | 37 fontDescription.effectiveFontSize(), |
38 fontDescription.isSyntheticBold(), | 38 fontDescription.isSyntheticBold(), |
39 fontDescription.isSyntheticItalic(), | 39 fontDescription.isSyntheticItalic(), |
40 fontDescription.orientation()); | 40 fontDescription.orientation()); |
41 return SimpleFontData::create(platformData, CustomFontData::create()); | 41 return SimpleFontData::create(platformData, CustomFontData::create()); |
42 } | 42 } |
43 | 43 |
44 void willUseFontData(const FontDescription&, const AtomicString& familyName, | 44 void willUseFontData(const FontDescription&, const AtomicString& familyName, |
45 UChar32) override { } | 45 UChar32) override { } |
46 void willUseRange(const FontDescription&, const AtomicString& familyName, | 46 void willUseRange(const FontDescription&, const AtomicString& familyName, |
47 const FontDataRange&) override { }; | 47 const FontDataForRangeSet&) override { }; |
48 | 48 |
49 unsigned version() const override { return 0; } | 49 unsigned version() const override { return 0; } |
50 void fontCacheInvalidated() override { } | 50 void fontCacheInvalidated() override { } |
51 | 51 |
52 private: | 52 private: |
53 TestFontSelector(PassOwnPtr<FontCustomPlatformData> customPlatformData) | 53 TestFontSelector(PassOwnPtr<FontCustomPlatformData> customPlatformData) |
54 : m_customPlatformData(customPlatformData) | 54 : m_customPlatformData(customPlatformData) |
55 { | 55 { |
56 } | 56 } |
57 | 57 |
(...skipping 12 matching lines...) Expand all Loading... |
70 fontDescription.setSpecifiedSize(size); | 70 fontDescription.setSpecifiedSize(size); |
71 fontDescription.setComputedSize(size); | 71 fontDescription.setComputedSize(size); |
72 | 72 |
73 Font font(fontDescription); | 73 Font font(fontDescription); |
74 font.update(TestFontSelector::create(fontPath)); | 74 font.update(TestFontSelector::create(fontPath)); |
75 return font; | 75 return font; |
76 } | 76 } |
77 | 77 |
78 } // namespace testing | 78 } // namespace testing |
79 } // namespace blink | 79 } // namespace blink |
OLD | NEW |