| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 return false; | 260 return false; |
| 261 } | 261 } |
| 262 | 262 |
| 263 bool FontPlatformData::hasSpaceInLigaturesOrKerning( | 263 bool FontPlatformData::hasSpaceInLigaturesOrKerning( |
| 264 TypesettingFeatures features) const | 264 TypesettingFeatures features) const |
| 265 { | 265 { |
| 266 HarfBuzzFace* hbFace = harfBuzzFace(); | 266 HarfBuzzFace* hbFace = harfBuzzFace(); |
| 267 if (!hbFace) | 267 if (!hbFace) |
| 268 return false; | 268 return false; |
| 269 | 269 |
| 270 hb_face_t* face = hbFace->face(); | |
| 271 ASSERT(face); | |
| 272 hb_font_t* font = hbFace->getScaledFont(); | 270 hb_font_t* font = hbFace->getScaledFont(); |
| 273 ASSERT(font); | 271 ASSERT(font); |
| 272 hb_face_t* face = hb_font_get_face(font); |
| 273 ASSERT(face); |
| 274 | 274 |
| 275 hb_codepoint_t space; | 275 hb_codepoint_t space; |
| 276 // If the space glyph isn't present in the font then each space character | 276 // If the space glyph isn't present in the font then each space character |
| 277 // will be rendering using a fallback font, which grantees that it cannot | 277 // will be rendering using a fallback font, which grantees that it cannot |
| 278 // affect the shape of the preceding word. | 278 // affect the shape of the preceding word. |
| 279 if (!hb_font_get_glyph(font, spaceCharacter, 0, &space)) | 279 if (!hb_font_get_glyph(font, spaceCharacter, 0, &space)) |
| 280 return false; | 280 return false; |
| 281 | 281 |
| 282 if (!hb_ot_layout_has_substitution(face) | 282 if (!hb_ot_layout_has_substitution(face) |
| 283 && !hb_ot_layout_has_positioning(face)) { | 283 && !hb_ot_layout_has_positioning(face)) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 const size_t tableSize = m_typeface->getTableSize(tag); | 337 const size_t tableSize = m_typeface->getTableSize(tag); |
| 338 if (tableSize) { | 338 if (tableSize) { |
| 339 Vector<char> tableBuffer(tableSize); | 339 Vector<char> tableBuffer(tableSize); |
| 340 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); | 340 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); |
| 341 buffer = SharedBuffer::adoptVector(tableBuffer); | 341 buffer = SharedBuffer::adoptVector(tableBuffer); |
| 342 } | 342 } |
| 343 return buffer.release(); | 343 return buffer.release(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace blink | 346 } // namespace blink |
| OLD | NEW |