| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 setupPaint(&paint); | 59 setupPaint(&paint); |
| 60 paint.setTextEncoding(SkPaint::kUTF32_TextEncoding); | 60 paint.setTextEncoding(SkPaint::kUTF32_TextEncoding); |
| 61 | 61 |
| 62 uint16_t glyph; | 62 uint16_t glyph; |
| 63 paint.textToGlyphs(&character, sizeof(character), &glyph); | 63 paint.textToGlyphs(&character, sizeof(character), &glyph); |
| 64 return glyph; | 64 return glyph; |
| 65 } | 65 } |
| 66 | 66 |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 #if ENABLE(OPENTYPE_VERTICAL) | |
| 70 PassRefPtr<OpenTypeVerticalData> FontPlatformData::verticalData() const | 69 PassRefPtr<OpenTypeVerticalData> FontPlatformData::verticalData() const |
| 71 { | 70 { |
| 72 return FontCache::fontCache()->getVerticalData(typeface()->uniqueID(), *this
); | 71 return FontCache::fontCache()->getVerticalData(typeface()->uniqueID(), *this
); |
| 73 } | 72 } |
| 74 | 73 |
| 75 PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const | 74 PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const |
| 76 { | 75 { |
| 77 RefPtr<SharedBuffer> buffer; | 76 RefPtr<SharedBuffer> buffer; |
| 78 | 77 |
| 79 SkFontTableTag tag = SkEndianSwap32(table); | 78 SkFontTableTag tag = SkEndianSwap32(table); |
| 80 const size_t tableSize = m_typeface->getTableSize(tag); | 79 const size_t tableSize = m_typeface->getTableSize(tag); |
| 81 if (tableSize) { | 80 if (tableSize) { |
| 82 Vector<char> tableBuffer(tableSize); | 81 Vector<char> tableBuffer(tableSize); |
| 83 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); | 82 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); |
| 84 buffer = SharedBuffer::adoptVector(tableBuffer); | 83 buffer = SharedBuffer::adoptVector(tableBuffer); |
| 85 } | 84 } |
| 86 return buffer.release(); | 85 return buffer.release(); |
| 87 } | 86 } |
| 88 #endif | |
| 89 | 87 |
| 90 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |