| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 FontCustomPlatformData::FontCustomPlatformData(PassRefPtr<SkTypeface> typeface) | 46 FontCustomPlatformData::FontCustomPlatformData(PassRefPtr<SkTypeface> typeface) |
| 47 : m_typeface(typeface) { } | 47 : m_typeface(typeface) { } |
| 48 | 48 |
| 49 FontCustomPlatformData::~FontCustomPlatformData() | 49 FontCustomPlatformData::~FontCustomPlatformData() |
| 50 { | 50 { |
| 51 } | 51 } |
| 52 | 52 |
| 53 FontPlatformData FontCustomPlatformData::fontPlatformData(float size, bool bold,
bool italic, FontOrientation orientation) | 53 FontPlatformData FontCustomPlatformData::fontPlatformData(bool bold, bool italic
, FontOrientation orientation) |
| 54 { | 54 { |
| 55 ASSERT(m_typeface); | 55 ASSERT(m_typeface); |
| 56 return FontPlatformData(m_typeface.get(), "", size, bold && !m_typeface->isB
old(), italic && !m_typeface->isItalic(), orientation); | 56 return FontPlatformData(m_typeface.get(), "", bold && !m_typeface->isBold(),
italic && !m_typeface->isItalic(), orientation); |
| 57 } | 57 } |
| 58 | 58 |
| 59 PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer*
buffer, String& otsParseMessage) | 59 PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer*
buffer, String& otsParseMessage) |
| 60 { | 60 { |
| 61 DCHECK(buffer); | 61 DCHECK(buffer); |
| 62 | 62 |
| 63 OpenTypeSanitizer sanitizer(buffer); | 63 OpenTypeSanitizer sanitizer(buffer); |
| 64 RefPtr<SharedBuffer> transcodeBuffer = sanitizer.sanitize(); | 64 RefPtr<SharedBuffer> transcodeBuffer = sanitizer.sanitize(); |
| 65 | 65 |
| 66 if (!transcodeBuffer) { | 66 if (!transcodeBuffer) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 80 | 80 |
| 81 return adoptPtr(new FontCustomPlatformData(typeface.release())); | 81 return adoptPtr(new FontCustomPlatformData(typeface.release())); |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool FontCustomPlatformData::supportsFormat(const String& format) | 84 bool FontCustomPlatformData::supportsFormat(const String& format) |
| 85 { | 85 { |
| 86 return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "o
pentype") || OpenTypeSanitizer::supportsFormat(format); | 86 return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "o
pentype") || OpenTypeSanitizer::supportsFormat(format); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace blink | 89 } // namespace blink |
| OLD | NEW |