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

Side by Side Diff: platform/graphics/FontFastPath.cpp

Issue 2241005: Update the list of characters to be deal with in complex code path Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 years, 6 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 | no next file » | 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) 2003, 2006 Apple Computer, Inc. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc.
3 * Copyright (C) 2008 Holger Hans Peter Freyther 3 * Copyright (C) 2008 Holger Hans Peter Freyther
4 * Copyright (C) 2009 Torch Mobile, Inc. 4 * Copyright (C) 2009 Torch Mobile, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 { 189 {
190 return s_codePath; 190 return s_codePath;
191 } 191 }
192 192
193 Font::CodePath Font::codePath(const TextRun& run) const 193 Font::CodePath Font::codePath(const TextRun& run) const
194 { 194 {
195 if (s_codePath != Auto) 195 if (s_codePath != Auto)
196 return s_codePath; 196 return s_codePath;
197 197
198 // Start from 0 since drawing and highlighting also measure the characters b efore run->from 198 // Start from 0 since drawing and highlighting also measure the characters b efore run->from
199 // FIXME: Should use a UnicodeSet in ports where ICU is used. Note that we
200 // can't simply use UnicodeCharacter Property/class because some characters
201 // are not 'combining', but still need to go to the complex path.
199 for (int i = 0; i < run.length(); i++) { 202 for (int i = 0; i < run.length(); i++) {
200 const UChar c = run[i]; 203 const UChar c = run[i];
204 if (c < 0x02E5) // U+02E5 through U+02E9 (Modifier Letters : Tone le tters)
205 continue;
206 if (c <= 0x02E9)
207 return Complex;
201 if (c < 0x300) // U+0300 through U+036F Combining diacritical marks 208 if (c < 0x300) // U+0300 through U+036F Combining diacritical marks
202 continue; 209 continue;
203 if (c <= 0x36F) 210 if (c <= 0x36F)
204 return Complex; 211 return Complex;
205 212
206 if (c < 0x0591 || c == 0x05BE) // U+0591 through U+05CF excluding U+ 05BE Hebrew combining marks, Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha 213 if (c < 0x0591 || c == 0x05BE) // U+0591 through U+05CF excluding U+ 05BE Hebrew combining marks, Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha
207 continue; 214 continue;
208 if (c <= 0x05CF) 215 if (c <= 0x05CF)
209 return Complex; 216 return Complex;
210 217
211 if (c < 0x0600) // U+0600 through U+1059 Arabic, Syriac, Thaana, Dev anagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar 218 if (c < 0x0600) // U+0600 through U+1059 Arabic, Syriac, Thaana, Dev anagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar
212 continue; 219 continue;
213 if (c <= 0x1059) 220 if (c <= 0x1059)
214 return Complex; 221 return Complex;
215 222
216 if (c < 0x1100) // U+1100 through U+11FF Hangul Jamo (only Ancient K orean should be left here if you precompose; Modern Korean will be precomposed a s a result of step A) 223 if (c < 0x1100) // U+1100 through U+11FF Hangul Jamo (only Ancient K orean should be left here if you precompose; Modern Korean will be precomposed a s a result of step A)
217 continue; 224 continue;
218 if (c <= 0x11FF) 225 if (c <= 0x11FF)
219 return Complex; 226 return Complex;
220 227
221 if (c < 0x1780) // U+1780 through U+18AF Khmer, Mongolian 228 if (c < 0x1700) // U+1700 through U+18AF Tagalog, Hanunoo, Buhid, Ta gbanwa, Khmer, Mongolian
222 continue; 229 continue;
223 if (c <= 0x18AF) 230 if (c <= 0x18AF)
224 return Complex; 231 return Complex;
225 232
226 if (c < 0x1900) // U+1900 through U+194F Limbu (Unicode 4.0) 233 if (c < 0x1900) // U+1900 through U+194F Limbu (Unicode 4.0)
227 continue; 234 continue;
228 if (c <= 0x194F) 235 if (c <= 0x194F)
229 return Complex; 236 return Complex;
230 237
238 if (c < 0x1980) // U+1980 through U+19DF New Tai Lue
239 continue;
240 if (c <= 0x19DF)
241 return Complex;
242
243 if (c < 0x1A00) // U+1A00 through U+1C4F Buginese, Balinese, Lepcha
244 continue;
245 if (c <= 0x1C4F)
246 return Complex;
247
248 if (c < 0x1DC0) // U+1DC0 through U+1DFF Comining diacritical mark s upplement
249 continue;
250 if (c <= 0x1DFF)
251 return Complex;
252
231 if (c < 0x1E00) // U+1E00 through U+2000 characters with diacritics and stacked diacritics 253 if (c < 0x1E00) // U+1E00 through U+2000 characters with diacritics and stacked diacritics
232 continue; 254 continue;
233 if (c <= 0x2000) 255 if (c <= 0x2000)
234 return SimpleWithGlyphOverflow; 256 return SimpleWithGlyphOverflow;
235 257
236 if (c < 0x20D0) // U+20D0 through U+20FF Combining marks for symbols 258 if (c < 0x20D0) // U+20D0 through U+20FF Combining marks for symbols
237 continue; 259 continue;
238 if (c <= 0x20FF) 260 if (c <= 0x20FF)
239 return Complex; 261 return Complex;
240 262
263 if (c < 0xA800) // U+A800 through U+ABFF : Nagri, Phags-pa, Saurasht ra, Hangul Jamo Ext. A, Meetei Mayek
264 continue;
265 if (c <= 0xABFF)
266 return Complex;
267 if (c < 0xD7B0) // U+D7B0 through U+D7FF : Hangul Jamo Ext. B
268 continue;
269 if (c <= 0xD7FF)
270 return Complex;
241 if (c < 0xFE20) // U+FE20 through U+FE2F Combining half marks 271 if (c < 0xFE20) // U+FE20 through U+FE2F Combining half marks
242 continue; 272 continue;
243 if (c <= 0xFE2F) 273 if (c <= 0xFE2F)
244 return Complex; 274 return Complex;
245 } 275 }
246 276
247 if (typesettingFeatures()) 277 if (typesettingFeatures())
248 return Complex; 278 return Complex;
249 279
250 return Simple; 280 return Simple;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 if (delta <= 0) 412 if (delta <= 0)
383 break; 413 break;
384 } 414 }
385 } 415 }
386 } 416 }
387 417
388 return offset; 418 return offset;
389 } 419 }
390 420
391 } 421 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698