OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. |
6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. | 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 if (cacheEntry && (!fallbackFonts || fallbackFonts->isEmpty())) { | 252 if (cacheEntry && (!fallbackFonts || fallbackFonts->isEmpty())) { |
253 cacheEntry->glyphBounds = glyphBounds; | 253 cacheEntry->glyphBounds = glyphBounds; |
254 cacheEntry->width = result; | 254 cacheEntry->width = result; |
255 } | 255 } |
256 | 256 |
257 if (glyphOverflow) | 257 if (glyphOverflow) |
258 updateGlyphOverflowFromBounds(glyphBounds, fontMetrics(), glyphOverflow)
; | 258 updateGlyphOverflowFromBounds(glyphBounds, fontMetrics(), glyphOverflow)
; |
259 return result; | 259 return result; |
260 } | 260 } |
261 | 261 |
262 float Font::width(const TextRun& run, int& charsConsumed, Glyph& glyphId) const | |
263 { | |
264 charsConsumed = run.length(); | |
265 glyphId = 0; | |
266 return width(run); | |
267 } | |
268 | |
269 namespace { | 262 namespace { |
270 | 263 |
271 template <bool hasOffsets> | 264 template <bool hasOffsets> |
272 bool buildTextBlobInternal(const GlyphBuffer& glyphBuffer, SkScalar initialAdvan
ce, | 265 bool buildTextBlobInternal(const GlyphBuffer& glyphBuffer, SkScalar initialAdvan
ce, |
273 const SkRect* bounds, bool couldUseLCD, SkTextBlobBuilder& builder) | 266 const SkRect* bounds, bool couldUseLCD, SkTextBlobBuilder& builder) |
274 { | 267 { |
275 SkScalar x = initialAdvance; | 268 SkScalar x = initialAdvance; |
276 unsigned i = 0; | 269 unsigned i = 0; |
277 while (i < glyphBuffer.size()) { | 270 while (i < glyphBuffer.size()) { |
278 const SimpleFontData* fontData = glyphBuffer.fontDataAt(i); | 271 const SimpleFontData* fontData = glyphBuffer.fontDataAt(i); |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 if (delta <= 0) | 1096 if (delta <= 0) |
1104 break; | 1097 break; |
1105 } | 1098 } |
1106 } | 1099 } |
1107 } | 1100 } |
1108 | 1101 |
1109 return offset; | 1102 return offset; |
1110 } | 1103 } |
1111 | 1104 |
1112 } // namespace blink | 1105 } // namespace blink |
OLD | NEW |