OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 ComplexTextController controller(this, run); | 151 ComplexTextController controller(this, run); |
152 return controller.offsetForPosition(x, includePartialGlyphs); | 152 return controller.offsetForPosition(x, includePartialGlyphs); |
153 } | 153 } |
154 | 154 |
155 const SimpleFontData* Font::fontDataForCombiningCharacterSequence(const UChar* c
haracters, size_t length, FontDataVariant variant) const | 155 const SimpleFontData* Font::fontDataForCombiningCharacterSequence(const UChar* c
haracters, size_t length, FontDataVariant variant) const |
156 { | 156 { |
157 UChar32 baseCharacter; | 157 UChar32 baseCharacter; |
158 size_t baseCharacterLength = 0; | 158 size_t baseCharacterLength = 0; |
159 U16_NEXT(characters, baseCharacterLength, length, baseCharacter); | 159 U16_NEXT(characters, baseCharacterLength, length, baseCharacter); |
160 | 160 |
161 GlyphData baseCharacterGlyphData = glyphDataForCharacter(baseCharacter, fals
e, variant); | 161 GlyphData baseCharacterGlyphData = glyphDataForCharacter(baseCharacter, fals
e, false, variant); |
162 | 162 |
163 if (!baseCharacterGlyphData.glyph) | 163 if (!baseCharacterGlyphData.glyph) |
164 return 0; | 164 return 0; |
165 | 165 |
166 if (length == baseCharacterLength) | 166 if (length == baseCharacterLength) |
167 return baseCharacterGlyphData.fontData; | 167 return baseCharacterGlyphData.fontData; |
168 | 168 |
169 bool triedBaseCharacterFontData = false; | 169 bool triedBaseCharacterFontData = false; |
170 | 170 |
171 unsigned i = 0; | 171 unsigned i = 0; |
(...skipping 28 matching lines...) Expand all Loading... |
200 return simpleFontData; | 200 return simpleFontData; |
201 } | 201 } |
202 | 202 |
203 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh
aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt
h)) | 203 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh
aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt
h)) |
204 return baseCharacterGlyphData.fontData; | 204 return baseCharacterGlyphData.fontData; |
205 | 205 |
206 return SimpleFontData::systemFallback(); | 206 return SimpleFontData::systemFallback(); |
207 } | 207 } |
208 | 208 |
209 } // namespace blink | 209 } // namespace blink |
OLD | NEW |