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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp

Issue 2386333002: reflow comments in platform/fonts (Closed)
Patch Set: comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
index 8dbdcdb2e8efc182edd3af28ceee60cfb2ed7ed0..82b6917ae754808671abf75175140911282aea72 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
@@ -124,11 +124,11 @@ float ShapeResultBuffer::fillGlyphBufferForTextEmphasisRun(
TextDirection direction = textRun.direction();
// A "cluster" in this context means a cluster as it is used by HarfBuzz:
- // The minimal group of characters and corresponding glyphs, that cannot be broken
- // down further from a text shaping point of view.
- // A cluster can contain multiple glyphs and grapheme clusters, with mutually
- // overlapping boundaries. Below we count grapheme clusters per HarfBuzz clusters,
- // then linearly split the sum of corresponding glyph advances by the number of
+ // The minimal group of characters and corresponding glyphs, that cannot be
+ // broken down further from a text shaping point of view. A cluster can
+ // contain multiple glyphs and grapheme clusters, with mutually overlapping
+ // boundaries. Below we count grapheme clusters per HarfBuzz clusters, then
+ // linearly split the sum of corresponding glyph advances by the number of
// grapheme clusters in order to find positions for emphasis mark drawing.
uint16_t clusterStart = static_cast<uint16_t>(
direction == RTL ? run->m_startIndex + run->m_numCharacters + runOffset
@@ -178,7 +178,8 @@ float ShapeResultBuffer::fillGlyphBufferForTextEmphasisRun(
float glyphAdvanceX = clusterAdvance / graphemesInCluster;
for (unsigned j = 0; j < graphemesInCluster; ++j) {
- // Do not put emphasis marks on space, separator, and control characters.
+ // Do not put emphasis marks on space, separator, and control
+ // characters.
if (Character::canReceiveTextEmphasis(textRun[currentCharacterIndex]))
addEmphasisMark(glyphBuffer, emphasisData, glyphCenter,
advanceSoFar + glyphAdvanceX / 2);

Powered by Google App Engine
This is Rietveld 408576698