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

Side by Side Diff: Source/platform/fonts/Character.h

Issue 1156763003: Revert of Unicode Variation Selectors support in collectCandidateRuns (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | Source/platform/fonts/shaping/HarfBuzzShaper.cpp » ('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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class PLATFORM_EXPORT Character { 44 class PLATFORM_EXPORT Character {
45 public: 45 public:
46 static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simp lePath; } 46 static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simp lePath; }
47 static CodePath characterRangeCodePath(const UChar*, unsigned len); 47 static CodePath characterRangeCodePath(const UChar*, unsigned len);
48 48
49 static inline bool isInRange(UChar32 character, UChar32 lowerBound, UChar32 upperBound) 49 static inline bool isInRange(UChar32 character, UChar32 lowerBound, UChar32 upperBound)
50 { 50 {
51 return character >= lowerBound && character <= upperBound; 51 return character >= lowerBound && character <= upperBound;
52 } 52 }
53 53
54 static inline bool isUnicodeVariationSelector(UChar32 character)
55 {
56 // http://www.unicode.org/Public/UCD/latest/ucd/StandardizedVariants.htm l
57 return isInRange(character, 0x180B, 0x180D) // MONGOLIAN FREE VARIATION SELECTOR ONE to THREE
58 || isInRange(character, 0xFE00, 0xFE0F) // VARIATION SELECTOR-1 to 1 6
59 || isInRange(character, 0xE0100, 0xE01EF); // VARIATION SELECTOR-17 to 256
60 }
61
62 static bool isCJKIdeograph(UChar32); 54 static bool isCJKIdeograph(UChar32);
63 static bool isCJKIdeographOrSymbol(UChar32); 55 static bool isCJKIdeographOrSymbol(UChar32);
64 56
65 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD irection, bool& isAfterExpansion, const TextJustify); 57 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD irection, bool& isAfterExpansion, const TextJustify);
66 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD irection, bool& isAfterExpansion, const TextJustify); 58 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD irection, bool& isAfterExpansion, const TextJustify);
67 59
68 static bool shouldIgnoreRotation(UChar32 character); 60 static bool shouldIgnoreRotation(UChar32 character);
69 61
70 static bool treatAsSpace(UChar c) 62 static bool treatAsSpace(UChar c)
71 { 63 {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 static String normalizeSpaces(const LChar*, unsigned length); 110 static String normalizeSpaces(const LChar*, unsigned length);
119 static String normalizeSpaces(const UChar*, unsigned length); 111 static String normalizeSpaces(const UChar*, unsigned length);
120 112
121 private: 113 private:
122 Character(); 114 Character();
123 }; 115 };
124 116
125 } // namespace blink 117 } // namespace blink
126 118
127 #endif 119 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/fonts/shaping/HarfBuzzShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698