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

Side by Side Diff: Source/platform/fonts/GlyphPageTreeNode.cpp

Issue 599753003: Add limited support for new unicode 6.3 control characters (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/wtf/unicode/CharacterNames.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 for (i = 0; i < 0x20; ++i) 166 for (i = 0; i < 0x20; ++i)
167 buffer[i] = zeroWidthSpace; 167 buffer[i] = zeroWidthSpace;
168 for (i = 0x7F; i < 0xA0; i++) 168 for (i = 0x7F; i < 0xA0; i++)
169 buffer[i] = zeroWidthSpace; 169 buffer[i] = zeroWidthSpace;
170 buffer[softHyphen] = zeroWidthSpace; 170 buffer[softHyphen] = zeroWidthSpace;
171 171
172 // \n, \t, and nonbreaking space must render as a space. 172 // \n, \t, and nonbreaking space must render as a space.
173 buffer[newlineCharacter] = space; 173 buffer[newlineCharacter] = space;
174 buffer[characterTabulation] = space; 174 buffer[characterTabulation] = space;
175 buffer[noBreakSpace] = space; 175 buffer[noBreakSpace] = space;
176 } else if (start == (arabicLetterMark & ~(GlyphPage::size - 1))) {
177 buffer[arabicLetterMark - start] = zeroWidthSpace;
176 } else if (start == (leftToRightMark & ~(GlyphPage::size - 1))) { 178 } else if (start == (leftToRightMark & ~(GlyphPage::size - 1))) {
177 // LRM, RLM, LRE, RLE, ZWNJ, ZWJ, and PDF must not render at all. 179 // LRM, RLM, LRE, RLE, ZWNJ, ZWJ, and PDF must not render at all.
178 buffer[leftToRightMark - start] = zeroWidthSpace; 180 buffer[leftToRightMark - start] = zeroWidthSpace;
179 buffer[rightToLeftMark - start] = zeroWidthSpace; 181 buffer[rightToLeftMark - start] = zeroWidthSpace;
180 buffer[leftToRightEmbed - start] = zeroWidthSpace; 182 buffer[leftToRightEmbed - start] = zeroWidthSpace;
181 buffer[rightToLeftEmbed - start] = zeroWidthSpace; 183 buffer[rightToLeftEmbed - start] = zeroWidthSpace;
182 buffer[leftToRightOverride - start] = zeroWidthSpace; 184 buffer[leftToRightOverride - start] = zeroWidthSpace;
183 buffer[rightToLeftOverride - start] = zeroWidthSpace; 185 buffer[rightToLeftOverride - start] = zeroWidthSpace;
184 buffer[zeroWidthNonJoiner - start] = zeroWidthSpace; 186 buffer[zeroWidthNonJoiner - start] = zeroWidthSpace;
185 buffer[zeroWidthJoiner - start] = zeroWidthSpace; 187 buffer[zeroWidthJoiner - start] = zeroWidthSpace;
186 buffer[popDirectionalFormatting - start] = zeroWidthSpace; 188 buffer[popDirectionalFormatting - start] = zeroWidthSpace;
189 buffer[activateArabicFormShaping - start] = zeroWidthSpace;
190 buffer[activateSymmetricSwapping - start] = zeroWidthSpace;
191 buffer[firstStrongIsolate - start] = zeroWidthSpace;
192 buffer[inhibitArabicFormShaping - start] = zeroWidthSpace;
193 buffer[inhibitSymmetricSwapping - start] = zeroWidthSpace;
194 buffer[leftToRightIsolate - start] = zeroWidthSpace;
195 buffer[nationalDigitShapes - start] = zeroWidthSpace;
196 buffer[nominalDigitShapes - start] = zeroWidthSpace;
197 buffer[popDirectionalIsolate - start] = zeroWidthSpace;
198 buffer[rightToLeftIsolate - start] = zeroWidthSpace;
187 } else if (start == (objectReplacementCharacter & ~(GlyphPage::s ize - 1))) { 199 } else if (start == (objectReplacementCharacter & ~(GlyphPage::s ize - 1))) {
188 // Object replacement character must not render at all. 200 // Object replacement character must not render at all.
189 buffer[objectReplacementCharacter - start] = zeroWidthSpace; 201 buffer[objectReplacementCharacter - start] = zeroWidthSpace;
190 } else if (start == (zeroWidthNoBreakSpace & ~(GlyphPage::size - 1))) { 202 } else if (start == (zeroWidthNoBreakSpace & ~(GlyphPage::size - 1))) {
191 // ZWNBS/BOM must not render at all. 203 // ZWNBS/BOM must not render at all.
192 buffer[zeroWidthNoBreakSpace - start] = zeroWidthSpace; 204 buffer[zeroWidthNoBreakSpace - start] = zeroWidthSpace;
193 } 205 }
194 } else { 206 } else {
195 bufferLength = GlyphPage::size * 2; 207 bufferLength = GlyphPage::size * 2;
196 for (i = 0; i < GlyphPage::size; i++) { 208 for (i = 0; i < GlyphPage::size; i++) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if (level > fontData->maxGlyphPageTreeLevel()) 390 if (level > fontData->maxGlyphPageTreeLevel())
379 return; 391 return;
380 392
381 GlyphPageTreeNodeMap::iterator end = m_children.end(); 393 GlyphPageTreeNodeMap::iterator end = m_children.end();
382 for (GlyphPageTreeNodeMap::iterator it = m_children.begin(); it != end; ++it ) 394 for (GlyphPageTreeNodeMap::iterator it = m_children.begin(); it != end; ++it )
383 it->value->pruneFontData(fontData, level); 395 it->value->pruneFontData(fontData, level);
384 } 396 }
385 397
386 } // namespace blink 398 } // namespace blink
387 399
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/unicode/CharacterNames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698