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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 return true; | 463 return true; |
464 | 464 |
465 if (!primaryFont()) | 465 if (!primaryFont()) |
466 return false; | 466 return false; |
467 | 467 |
468 const FontPlatformData& platformData = primaryFont()->platformData(); | 468 const FontPlatformData& platformData = primaryFont()->platformData(); |
469 TypesettingFeatures features = getFontDescription().getTypesettingFeatures()
; | 469 TypesettingFeatures features = getFontDescription().getTypesettingFeatures()
; |
470 return !platformData.hasSpaceInLigaturesOrKerning(features); | 470 return !platformData.hasSpaceInLigaturesOrKerning(features); |
471 }; | 471 }; |
472 | 472 |
473 void Font::willUseFontData(UChar32 character) const | 473 void Font::willUseFontData(const String& text) const |
474 { | 474 { |
475 const FontFamily& family = getFontDescription().family(); | 475 const FontFamily& family = getFontDescription().family(); |
476 if (m_fontFallbackList && m_fontFallbackList->getFontSelector() && !family.f
amilyIsEmpty()) | 476 if (m_fontFallbackList && m_fontFallbackList->getFontSelector() && !family.f
amilyIsEmpty()) |
477 m_fontFallbackList->getFontSelector()->willUseFontData(getFontDescriptio
n(), family.family(), character); | 477 m_fontFallbackList->getFontSelector()->willUseFontData(getFontDescriptio
n(), family.family(), text); |
478 } | 478 } |
479 | 479 |
480 static inline GlyphData glyphDataForNonCJKCharacterWithGlyphOrientation(UChar32
character, bool isUpright, GlyphData& data, unsigned pageNumber) | 480 static inline GlyphData glyphDataForNonCJKCharacterWithGlyphOrientation(UChar32
character, bool isUpright, GlyphData& data, unsigned pageNumber) |
481 { | 481 { |
482 if (isUpright) { | 482 if (isUpright) { |
483 RefPtr<SimpleFontData> uprightFontData = data.fontData->uprightOrientati
onFontData(); | 483 RefPtr<SimpleFontData> uprightFontData = data.fontData->uprightOrientati
onFontData(); |
484 GlyphPageTreeNode* uprightNode = GlyphPageTreeNode::getNormalRootChild(u
prightFontData.get(), pageNumber); | 484 GlyphPageTreeNode* uprightNode = GlyphPageTreeNode::getNormalRootChild(u
prightFontData.get(), pageNumber); |
485 GlyphPage* uprightPage = uprightNode->page(); | 485 GlyphPage* uprightPage = uprightNode->page(); |
486 if (uprightPage) { | 486 if (uprightPage) { |
487 GlyphData uprightData = uprightPage->glyphDataForCharacter(character
); | 487 GlyphData uprightData = uprightPage->glyphDataForCharacter(character
); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 { | 843 { |
844 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 844 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
845 } | 845 } |
846 | 846 |
847 bool Font::isFallbackValid() const | 847 bool Font::isFallbackValid() const |
848 { | 848 { |
849 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 849 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
850 } | 850 } |
851 | 851 |
852 } // namespace blink | 852 } // namespace blink |
OLD | NEW |