OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Holger Hans Peter Freyther | 3 * Copyright (C) 2008 Holger Hans Peter Freyther |
4 * Copyright (C) 2014 Google Inc. All rights reserved. | 4 * Copyright (C) 2014 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class Font; | 36 class Font; |
37 class GlyphBuffer; | 37 class GlyphBuffer; |
38 class SimpleFontData; | 38 class SimpleFontData; |
39 class TextRun; | 39 class TextRun; |
40 struct GlyphData; | 40 struct GlyphData; |
41 | 41 |
42 struct PLATFORM_EXPORT SimpleShaper : public Shaper { | 42 struct PLATFORM_EXPORT SimpleShaper : public Shaper { |
43 // SVGTextMetricsCalculator wants to allocate SimpleShaper by using | |
44 // operator new. | |
45 USING_FAST_MALLOC(SimpleShaper); | |
46 public: | 43 public: |
47 SimpleShaper(const Font*, const TextRun&, const GlyphData* emphasisData = nu
llptr, | 44 SimpleShaper(const Font*, const TextRun&, const GlyphData* emphasisData = nu
llptr, |
48 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* = nu
llptr); | 45 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* = nu
llptr); |
49 | 46 |
50 // TODO(sk.kumar): This function should be updated to take an unsigned value
, and callers | 47 // TODO(sk.kumar): This function should be updated to take an unsigned value
, and callers |
51 // should be updated to not pass negative values. See: crbug.com/540047. | 48 // should be updated to not pass negative values. See: crbug.com/540047. |
52 unsigned advance(int to, GlyphBuffer* = 0); | 49 unsigned advance(int to, GlyphBuffer* = 0); |
53 bool advanceOneCharacter(float& width); | 50 bool advanceOneCharacter(float& width); |
54 | 51 |
55 const TextRun& run() const { return m_textRun; } | 52 const TextRun& run() const { return m_textRun; } |
(...skipping 15 matching lines...) Expand all Loading... |
71 float characterWidth(UChar32, const GlyphData&) const; | 68 float characterWidth(UChar32, const GlyphData&) const; |
72 float adjustSpacing(float, const CharacterData&); | 69 float adjustSpacing(float, const CharacterData&); |
73 | 70 |
74 template <typename TextIterator> | 71 template <typename TextIterator> |
75 unsigned advanceInternal(TextIterator&, GlyphBuffer*); | 72 unsigned advanceInternal(TextIterator&, GlyphBuffer*); |
76 }; | 73 }; |
77 | 74 |
78 } // namespace blink | 75 } // namespace blink |
79 | 76 |
80 #endif | 77 #endif |
OLD | NEW |