OLD | NEW |
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 if (start == 0) { | 164 if (start == 0) { |
165 // Control characters must not render at all. | 165 // Control characters must not render at all. |
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[(int)'\n'] = ' '; | 173 buffer[newlineCharacter] = space; |
174 buffer[(int)'\t'] = ' '; | 174 buffer[characterTabulation] = space; |
175 buffer[noBreakSpace] = ' '; | 175 buffer[noBreakSpace] = space; |
176 } else if (start == (leftToRightMark & ~(GlyphPage::size - 1)))
{ | 176 } else if (start == (leftToRightMark & ~(GlyphPage::size - 1)))
{ |
177 // LRM, RLM, LRE, RLE, ZWNJ, ZWJ, and PDF must not render at
all. | 177 // LRM, RLM, LRE, RLE, ZWNJ, ZWJ, and PDF must not render at
all. |
178 buffer[leftToRightMark - start] = zeroWidthSpace; | 178 buffer[leftToRightMark - start] = zeroWidthSpace; |
179 buffer[rightToLeftMark - start] = zeroWidthSpace; | 179 buffer[rightToLeftMark - start] = zeroWidthSpace; |
180 buffer[leftToRightEmbed - start] = zeroWidthSpace; | 180 buffer[leftToRightEmbed - start] = zeroWidthSpace; |
181 buffer[rightToLeftEmbed - start] = zeroWidthSpace; | 181 buffer[rightToLeftEmbed - start] = zeroWidthSpace; |
182 buffer[leftToRightOverride - start] = zeroWidthSpace; | 182 buffer[leftToRightOverride - start] = zeroWidthSpace; |
183 buffer[rightToLeftOverride - start] = zeroWidthSpace; | 183 buffer[rightToLeftOverride - start] = zeroWidthSpace; |
184 buffer[zeroWidthNonJoiner - start] = zeroWidthSpace; | 184 buffer[zeroWidthNonJoiner - start] = zeroWidthSpace; |
185 buffer[zeroWidthJoiner - start] = zeroWidthSpace; | 185 buffer[zeroWidthJoiner - start] = zeroWidthSpace; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 printf("\nPage %d:\n", it->key); | 414 printf("\nPage %d:\n", it->key); |
415 showGlyphPageTree(it->key); | 415 showGlyphPageTree(it->key); |
416 } | 416 } |
417 } | 417 } |
418 | 418 |
419 void showGlyphPageTree(unsigned pageNumber) | 419 void showGlyphPageTree(unsigned pageNumber) |
420 { | 420 { |
421 blink::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree(); | 421 blink::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree(); |
422 } | 422 } |
423 #endif | 423 #endif |
OLD | NEW |