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 27 matching lines...) Expand all Loading... |
38 #include "platform/fonts/FontCache.h" | 38 #include "platform/fonts/FontCache.h" |
39 #include "platform/fonts/FontPlatformData.h" | 39 #include "platform/fonts/FontPlatformData.h" |
40 #include "platform/fonts/opentype/OpenTypeSanitizer.h" | 40 #include "platform/fonts/opentype/OpenTypeSanitizer.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 #include "wtf/PassOwnPtr.h" | 43 #include "wtf/PassOwnPtr.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 FontCustomPlatformData::FontCustomPlatformData(PassRefPtr<SkTypeface> typeface) | 47 FontCustomPlatformData::FontCustomPlatformData(PassRefPtr<SkTypeface> typeface) |
48 : m_typeface(typeface) | 48 : m_typeface(typeface) { }; |
49 { | |
50 } | |
51 | 49 |
52 FontCustomPlatformData::~FontCustomPlatformData() | 50 FontCustomPlatformData::~FontCustomPlatformData() |
53 { | 51 { |
54 } | 52 } |
55 | 53 |
56 FontPlatformData FontCustomPlatformData::fontPlatformData(float size, bool bold,
bool italic, FontOrientation orientation) | 54 FontPlatformData FontCustomPlatformData::fontPlatformData(float size, bool bold,
bool italic, FontOrientation orientation) |
57 { | 55 { |
58 ASSERT(m_typeface); | 56 ASSERT(m_typeface); |
59 #if OS(WIN) | 57 #if OS(WIN) |
60 if (!FontCache::useDirectWrite()) { | 58 if (!FontCache::useDirectWrite()) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 106 |
109 return adoptPtr(new FontCustomPlatformData(typeface.release())); | 107 return adoptPtr(new FontCustomPlatformData(typeface.release())); |
110 } | 108 } |
111 | 109 |
112 bool FontCustomPlatformData::supportsFormat(const String& format) | 110 bool FontCustomPlatformData::supportsFormat(const String& format) |
113 { | 111 { |
114 return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "o
pentype") || OpenTypeSanitizer::supportsFormat(format); | 112 return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "o
pentype") || OpenTypeSanitizer::supportsFormat(format); |
115 } | 113 } |
116 | 114 |
117 } // namespace blink | 115 } // namespace blink |
OLD | NEW |