| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 0x212B, 0x213B, 0x2150, 0x2151, 0x2152, 0x217F, 0x2189, 0x2307, 0x2312, 0x23
CE, | 71 0x212B, 0x213B, 0x2150, 0x2151, 0x2152, 0x217F, 0x2189, 0x2307, 0x2312, 0x23
CE, |
| 72 0x2423, 0x25A0, 0x25A1, 0x25A2, 0x25AA, 0x25AB, 0x25B1, 0x25B2, 0x25B3, 0x25
B6, | 72 0x2423, 0x25A0, 0x25A1, 0x25A2, 0x25AA, 0x25AB, 0x25B1, 0x25B2, 0x25B3, 0x25
B6, |
| 73 0x25B7, 0x25BC, 0x25BD, 0x25C0, 0x25C1, 0x25C6, 0x25C7, 0x25C9, 0x25CB, 0x25
CC, | 73 0x25B7, 0x25BC, 0x25BD, 0x25C0, 0x25C1, 0x25C6, 0x25C7, 0x25C9, 0x25CB, 0x25
CC, |
| 74 0x25EF, 0x2605, 0x2606, 0x260E, 0x2616, 0x2617, 0x2640, 0x2642, 0x26A0, 0x26
BD, | 74 0x25EF, 0x2605, 0x2606, 0x260E, 0x2616, 0x2617, 0x2640, 0x2642, 0x26A0, 0x26
BD, |
| 75 0x26BE, 0x2713, 0x271A, 0x273F, 0x2740, 0x2756, 0x2B1A, 0xFE10, 0xFE11, 0xFE
12, | 75 0x26BE, 0x2713, 0x271A, 0x273F, 0x2740, 0x2756, 0x2B1A, 0xFE10, 0xFE11, 0xFE
12, |
| 76 0xFE19, 0xFF1D, | 76 0xFE19, 0xFF1D, |
| 77 // Emoji. | 77 // Emoji. |
| 78 0x1F100 | 78 0x1F100 |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 Font::CodePath Font::s_codePath = Auto; | 81 CodePath Font::s_codePath = AutoPath; |
| 82 | 82 |
| 83 TypesettingFeatures Font::s_defaultTypesettingFeatures = 0; | 83 TypesettingFeatures Font::s_defaultTypesettingFeatures = 0; |
| 84 | 84 |
| 85 // =============================================================================
=============== | 85 // =============================================================================
=============== |
| 86 // Font Implementation (Cross-Platform Portion) | 86 // Font Implementation (Cross-Platform Portion) |
| 87 // =============================================================================
=============== | 87 // =============================================================================
=============== |
| 88 | 88 |
| 89 Font::Font() | 89 Font::Font() |
| 90 : m_letterSpacing(0) | 90 : m_letterSpacing(0) |
| 91 , m_wordSpacing(0) | 91 , m_wordSpacing(0) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 void Font::drawText(GraphicsContext* context, const TextRunPaintInfo& runInfo, c
onst FloatPoint& point, CustomFontNotReadyAction customFontNotReadyAction) const | 170 void Font::drawText(GraphicsContext* context, const TextRunPaintInfo& runInfo, c
onst FloatPoint& point, CustomFontNotReadyAction customFontNotReadyAction) const |
| 171 { | 171 { |
| 172 // Don't draw anything while we are using custom fonts that are in the proce
ss of loading, | 172 // Don't draw anything while we are using custom fonts that are in the proce
ss of loading, |
| 173 // except if the 'force' argument is set to true (in which case it will use
a fallback | 173 // except if the 'force' argument is set to true (in which case it will use
a fallback |
| 174 // font). | 174 // font). |
| 175 if (loadingCustomFonts() && customFontNotReadyAction == DoNotPaintIfFontNotR
eady) | 175 if (loadingCustomFonts() && customFontNotReadyAction == DoNotPaintIfFontNotR
eady) |
| 176 return; | 176 return; |
| 177 | 177 |
| 178 CodePath codePathToUse = codePath(runInfo.run); | 178 CodePath codePathToUse = codePath(runInfo.run); |
| 179 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 | 179 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 |
| 180 if (codePathToUse != Complex && typesettingFeatures() && (runInfo.from || ru
nInfo.to != runInfo.run.length())) | 180 if (codePathToUse != ComplexPath && typesettingFeatures() && (runInfo.from |
| runInfo.to != runInfo.run.length())) |
| 181 codePathToUse = Complex; | 181 codePathToUse = ComplexPath; |
| 182 | 182 |
| 183 if (codePathToUse != Complex) | 183 if (codePathToUse != ComplexPath) |
| 184 return drawSimpleText(context, runInfo, point); | 184 return drawSimpleText(context, runInfo, point); |
| 185 | 185 |
| 186 return drawComplexText(context, runInfo, point); | 186 return drawComplexText(context, runInfo, point); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void Font::drawEmphasisMarks(GraphicsContext* context, const TextRunPaintInfo& r
unInfo, const AtomicString& mark, const FloatPoint& point) const | 189 void Font::drawEmphasisMarks(GraphicsContext* context, const TextRunPaintInfo& r
unInfo, const AtomicString& mark, const FloatPoint& point) const |
| 190 { | 190 { |
| 191 if (loadingCustomFonts()) | 191 if (loadingCustomFonts()) |
| 192 return; | 192 return; |
| 193 | 193 |
| 194 CodePath codePathToUse = codePath(runInfo.run); | 194 CodePath codePathToUse = codePath(runInfo.run); |
| 195 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 | 195 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 |
| 196 if (codePathToUse != Complex && typesettingFeatures() && (runInfo.from || ru
nInfo.to != runInfo.run.length())) | 196 if (codePathToUse != ComplexPath && typesettingFeatures() && (runInfo.from |
| runInfo.to != runInfo.run.length())) |
| 197 codePathToUse = Complex; | 197 codePathToUse = ComplexPath; |
| 198 | 198 |
| 199 if (codePathToUse != Complex) | 199 if (codePathToUse != ComplexPath) |
| 200 drawEmphasisMarksForSimpleText(context, runInfo, mark, point); | 200 drawEmphasisMarksForSimpleText(context, runInfo, mark, point); |
| 201 else | 201 else |
| 202 drawEmphasisMarksForComplexText(context, runInfo, mark, point); | 202 drawEmphasisMarksForComplexText(context, runInfo, mark, point); |
| 203 } | 203 } |
| 204 | 204 |
| 205 float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFo
nts, GlyphOverflow* glyphOverflow) const | 205 float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFo
nts, GlyphOverflow* glyphOverflow) const |
| 206 { | 206 { |
| 207 CodePath codePathToUse = codePath(run); | 207 CodePath codePathToUse = codePath(run); |
| 208 if (codePathToUse != Complex) { | 208 if (codePathToUse != ComplexPath) { |
| 209 // The complex path is more restrictive about returning fallback fonts t
han the simple path, so we need an explicit test to make their behaviors match. | 209 // The complex path is more restrictive about returning fallback fonts t
han the simple path, so we need an explicit test to make their behaviors match. |
| 210 if (!canReturnFallbackFontsForComplexText()) | 210 if (!canReturnFallbackFontsForComplexText()) |
| 211 fallbackFonts = 0; | 211 fallbackFonts = 0; |
| 212 // The simple path can optimize the case where glyph overflow is not obs
ervable. | 212 // The simple path can optimize the case where glyph overflow is not obs
ervable. |
| 213 if (codePathToUse != SimpleWithGlyphOverflow && (glyphOverflow && !glyph
Overflow->computeBounds)) | 213 if (codePathToUse != SimpleWithGlyphOverflowPath && (glyphOverflow && !g
lyphOverflow->computeBounds)) |
| 214 glyphOverflow = 0; | 214 glyphOverflow = 0; |
| 215 } | 215 } |
| 216 | 216 |
| 217 bool hasKerningOrLigatures = typesettingFeatures() & (Kerning | Ligatures); | 217 bool hasKerningOrLigatures = typesettingFeatures() & (Kerning | Ligatures); |
| 218 bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing(); | 218 bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing(); |
| 219 float* cacheEntry = m_fontFallbackList->widthCache().add(run, std::numeric_l
imits<float>::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing,
glyphOverflow); | 219 float* cacheEntry = m_fontFallbackList->widthCache().add(run, std::numeric_l
imits<float>::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing,
glyphOverflow); |
| 220 if (cacheEntry && !std::isnan(*cacheEntry)) | 220 if (cacheEntry && !std::isnan(*cacheEntry)) |
| 221 return *cacheEntry; | 221 return *cacheEntry; |
| 222 | 222 |
| 223 float result; | 223 float result; |
| 224 if (codePathToUse == Complex) | 224 if (codePathToUse == ComplexPath) |
| 225 result = floatWidthForComplexText(run, fallbackFonts, glyphOverflow); | 225 result = floatWidthForComplexText(run, fallbackFonts, glyphOverflow); |
| 226 else | 226 else |
| 227 result = floatWidthForSimpleText(run, fallbackFonts, glyphOverflow); | 227 result = floatWidthForSimpleText(run, fallbackFonts, glyphOverflow); |
| 228 | 228 |
| 229 if (cacheEntry && (!fallbackFonts || fallbackFonts->isEmpty())) | 229 if (cacheEntry && (!fallbackFonts || fallbackFonts->isEmpty())) |
| 230 *cacheEntry = result; | 230 *cacheEntry = result; |
| 231 return result; | 231 return result; |
| 232 } | 232 } |
| 233 | 233 |
| 234 float Font::width(const TextRun& run, int& charsConsumed, String& glyphName) con
st | 234 float Font::width(const TextRun& run, int& charsConsumed, String& glyphName) con
st |
| (...skipping 27 matching lines...) Expand all Loading... |
| 262 } | 262 } |
| 263 | 263 |
| 264 #endif | 264 #endif |
| 265 | 265 |
| 266 FloatRect Font::selectionRectForText(const TextRun& run, const FloatPoint& point
, int h, int from, int to) const | 266 FloatRect Font::selectionRectForText(const TextRun& run, const FloatPoint& point
, int h, int from, int to) const |
| 267 { | 267 { |
| 268 to = (to == -1 ? run.length() : to); | 268 to = (to == -1 ? run.length() : to); |
| 269 | 269 |
| 270 CodePath codePathToUse = codePath(run); | 270 CodePath codePathToUse = codePath(run); |
| 271 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 | 271 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 |
| 272 if (codePathToUse != Complex && typesettingFeatures() && (from || to != run.
length())) | 272 if (codePathToUse != ComplexPath && typesettingFeatures() && (from || to !=
run.length())) |
| 273 codePathToUse = Complex; | 273 codePathToUse = ComplexPath; |
| 274 | 274 |
| 275 if (codePathToUse != Complex) | 275 if (codePathToUse != ComplexPath) |
| 276 return selectionRectForSimpleText(run, point, h, from, to); | 276 return selectionRectForSimpleText(run, point, h, from, to); |
| 277 | 277 |
| 278 return selectionRectForComplexText(run, point, h, from, to); | 278 return selectionRectForComplexText(run, point, h, from, to); |
| 279 } | 279 } |
| 280 | 280 |
| 281 int Font::offsetForPosition(const TextRun& run, float x, bool includePartialGlyp
hs) const | 281 int Font::offsetForPosition(const TextRun& run, float x, bool includePartialGlyp
hs) const |
| 282 { | 282 { |
| 283 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 | 283 // FIXME: Use the fast code path once it handles partial runs with kerning a
nd ligatures. See http://webkit.org/b/100050 |
| 284 if (codePath(run) != Complex && !typesettingFeatures()) | 284 if (codePath(run) != ComplexPath && !typesettingFeatures()) |
| 285 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); | 285 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); |
| 286 | 286 |
| 287 return offsetForPositionForComplexText(run, x, includePartialGlyphs); | 287 return offsetForPositionForComplexText(run, x, includePartialGlyphs); |
| 288 } | 288 } |
| 289 | 289 |
| 290 template <typename CharacterType> | 290 template <typename CharacterType> |
| 291 static inline String normalizeSpacesInternal(const CharacterType* characters, un
signed length) | 291 static inline String normalizeSpacesInternal(const CharacterType* characters, un
signed length) |
| 292 { | 292 { |
| 293 StringBuilder normalized; | 293 StringBuilder normalized; |
| 294 normalized.reserveCapacity(length); | 294 normalized.reserveCapacity(length); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 320 bool Font::shouldUseSmoothing() | 320 bool Font::shouldUseSmoothing() |
| 321 { | 321 { |
| 322 return shouldUseFontSmoothing; | 322 return shouldUseFontSmoothing; |
| 323 } | 323 } |
| 324 | 324 |
| 325 void Font::setCodePath(CodePath p) | 325 void Font::setCodePath(CodePath p) |
| 326 { | 326 { |
| 327 s_codePath = p; | 327 s_codePath = p; |
| 328 } | 328 } |
| 329 | 329 |
| 330 Font::CodePath Font::codePath() | 330 CodePath Font::codePath() |
| 331 { | 331 { |
| 332 return s_codePath; | 332 return s_codePath; |
| 333 } | 333 } |
| 334 | 334 |
| 335 void Font::setDefaultTypesettingFeatures(TypesettingFeatures typesettingFeatures
) | 335 void Font::setDefaultTypesettingFeatures(TypesettingFeatures typesettingFeatures
) |
| 336 { | 336 { |
| 337 s_defaultTypesettingFeatures = typesettingFeatures; | 337 s_defaultTypesettingFeatures = typesettingFeatures; |
| 338 } | 338 } |
| 339 | 339 |
| 340 TypesettingFeatures Font::defaultTypesettingFeatures() | 340 TypesettingFeatures Font::defaultTypesettingFeatures() |
| 341 { | 341 { |
| 342 return s_defaultTypesettingFeatures; | 342 return s_defaultTypesettingFeatures; |
| 343 } | 343 } |
| 344 | 344 |
| 345 Font::CodePath Font::codePath(const TextRun& run) const | 345 CodePath Font::codePath(const TextRun& run) const |
| 346 { | 346 { |
| 347 if (s_codePath != Auto) | 347 if (s_codePath != AutoPath) |
| 348 return s_codePath; | 348 return s_codePath; |
| 349 | 349 |
| 350 #if ENABLE(SVG_FONTS) | 350 #if ENABLE(SVG_FONTS) |
| 351 if (run.renderingContext()) | 351 if (run.renderingContext()) |
| 352 return Simple; | 352 return SimplePath; |
| 353 #endif | 353 #endif |
| 354 | 354 |
| 355 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) | 355 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) |
| 356 return Complex; | 356 return ComplexPath; |
| 357 | 357 |
| 358 if (run.length() > 1 && !WidthIterator::supportsTypesettingFeatures(*this)) | 358 if (run.length() > 1 && !WidthIterator::supportsTypesettingFeatures(*this)) |
| 359 return Complex; | 359 return ComplexPath; |
| 360 | 360 |
| 361 if (!run.characterScanForCodePath()) | 361 if (!run.characterScanForCodePath()) |
| 362 return Simple; | 362 return SimplePath; |
| 363 | 363 |
| 364 if (run.is8Bit()) | 364 if (run.is8Bit()) |
| 365 return Simple; | 365 return SimplePath; |
| 366 | 366 |
| 367 // Start from 0 since drawing and highlighting also measure the characters b
efore run->from. | 367 // Start from 0 since drawing and highlighting also measure the characters b
efore run->from. |
| 368 return characterRangeCodePath(run.characters16(), run.length()); | 368 return characterRangeCodePath(run.characters16(), run.length()); |
| 369 } | 369 } |
| 370 | 370 |
| 371 // Takes a flattened list of closed intervals | 371 // Takes a flattened list of closed intervals |
| 372 template <class T, size_t size> | 372 template <class T, size_t size> |
| 373 bool valueInIntervalList(const T (&intervalList)[size], const T& value) | 373 bool valueInIntervalList(const T (&intervalList)[size], const T& value) |
| 374 { | 374 { |
| 375 const T* bound = std::upper_bound(&intervalList[0], &intervalList[size], val
ue); | 375 const T* bound = std::upper_bound(&intervalList[0], &intervalList[size], val
ue); |
| 376 if ((bound - intervalList) % 2 == 1) | 376 if ((bound - intervalList) % 2 == 1) |
| 377 return true; | 377 return true; |
| 378 return bound > intervalList && *(bound - 1) == value; | 378 return bound > intervalList && *(bound - 1) == value; |
| 379 } | 379 } |
| 380 | 380 |
| 381 Font::CodePath Font::characterRangeCodePath(const UChar* characters, unsigned le
n) | 381 CodePath Font::characterRangeCodePath(const UChar* characters, unsigned len) |
| 382 { | 382 { |
| 383 static const UChar complexCodePathRanges[] = { | 383 static const UChar complexCodePathRanges[] = { |
| 384 // U+02E5 through U+02E9 (Modifier Letters : Tone letters) | 384 // U+02E5 through U+02E9 (Modifier Letters : Tone letters) |
| 385 0x2E5, 0x2E9, | 385 0x2E5, 0x2E9, |
| 386 // U+0300 through U+036F Combining diacritical marks | 386 // U+0300 through U+036F Combining diacritical marks |
| 387 0x300, 0x36F, | 387 0x300, 0x36F, |
| 388 // U+0591 through U+05CF excluding U+05BE Hebrew combining marks, ... | 388 // U+0591 through U+05CF excluding U+05BE Hebrew combining marks, ... |
| 389 0x0591, 0x05BD, | 389 0x0591, 0x05BD, |
| 390 // ... Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha | 390 // ... Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha |
| 391 0x05BF, 0x05CF, | 391 0x05BF, 0x05CF, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 422 // Hangul Jamo Ext. A, Javanese, Myanmar Extended A, Tai Viet, Meetei Ma
yek | 422 // Hangul Jamo Ext. A, Javanese, Myanmar Extended A, Tai Viet, Meetei Ma
yek |
| 423 0xA800, 0xABFF, | 423 0xA800, 0xABFF, |
| 424 // U+D7B0 through U+D7FF Hangul Jamo Ext. B | 424 // U+D7B0 through U+D7FF Hangul Jamo Ext. B |
| 425 0xD7B0, 0xD7FF, | 425 0xD7B0, 0xD7FF, |
| 426 // U+FE00 through U+FE0F Unicode variation selectors | 426 // U+FE00 through U+FE0F Unicode variation selectors |
| 427 0xFE00, 0xFE0F, | 427 0xFE00, 0xFE0F, |
| 428 // U+FE20 through U+FE2F Combining half marks | 428 // U+FE20 through U+FE2F Combining half marks |
| 429 0xFE20, 0xFE2F | 429 0xFE20, 0xFE2F |
| 430 }; | 430 }; |
| 431 | 431 |
| 432 CodePath result = Simple; | 432 CodePath result = SimplePath; |
| 433 for (unsigned i = 0; i < len; i++) { | 433 for (unsigned i = 0; i < len; i++) { |
| 434 const UChar c = characters[i]; | 434 const UChar c = characters[i]; |
| 435 | 435 |
| 436 // Shortcut for common case | 436 // Shortcut for common case |
| 437 if (c < 0x2E5) | 437 if (c < 0x2E5) |
| 438 continue; | 438 continue; |
| 439 | 439 |
| 440 // U+1E00 through U+2000 characters with diacritics and stacked diacriti
cs | 440 // U+1E00 through U+2000 characters with diacritics and stacked diacriti
cs |
| 441 if (c >= 0x1E00 && c <= 0x2000) { | 441 if (c >= 0x1E00 && c <= 0x2000) { |
| 442 result = SimpleWithGlyphOverflow; | 442 result = SimpleWithGlyphOverflowPath; |
| 443 continue; | 443 continue; |
| 444 } | 444 } |
| 445 | 445 |
| 446 // Surrogate pairs | 446 // Surrogate pairs |
| 447 if (c > 0xD7FF && c <= 0xDBFF) { | 447 if (c > 0xD7FF && c <= 0xDBFF) { |
| 448 if (i == len - 1) | 448 if (i == len - 1) |
| 449 continue; | 449 continue; |
| 450 | 450 |
| 451 UChar next = characters[++i]; | 451 UChar next = characters[++i]; |
| 452 if (!U16_IS_TRAIL(next)) | 452 if (!U16_IS_TRAIL(next)) |
| 453 continue; | 453 continue; |
| 454 | 454 |
| 455 UChar32 supplementaryCharacter = U16_GET_SUPPLEMENTARY(c, next); | 455 UChar32 supplementaryCharacter = U16_GET_SUPPLEMENTARY(c, next); |
| 456 | 456 |
| 457 if (supplementaryCharacter < 0x1F1E6) // U+1F1E6 through U+1F1FF Reg
ional Indicator Symbols | 457 if (supplementaryCharacter < 0x1F1E6) // U+1F1E6 through U+1F1FF Reg
ional Indicator Symbols |
| 458 continue; | 458 continue; |
| 459 if (supplementaryCharacter <= 0x1F1FF) | 459 if (supplementaryCharacter <= 0x1F1FF) |
| 460 return Complex; | 460 return ComplexPath; |
| 461 | 461 |
| 462 if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Uni
code variation selectors. | 462 if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Uni
code variation selectors. |
| 463 continue; | 463 continue; |
| 464 if (supplementaryCharacter <= 0xE01EF) | 464 if (supplementaryCharacter <= 0xE01EF) |
| 465 return Complex; | 465 return ComplexPath; |
| 466 | 466 |
| 467 // FIXME: Check for Brahmi (U+11000 block), Kaithi (U+11080 block) a
nd other complex scripts | 467 // FIXME: Check for Brahmi (U+11000 block), Kaithi (U+11080 block) a
nd other complex scripts |
| 468 // in plane 1 or higher. | 468 // in plane 1 or higher. |
| 469 | 469 |
| 470 continue; | 470 continue; |
| 471 } | 471 } |
| 472 | 472 |
| 473 // Search for other Complex cases | 473 // Search for other Complex cases |
| 474 if (valueInIntervalList(complexCodePathRanges, c)) | 474 if (valueInIntervalList(complexCodePathRanges, c)) |
| 475 return Complex; | 475 return ComplexPath; |
| 476 } | 476 } |
| 477 | 477 |
| 478 return result; | 478 return result; |
| 479 } | 479 } |
| 480 | 480 |
| 481 bool Font::isCJKIdeograph(UChar32 c) | 481 bool Font::isCJKIdeograph(UChar32 c) |
| 482 { | 482 { |
| 483 static const UChar32 cjkIdeographRanges[] = { | 483 static const UChar32 cjkIdeographRanges[] = { |
| 484 // CJK Radicals Supplement and Kangxi Radicals. | 484 // CJK Radicals Supplement and Kangxi Radicals. |
| 485 0x2E80, 0x2FDF, | 485 0x2E80, 0x2FDF, |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 } | 656 } |
| 657 | 657 |
| 658 void Font::willUseFontData() const | 658 void Font::willUseFontData() const |
| 659 { | 659 { |
| 660 const FontFamily& family = fontDescription().family(); | 660 const FontFamily& family = fontDescription().family(); |
| 661 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami
lyIsEmpty()) | 661 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami
lyIsEmpty()) |
| 662 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f
amily.family()); | 662 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f
amily.family()); |
| 663 } | 663 } |
| 664 | 664 |
| 665 } | 665 } |
| OLD | NEW |