Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: Source/platform/fonts/harfbuzz/HarfBuzzShaper.h

Issue 104813005: Explicitly set text direction for TextRuns (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use BidiResolver in RenderText Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698