| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(); | 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 void addHarfBuzzRun(unsigned startCharacter, unsigned endCharacter, const Si
mpleFontData*, UScriptCode); |
| 130 | 131 |
| 131 GlyphBufferAdvance createGlyphBufferAdvance(float, float); | 132 GlyphBufferAdvance createGlyphBufferAdvance(float, float); |
| 132 | 133 |
| 133 const Font* m_font; | 134 const Font* m_font; |
| 134 OwnPtr<UChar[]> m_normalizedBuffer; | 135 OwnPtr<UChar[]> m_normalizedBuffer; |
| 135 unsigned m_normalizedBufferLength; | 136 unsigned m_normalizedBufferLength; |
| 136 const TextRun& m_run; | 137 const TextRun& m_run; |
| 137 | 138 |
| 138 int m_wordSpacingAdjustment; // Delta adjustment (pixels) for each word brea
k. | 139 int m_wordSpacingAdjustment; // Delta adjustment (pixels) for each word brea
k. |
| 139 float m_padding; // Pixels to be distributed over the line at word breaks. | 140 float m_padding; // Pixels to be distributed over the line at word breaks. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 150 int m_toIndex; | 151 int m_toIndex; |
| 151 | 152 |
| 152 float m_totalWidth; | 153 float m_totalWidth; |
| 153 | 154 |
| 154 friend struct CachedShapingResults; | 155 friend struct CachedShapingResults; |
| 155 }; | 156 }; |
| 156 | 157 |
| 157 } // namespace WebCore | 158 } // namespace WebCore |
| 158 | 159 |
| 159 #endif // HarfBuzzShaper_h | 160 #endif // HarfBuzzShaper_h |
| OLD | NEW |