OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include <unicode/uscript.h> | 45 #include <unicode/uscript.h> |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 class Font; | 49 class Font; |
50 class GlyphBuffer; | 50 class GlyphBuffer; |
51 class SimpleFontData; | 51 class SimpleFontData; |
52 | 52 |
53 class HarfBuzzShaper final : public Shaper { | 53 class HarfBuzzShaper final : public Shaper { |
54 public: | 54 public: |
55 HarfBuzzShaper(const Font*, const TextRun&, ForTextEmphasisOrNot = NotForTex
tEmphasis, HashSet<const SimpleFontData*>* fallbackFonts = 0, FloatRect* = 0); | 55 HarfBuzzShaper(const Font*, const TextRun&, const GlyphData* emphasisData =
nullptr, |
| 56 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* = nu
llptr); |
56 | 57 |
57 void setDrawRange(int from, int to); | 58 void setDrawRange(int from, int to); |
58 bool shape(GlyphBuffer* = 0); | 59 bool shape(GlyphBuffer* = 0); |
59 float totalWidth() { return m_totalWidth; } | 60 float totalWidth() { return m_totalWidth; } |
60 int offsetForPosition(float targetX); | 61 int offsetForPosition(float targetX); |
61 FloatRect selectionRect(const FloatPoint&, int height, int from, int to); | 62 FloatRect selectionRect(const FloatPoint&, int height, int from, int to); |
62 | 63 |
63 private: | 64 private: |
64 class HarfBuzzRun { | 65 class HarfBuzzRun { |
65 public: | 66 public: |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 int m_toIndex; | 145 int m_toIndex; |
145 | 146 |
146 float m_totalWidth; | 147 float m_totalWidth; |
147 | 148 |
148 friend struct CachedShapingResults; | 149 friend struct CachedShapingResults; |
149 }; | 150 }; |
150 | 151 |
151 } // namespace blink | 152 } // namespace blink |
152 | 153 |
153 #endif // HarfBuzzShaper_h | 154 #endif // HarfBuzzShaper_h |
OLD | NEW |