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

Unified Diff: Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 1119663002: Making Unicode character names consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase patch Created 5 years, 7 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
« no previous file with comments | « Source/platform/fonts/UTF16TextIterator.h ('k') | Source/platform/fonts/shaping/SimpleShaper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/shaping/HarfBuzzShaper.cpp
diff --git a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
index abb0838164068ff53ead9ff151aa330aefd13cf7..8115d36eb2faa0b84ab373fa9885a0c9f76eb034 100644
--- a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
+++ b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -365,11 +365,11 @@ static void normalizeCharacters(const TextRun& run, unsigned length, UChar* dest
U16_NEXT(source, position, length, character);
// Don't normalize tabs as they are not treated as spaces for word-end.
if (run.normalizeSpace() && Character::isNormalizedCanvasSpaceCharacter(character))
- character = space;
- else if (Character::treatAsSpace(character) && character != characterTabulation)
- character = space;
+ character = spaceCharacter;
+ else if (Character::treatAsSpace(character) && character != tabulationCharacter)
+ character = spaceCharacter;
else if (Character::treatAsZeroWidthSpaceInComplexScript(character))
- character = zeroWidthSpace;
+ character = zeroWidthSpaceCharacter;
U16_APPEND(destination, *destinationLength, length, character, error);
ASSERT_UNUSED(error, !error);
@@ -594,7 +594,7 @@ static inline bool collectCandidateRuns(const UChar* normalizedBuffer,
nextScript = uscript_getScript(character, &errorCode);
if (U_FAILURE(errorCode))
return false;
- if (lastCharacter == zeroWidthJoiner)
+ if (lastCharacter == zeroWidthJoinerCharacter)
currentFontData = nextFontData;
if ((nextFontData != currentFontData) || ((currentScript != nextScript) && (nextScript != USCRIPT_INHERITED) && (!uscript_hasScript(character, currentScript))))
break;
@@ -854,7 +854,7 @@ bool HarfBuzzShaper::shapeHarfBuzzRuns()
// Add a space as pre-context to the buffer. This prevents showing dotted-circle
// for combining marks at the beginning of runs.
- static const uint16_t preContext = space;
+ static const uint16_t preContext = spaceCharacter;
hb_buffer_add_utf16(harfBuzzBuffer.get(), &preContext, 1, 1, 0);
addToHarfBuzzBufferInternal(harfBuzzBuffer.get(),
« no previous file with comments | « Source/platform/fonts/UTF16TextIterator.h ('k') | Source/platform/fonts/shaping/SimpleShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698