OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Computer, Inc. | 2 * Copyright (C) 2007 Apple Computer, Inc. |
3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved. | 3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved. |
4 * Copyright (C) 2010 Company 100, Inc. | 4 * Copyright (C) 2010 Company 100, Inc. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
8 * met: | 8 * met: |
9 * | 9 * |
10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "platform/SharedBuffer.h" | 36 #include "platform/SharedBuffer.h" |
37 #include "platform/fonts/FontCache.h" | 37 #include "platform/fonts/FontCache.h" |
38 #include "platform/fonts/FontPlatformData.h" | 38 #include "platform/fonts/FontPlatformData.h" |
39 #include "platform/fonts/WebFontDecoder.h" | 39 #include "platform/fonts/WebFontDecoder.h" |
40 #include "platform/fonts/opentype/FontSettings.h" | 40 #include "platform/fonts/opentype/FontSettings.h" |
41 #include "third_party/skia/include/core/SkStream.h" | 41 #include "third_party/skia/include/core/SkStream.h" |
42 #include "third_party/skia/include/core/SkTypeface.h" | 42 #include "third_party/skia/include/core/SkTypeface.h" |
43 #if OS(WIN) | 43 #if OS(WIN) |
44 #include "third_party/skia/include/ports/SkFontMgr_empty.h" | 44 #include "third_party/skia/include/ports/SkFontMgr_empty.h" |
45 #endif | 45 #endif |
46 #include "wtf/PtrUtil.h" | 46 #include "platform/wtf/PtrUtil.h" |
47 | 47 |
48 namespace blink { | 48 namespace blink { |
49 | 49 |
50 FontCustomPlatformData::FontCustomPlatformData(sk_sp<SkTypeface> typeface, | 50 FontCustomPlatformData::FontCustomPlatformData(sk_sp<SkTypeface> typeface, |
51 size_t dataSize) | 51 size_t dataSize) |
52 : m_baseTypeface(std::move(typeface)), m_dataSize(dataSize) {} | 52 : m_baseTypeface(std::move(typeface)), m_dataSize(dataSize) {} |
53 | 53 |
54 FontCustomPlatformData::~FontCustomPlatformData() {} | 54 FontCustomPlatformData::~FontCustomPlatformData() {} |
55 | 55 |
56 FontPlatformData FontCustomPlatformData::fontPlatformData( | 56 FontPlatformData FontCustomPlatformData::fontPlatformData( |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 new FontCustomPlatformData(std::move(typeface), decoder.decodedSize())); | 120 new FontCustomPlatformData(std::move(typeface), decoder.decodedSize())); |
121 } | 121 } |
122 | 122 |
123 bool FontCustomPlatformData::supportsFormat(const String& format) { | 123 bool FontCustomPlatformData::supportsFormat(const String& format) { |
124 return equalIgnoringCase(format, "truetype") || | 124 return equalIgnoringCase(format, "truetype") || |
125 equalIgnoringCase(format, "opentype") || | 125 equalIgnoringCase(format, "opentype") || |
126 WebFontDecoder::supportsFormat(format); | 126 WebFontDecoder::supportsFormat(format); |
127 } | 127 } |
128 | 128 |
129 } // namespace blink | 129 } // namespace blink |
OLD | NEW |