| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 { | 71 { |
| 72 if (runIndex < m_harfBuzzRuns.size()) { | 72 if (runIndex < m_harfBuzzRuns.size()) { |
| 73 startIndex = m_harfBuzzRuns[runIndex]->startIndex(); | 73 startIndex = m_harfBuzzRuns[runIndex]->startIndex(); |
| 74 numGlyphs = m_harfBuzzRuns[runIndex]->numGlyphs(); | 74 numGlyphs = m_harfBuzzRuns[runIndex]->numGlyphs(); |
| 75 script = m_harfBuzzRuns[runIndex]->script(); | 75 script = m_harfBuzzRuns[runIndex]->script(); |
| 76 return true; | 76 return true; |
| 77 } | 77 } |
| 78 return false; | 78 return false; |
| 79 } | 79 } |
| 80 | 80 |
| 81 uint16_t glyphForTesting(unsigned runIndex, size_t glyphIndex) |
| 82 { |
| 83 return m_harfBuzzRuns[runIndex]->glyphData(glyphIndex).glyph; |
| 84 } |
| 85 |
| 86 float advanceForTesting(unsigned runIndex, size_t glyphIndex) |
| 87 { |
| 88 return m_harfBuzzRuns[runIndex]->glyphData(glyphIndex).advance; |
| 89 } |
| 90 |
| 81 private: | 91 private: |
| 82 struct HarfBuzzRunGlyphData { | 92 struct HarfBuzzRunGlyphData { |
| 83 uint16_t glyph; | 93 uint16_t glyph; |
| 84 uint16_t characterIndex; | 94 uint16_t characterIndex; |
| 85 float advance; | 95 float advance; |
| 86 FloatSize offset; | 96 FloatSize offset; |
| 87 }; | 97 }; |
| 88 | 98 |
| 89 class PLATFORM_EXPORT HarfBuzzRun { | 99 class PLATFORM_EXPORT HarfBuzzRun { |
| 90 public: | 100 public: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 int m_toIndex; | 170 int m_toIndex; |
| 161 | 171 |
| 162 float m_totalWidth; | 172 float m_totalWidth; |
| 163 | 173 |
| 164 friend struct CachedShapingResults; | 174 friend struct CachedShapingResults; |
| 165 }; | 175 }; |
| 166 | 176 |
| 167 } // namespace blink | 177 } // namespace blink |
| 168 | 178 |
| 169 #endif // HarfBuzzShaper_h | 179 #endif // HarfBuzzShaper_h |
| OLD | NEW |