OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 return *value; | 374 return *value; |
375 } | 375 } |
376 | 376 |
377 static inline UChar32 keyExtractorUChar32(const UChar32* value) | 377 static inline UChar32 keyExtractorUChar32(const UChar32* value) |
378 { | 378 { |
379 return *value; | 379 return *value; |
380 } | 380 } |
381 | 381 |
382 Font::CodePath Font::characterRangeCodePath(const UChar* characters, unsigned le
n) | 382 Font::CodePath Font::characterRangeCodePath(const UChar* characters, unsigned le
n) |
383 { | 383 { |
384 static UChar complexCodePathRanges[] = { | 384 static const UChar complexCodePathRanges[] = { |
385 // U+02E5 through U+02E9 (Modifier Letters : Tone letters) | 385 // U+02E5 through U+02E9 (Modifier Letters : Tone letters) |
386 0x2E5, 0x2E9, | 386 0x2E5, 0x2E9, |
387 // U+0300 through U+036F Combining diacritical marks | 387 // U+0300 through U+036F Combining diacritical marks |
388 0x300, 0x36F, | 388 0x300, 0x36F, |
389 // U+0591 through U+05CF excluding U+05BE Hebrew combining marks, ... | 389 // U+0591 through U+05CF excluding U+05BE Hebrew combining marks, ... |
390 0x0591, 0x05BD, | 390 0x0591, 0x05BD, |
391 // ... Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha | 391 // ... Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha |
392 0x05BF, 0x05CF, | 392 0x05BF, 0x05CF, |
393 // U+0600 through U+109F Arabic, Syriac, Thaana, NKo, Samaritan, Mandaic
, | 393 // U+0600 through U+109F Arabic, Syriac, Thaana, NKo, Samaritan, Mandaic
, |
394 // Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannad
a, | 394 // Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannad
a, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 // Determine if we are in a range or out - opposite condition to above | 489 // Determine if we are in a range or out - opposite condition to above |
490 if (isEndOfRange) | 490 if (isEndOfRange) |
491 return Complex; | 491 return Complex; |
492 } | 492 } |
493 | 493 |
494 return result; | 494 return result; |
495 } | 495 } |
496 | 496 |
497 bool Font::isCJKIdeograph(UChar32 c) | 497 bool Font::isCJKIdeograph(UChar32 c) |
498 { | 498 { |
499 static UChar32 cjkIdeographRanges[] = { | 499 static const UChar32 cjkIdeographRanges[] = { |
500 // CJK Radicals Supplement and Kangxi Radicals. | 500 // CJK Radicals Supplement and Kangxi Radicals. |
501 0x2E80, 0x2FDF, | 501 0x2E80, 0x2FDF, |
502 // CJK Strokes. | 502 // CJK Strokes. |
503 0x31C0, 0x31EF, | 503 0x31C0, 0x31EF, |
504 // CJK Unified Ideographs Extension A. | 504 // CJK Unified Ideographs Extension A. |
505 0x3400, 0x4DBF, | 505 0x3400, 0x4DBF, |
506 // The basic CJK Unified Ideographs block. | 506 // The basic CJK Unified Ideographs block. |
507 0x4E00, 0x9FFF, | 507 0x4E00, 0x9FFF, |
508 // CJK Compatibility Ideographs. | 508 // CJK Compatibility Ideographs. |
509 0xF900, 0xFAFF, | 509 0xF900, 0xFAFF, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 cjkIsolatedSymbols = new HashSet<UChar32>(); | 544 cjkIsolatedSymbols = new HashSet<UChar32>(); |
545 for (size_t i = 0; i < WTF_ARRAY_LENGTH(cjkIsolatedSymbolsArray); ++i) | 545 for (size_t i = 0; i < WTF_ARRAY_LENGTH(cjkIsolatedSymbolsArray); ++i) |
546 cjkIsolatedSymbols->add(cjkIsolatedSymbolsArray[i]); | 546 cjkIsolatedSymbols->add(cjkIsolatedSymbolsArray[i]); |
547 } | 547 } |
548 if (cjkIsolatedSymbols->contains(c)) | 548 if (cjkIsolatedSymbols->contains(c)) |
549 return true; | 549 return true; |
550 | 550 |
551 if (isCJKIdeograph(c)) | 551 if (isCJKIdeograph(c)) |
552 return true; | 552 return true; |
553 | 553 |
554 static UChar32 cjkSymbolRanges[] = { | 554 static const UChar32 cjkSymbolRanges[] = { |
555 0x2156, 0x215A, | 555 0x2156, 0x215A, |
556 0x2160, 0x216B, | 556 0x2160, 0x216B, |
557 0x2170, 0x217B, | 557 0x2170, 0x217B, |
558 0x23BE, 0x23CC, | 558 0x23BE, 0x23CC, |
559 0x2460, 0x2492, | 559 0x2460, 0x2492, |
560 0x249C, 0x24FF, | 560 0x249C, 0x24FF, |
561 0x25CE, 0x25D3, | 561 0x25CE, 0x25D3, |
562 0x25E2, 0x25E6, | 562 0x25E2, 0x25E6, |
563 0x2600, 0x2603, | 563 0x2600, 0x2603, |
564 0x2660, 0x266F, | 564 0x2660, 0x266F, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 } | 689 } |
690 | 690 |
691 void Font::willUseFontData() const | 691 void Font::willUseFontData() const |
692 { | 692 { |
693 const FontFamily& family = fontDescription().family(); | 693 const FontFamily& family = fontDescription().family(); |
694 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami
lyIsEmpty()) | 694 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami
lyIsEmpty()) |
695 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f
amily.family()); | 695 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f
amily.family()); |
696 } | 696 } |
697 | 697 |
698 } | 698 } |
OLD | NEW |