| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // System fallback is character-dependent. When we get here, we | 504 // System fallback is character-dependent. When we get here, we |
| 505 // know that the character in question isn't in the system fallback | 505 // know that the character in question isn't in the system fallback |
| 506 // font's glyph page. Try to lazily create it here. | 506 // font's glyph page. Try to lazily create it here. |
| 507 | 507 |
| 508 // FIXME: Unclear if this should normalizeSpaces above 0xFFFF. | 508 // FIXME: Unclear if this should normalizeSpaces above 0xFFFF. |
| 509 // Doing so changes fast/text/international/plane2-diffs.html | 509 // Doing so changes fast/text/international/plane2-diffs.html |
| 510 UChar32 characterToRender = c; | 510 UChar32 characterToRender = c; |
| 511 if (characterToRender <= 0xFFFF) | 511 if (characterToRender <= 0xFFFF) |
| 512 characterToRender = Character::normalizeSpaces(characterToRender); | 512 characterToRender = Character::normalizeSpaces(characterToRender); |
| 513 const SimpleFontData* fontDataToSubstitute = fontDataAt(0)->fontDataForChara
cter(characterToRender); | 513 const SimpleFontData* fontDataToSubstitute = fontDataAt(0)->fontDataForChara
cter(characterToRender); |
| 514 RefPtr<SimpleFontData> characterFontData = FontCache::fontCache()->platformF
allbackForCharacter(m_fontDescription, characterToRender, fontDataToSubstitute); | 514 RefPtr<SimpleFontData> characterFontData = FontCache::fontCache()->fallbackF
ontForCharacter(m_fontDescription, characterToRender, fontDataToSubstitute); |
| 515 if (characterFontData) { | 515 if (characterFontData) { |
| 516 if (characterFontData->platformData().orientation() == Vertical && !char
acterFontData->hasVerticalGlyphs() && Character::isCJKIdeographOrSymbol(c)) | 516 if (characterFontData->platformData().orientation() == Vertical && !char
acterFontData->hasVerticalGlyphs() && Character::isCJKIdeographOrSymbol(c)) |
| 517 variant = BrokenIdeographVariant; | 517 variant = BrokenIdeographVariant; |
| 518 if (variant != NormalVariant) | 518 if (variant != NormalVariant) |
| 519 characterFontData = characterFontData->variantFontData(m_fontDescrip
tion, variant); | 519 characterFontData = characterFontData->variantFontData(m_fontDescrip
tion, variant); |
| 520 } | 520 } |
| 521 if (characterFontData) { | 521 if (characterFontData) { |
| 522 // Got the fallback glyph and font. | 522 // Got the fallback glyph and font. |
| 523 GlyphPage* fallbackPage = GlyphPageTreeNode::getRootChild(characterFontD
ata.get(), pageNumber)->page(); | 523 GlyphPage* fallbackPage = GlyphPageTreeNode::getRootChild(characterFontD
ata.get(), pageNumber)->page(); |
| 524 GlyphData data = fallbackPage && fallbackPage->glyphForCharacter(c) ? fa
llbackPage->glyphDataForCharacter(c) : characterFontData->missingGlyphData(); | 524 GlyphData data = fallbackPage && fallbackPage->glyphForCharacter(c) ? fa
llbackPage->glyphDataForCharacter(c) : characterFontData->missingGlyphData(); |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 if (delta <= 0) | 851 if (delta <= 0) |
| 852 break; | 852 break; |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 } | 855 } |
| 856 | 856 |
| 857 return offset; | 857 return offset; |
| 858 } | 858 } |
| 859 | 859 |
| 860 } | 860 } |
| OLD | NEW |