| 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 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. | 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 // FIXME: It would be nicer to use the missing glyph from the last resort fo
nt instead. | 564 // FIXME: It would be nicer to use the missing glyph from the last resort fo
nt instead. |
| 565 ASSERT(primaryFont()); | 565 ASSERT(primaryFont()); |
| 566 GlyphData data = primaryFont()->missingGlyphData(); | 566 GlyphData data = primaryFont()->missingGlyphData(); |
| 567 if (variant == NormalVariant) { | 567 if (variant == NormalVariant) { |
| 568 page->setGlyphDataForCharacter(c, data.glyph, data.fontData); | 568 page->setGlyphDataForCharacter(c, data.glyph, data.fontData); |
| 569 data.fontData->setMaxGlyphPageTreeLevel(std::max(data.fontData->maxGlyph
PageTreeLevel(), node->level())); | 569 data.fontData->setMaxGlyphPageTreeLevel(std::max(data.fontData->maxGlyph
PageTreeLevel(), node->level())); |
| 570 } | 570 } |
| 571 return data; | 571 return data; |
| 572 } | 572 } |
| 573 | 573 |
| 574 bool Font::primaryFontHasGlyphForCharacter(UChar32 character) const | |
| 575 { | |
| 576 ASSERT(primaryFont()); | |
| 577 unsigned pageNumber = (character / GlyphPage::size); | |
| 578 | |
| 579 GlyphPageTreeNode* node = GlyphPageTreeNode::getNormalRootChild(primaryFont(
), pageNumber); | |
| 580 GlyphPage* page = node->page(); | |
| 581 | |
| 582 return page && page->glyphForCharacter(character); | |
| 583 } | |
| 584 | |
| 585 // FIXME: This function may not work if the emphasis mark uses a complex script,
but none of the | 574 // FIXME: This function may not work if the emphasis mark uses a complex script,
but none of the |
| 586 // standard emphasis marks do so. | 575 // standard emphasis marks do so. |
| 587 bool Font::getEmphasisMarkGlyphData(const AtomicString& mark, GlyphData& glyphDa
ta) const | 576 bool Font::getEmphasisMarkGlyphData(const AtomicString& mark, GlyphData& glyphDa
ta) const |
| 588 { | 577 { |
| 589 if (mark.isEmpty()) | 578 if (mark.isEmpty()) |
| 590 return false; | 579 return false; |
| 591 | 580 |
| 592 UChar32 character = mark[0]; | 581 UChar32 character = mark[0]; |
| 593 | 582 |
| 594 if (U16_IS_SURROGATE(character)) { | 583 if (U16_IS_SURROGATE(character)) { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 { | 871 { |
| 883 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 872 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
| 884 } | 873 } |
| 885 | 874 |
| 886 bool Font::isFallbackValid() const | 875 bool Font::isFallbackValid() const |
| 887 { | 876 { |
| 888 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 877 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
| 889 } | 878 } |
| 890 | 879 |
| 891 } // namespace blink | 880 } // namespace blink |
| OLD | NEW |