OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Brent Fulgham | 2 * Copyright (C) 2011 Brent Fulgham |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 * | 18 * |
19 */ | 19 */ |
20 | 20 |
21 #include "platform/fonts/FontPlatformData.h" | 21 #include "platform/fonts/FontPlatformData.h" |
22 | 22 |
23 #include "SkTypeface.h" | 23 #include "SkTypeface.h" |
24 #include "hb-ot.h" | 24 #include "hb-ot.h" |
25 #include "hb.h" | 25 #include "hb.h" |
26 #include "platform/fonts/FontCache.h" | 26 #include "platform/fonts/FontCache.h" |
27 #include "platform/fonts/shaping/HarfBuzzFace.h" | 27 #include "platform/fonts/shaping/HarfBuzzFace.h" |
28 #include "platform/text/Character.h" | 28 #include "platform/text/Character.h" |
29 #include "wtf/ByteSwap.h" | 29 #include "platform/wtf/ByteSwap.h" |
30 #include "wtf/HashMap.h" | 30 #include "platform/wtf/HashMap.h" |
31 #include "wtf/text/StringHash.h" | 31 #include "platform/wtf/text/StringHash.h" |
32 #include "wtf/text/WTFString.h" | 32 #include "platform/wtf/text/WTFString.h" |
33 | 33 |
34 #if OS(MACOSX) | 34 #if OS(MACOSX) |
35 #include "third_party/skia/include/ports/SkTypeface_mac.h" | 35 #include "third_party/skia/include/ports/SkTypeface_mac.h" |
36 #endif | 36 #endif |
37 | 37 |
38 using namespace std; | 38 using namespace std; |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType) | 42 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType) |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 const size_t tableSize = m_typeface->getTableSize(tag); | 335 const size_t tableSize = m_typeface->getTableSize(tag); |
336 if (tableSize) { | 336 if (tableSize) { |
337 Vector<char> tableBuffer(tableSize); | 337 Vector<char> tableBuffer(tableSize); |
338 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); | 338 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); |
339 buffer = SharedBuffer::adoptVector(tableBuffer); | 339 buffer = SharedBuffer::adoptVector(tableBuffer); |
340 } | 340 } |
341 return buffer.release(); | 341 return buffer.release(); |
342 } | 342 } |
343 | 343 |
344 } // namespace blink | 344 } // namespace blink |
OLD | NEW |