| 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 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 querySystemForRenderStyle(); | 172 querySystemForRenderStyle(); |
| 173 #endif | 173 #endif |
| 174 } | 174 } |
| 175 | 175 |
| 176 FontPlatformData::~FontPlatformData() {} | 176 FontPlatformData::~FontPlatformData() {} |
| 177 | 177 |
| 178 #if OS(MACOSX) | 178 #if OS(MACOSX) |
| 179 CTFontRef FontPlatformData::ctFont() const { | 179 CTFontRef FontPlatformData::ctFont() const { |
| 180 return SkTypeface_GetCTFontRef(m_typeface.get()); | 180 return SkTypeface_GetCTFontRef(m_typeface.get()); |
| 181 }; | 181 }; |
| 182 | |
| 183 CGFontRef FontPlatformData::cgFont() const { | |
| 184 return CTFontCopyGraphicsFont(ctFont(), 0); | |
| 185 } | |
| 186 #endif | 182 #endif |
| 187 | 183 |
| 188 const FontPlatformData& FontPlatformData::operator=( | 184 const FontPlatformData& FontPlatformData::operator=( |
| 189 const FontPlatformData& other) { | 185 const FontPlatformData& other) { |
| 190 // Check for self-assignment. | 186 // Check for self-assignment. |
| 191 if (this == &other) | 187 if (this == &other) |
| 192 return *this; | 188 return *this; |
| 193 | 189 |
| 194 m_typeface = other.m_typeface; | 190 m_typeface = other.m_typeface; |
| 195 #if !OS(WIN) | 191 #if !OS(WIN) |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 const size_t tableSize = m_typeface->getTableSize(tag); | 345 const size_t tableSize = m_typeface->getTableSize(tag); |
| 350 if (tableSize) { | 346 if (tableSize) { |
| 351 Vector<char> tableBuffer(tableSize); | 347 Vector<char> tableBuffer(tableSize); |
| 352 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); | 348 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); |
| 353 buffer = SharedBuffer::adoptVector(tableBuffer); | 349 buffer = SharedBuffer::adoptVector(tableBuffer); |
| 354 } | 350 } |
| 355 return buffer.release(); | 351 return buffer.release(); |
| 356 } | 352 } |
| 357 | 353 |
| 358 } // namespace blink | 354 } // namespace blink |
| OLD | NEW |