OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 if (fontData->hasVerticalGlyphs()) { | 98 if (fontData->hasVerticalGlyphs()) { |
99 bool lookVariants = false; | 99 bool lookVariants = false; |
100 for (unsigned i = 0; i < bufferLength; ++i) { | 100 for (unsigned i = 0; i < bufferLength; ++i) { |
101 if (!Font::isCJKIdeograph(buffer[i])) { | 101 if (!Font::isCJKIdeograph(buffer[i])) { |
102 lookVariants = true; | 102 lookVariants = true; |
103 continue; | 103 continue; |
104 } | 104 } |
105 } | 105 } |
106 if (lookVariants) | 106 if (lookVariants) |
107 substituteWithVerticalGlyphs(fontData, glyphs, bufferLength); | 107 substituteWithVerticalGlyphs(fontData, glyphs, length); |
108 } | 108 } |
109 | 109 |
110 unsigned allGlyphs = 0; // track if any of the glyphIDs are non-zero | 110 unsigned allGlyphs = 0; // track if any of the glyphIDs are non-zero |
111 for (unsigned i = 0; i < length; i++) { | 111 for (unsigned i = 0; i < length; i++) { |
112 setGlyphDataForIndex(offset + i, glyphs[i], glyphs[i] ? fontData : NULL)
; | 112 setGlyphDataForIndex(offset + i, glyphs[i], glyphs[i] ? fontData : NULL)
; |
113 allGlyphs |= glyphs[i]; | 113 allGlyphs |= glyphs[i]; |
114 } | 114 } |
115 | 115 |
116 return allGlyphs != 0; | 116 return allGlyphs != 0; |
117 } | 117 } |
118 | 118 |
119 } // namespace WebCore | 119 } // namespace WebCore |
OLD | NEW |