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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 if (m_style.useSubpixelRendering == FontRenderStyle::NoPreference) | 341 if (m_style.useSubpixelRendering == FontRenderStyle::NoPreference) |
342 m_style.useSubpixelRendering = useSkiaSubpixelRendering; | 342 m_style.useSubpixelRendering = useSkiaSubpixelRendering; |
343 } | 343 } |
344 | 344 |
345 #if ENABLE(OPENTYPE_VERTICAL) | 345 #if ENABLE(OPENTYPE_VERTICAL) |
346 static SkFontTableTag reverseByteOrder(uint32_t tableTag) | 346 static SkFontTableTag reverseByteOrder(uint32_t tableTag) |
347 { | 347 { |
348 return (tableTag >> 24) | ((tableTag >> 8) & 0xff00) | ((tableTag & 0xff00)
<< 8) | ((tableTag & 0xff) << 24); | 348 return (tableTag >> 24) | ((tableTag >> 8) & 0xff00) | ((tableTag & 0xff00)
<< 8) | ((tableTag & 0xff) << 24); |
349 } | 349 } |
350 | 350 |
351 const OpenTypeVerticalData* FontPlatformData::verticalData() const | 351 PassRefPtr<OpenTypeVerticalData> FontPlatformData::verticalData() const |
352 { | 352 { |
353 return fontCache()->getVerticalData(uniqueID(), *this); | 353 return fontCache()->getVerticalData(uniqueID(), *this); |
354 } | 354 } |
355 | 355 |
356 PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const | 356 PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const |
357 { | 357 { |
358 RefPtr<SharedBuffer> buffer; | 358 RefPtr<SharedBuffer> buffer; |
359 | 359 |
360 SkFontTableTag tag = reverseByteOrder(table); | 360 SkFontTableTag tag = reverseByteOrder(table); |
361 const size_t tableSize = SkFontHost::GetTableSize(uniqueID(), tag); | 361 const size_t tableSize = SkFontHost::GetTableSize(uniqueID(), tag); |
362 if (tableSize) { | 362 if (tableSize) { |
363 Vector<char> tableBuffer(tableSize); | 363 Vector<char> tableBuffer(tableSize); |
364 SkFontHost::GetTableData(uniqueID(), tag, 0, tableSize, &tableBuffer[0])
; | 364 SkFontHost::GetTableData(uniqueID(), tag, 0, tableSize, &tableBuffer[0])
; |
365 buffer = SharedBuffer::adoptVector(tableBuffer); | 365 buffer = SharedBuffer::adoptVector(tableBuffer); |
366 } | 366 } |
367 return buffer.release(); | 367 return buffer.release(); |
368 } | 368 } |
369 #endif | 369 #endif |
370 | 370 |
371 } // namespace WebCore | 371 } // namespace WebCore |
OLD | NEW |