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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // setPadding sets a number of pixels to be distributed across the TextRun. | 116 // setPadding sets a number of pixels to be distributed across the TextRun. |
117 // WebKit uses this to justify text. | 117 // WebKit uses this to justify text. |
118 void setPadding(int); | 118 void setPadding(int); |
119 | 119 |
120 // In complex text word-spacing affects each line-break, space (U+0020) and
non-breaking space (U+00A0). | 120 // In complex text word-spacing affects each line-break, space (U+0020) and
non-breaking space (U+00A0). |
121 static bool isCodepointSpace(UChar c) { return c == ' ' || c == noBreakSpace
|| c == '\n'; } | 121 static bool isCodepointSpace(UChar c) { return c == ' ' || c == noBreakSpace
|| c == '\n'; } |
122 | 122 |
123 void setFontFeatures(); | 123 void setFontFeatures(); |
124 | 124 |
125 bool collectHarfBuzzRuns(); | 125 bool collectHarfBuzzRuns(); |
126 bool shapeHarfBuzzRuns(bool shouldSetDirection); | 126 bool shapeHarfBuzzRuns(); |
127 bool fillGlyphBuffer(GlyphBuffer*); | 127 bool fillGlyphBuffer(GlyphBuffer*); |
128 void fillGlyphBufferFromHarfBuzzRun(GlyphBuffer*, HarfBuzzRun*, FloatPoint&
firstOffsetOfNextRun); | 128 void fillGlyphBufferFromHarfBuzzRun(GlyphBuffer*, HarfBuzzRun*, FloatPoint&
firstOffsetOfNextRun); |
129 void setGlyphPositionsForHarfBuzzRun(HarfBuzzRun*, hb_buffer_t*); | 129 void setGlyphPositionsForHarfBuzzRun(HarfBuzzRun*, hb_buffer_t*); |
130 | 130 |
131 GlyphBufferAdvance createGlyphBufferAdvance(float, float); | 131 GlyphBufferAdvance createGlyphBufferAdvance(float, float); |
132 | 132 |
133 const Font* m_font; | 133 const Font* m_font; |
134 OwnPtr<UChar[]> m_normalizedBuffer; | 134 OwnPtr<UChar[]> m_normalizedBuffer; |
135 unsigned m_normalizedBufferLength; | 135 unsigned m_normalizedBufferLength; |
136 const TextRun& m_run; | 136 const TextRun& m_run; |
(...skipping 13 matching lines...) Expand all Loading... |
150 int m_toIndex; | 150 int m_toIndex; |
151 | 151 |
152 float m_totalWidth; | 152 float m_totalWidth; |
153 | 153 |
154 friend struct CachedShapingResults; | 154 friend struct CachedShapingResults; |
155 }; | 155 }; |
156 | 156 |
157 } // namespace WebCore | 157 } // namespace WebCore |
158 | 158 |
159 #endif // HarfBuzzShaper_h | 159 #endif // HarfBuzzShaper_h |
OLD | NEW |