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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 Vector<CharacterRange> Font::individualCharacterRanges(const TextRun& run) const | 761 Vector<CharacterRange> Font::individualCharacterRanges(const TextRun& run) const |
762 { | 762 { |
763 // TODO(pdr): Android is temporarily (crbug.com/577306) using the old simple | 763 // TODO(pdr): Android is temporarily (crbug.com/577306) using the old simple |
764 // shaper and using the complex shaper here can show differences between | 764 // shaper and using the complex shaper here can show differences between |
765 // the two shapers. This function is currently only called through SVG | 765 // the two shapers. This function is currently only called through SVG |
766 // which now exclusively uses the complex shaper, so the primary difference | 766 // which now exclusively uses the complex shaper, so the primary difference |
767 // will be improved shaping in SVG when compared to HTML. | 767 // will be improved shaping in SVG when compared to HTML. |
768 FontCachePurgePreventer purgePreventer; | 768 FontCachePurgePreventer purgePreventer; |
769 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); | 769 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); |
770 auto ranges = shaper.individualCharacterRanges(this, run); | 770 auto ranges = shaper.individualCharacterRanges(this, run); |
771 DCHECK_EQ(ranges.size(), static_cast<unsigned>(run.length())); | 771 DCHECK_EQ(ranges.size(), run.length()); |
772 return ranges; | 772 return ranges; |
773 } | 773 } |
774 | 774 |
775 float Font::floatWidthForSimpleText(const TextRun& run, HashSet<const SimpleFont
Data*>* fallbackFonts, FloatRect* glyphBounds) const | 775 float Font::floatWidthForSimpleText(const TextRun& run, HashSet<const SimpleFont
Data*>* fallbackFonts, FloatRect* glyphBounds) const |
776 { | 776 { |
777 SimpleShaper shaper(this, run, nullptr, fallbackFonts, glyphBounds); | 777 SimpleShaper shaper(this, run, nullptr, fallbackFonts, glyphBounds); |
778 shaper.advance(run.length()); | 778 shaper.advance(run.length()); |
779 return shaper.runWidthSoFar(); | 779 return shaper.runWidthSoFar(); |
780 } | 780 } |
781 | 781 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 { | 849 { |
850 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 850 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
851 } | 851 } |
852 | 852 |
853 bool Font::isFallbackValid() const | 853 bool Font::isFallbackValid() const |
854 { | 854 { |
855 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 855 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
856 } | 856 } |
857 | 857 |
858 } // namespace blink | 858 } // namespace blink |
OLD | NEW |