Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.h

Issue 1397423004: Improve shaping segmentation for grapheme cluster based font fallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge TestExpectations with the HarfBuzz rebaselines Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of the internal font implementation. 2 * This file is part of the internal font implementation.
3 * 3 *
4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2007-2008 Torch Mobile, Inc. 5 * Copyright (C) 2007-2008 Torch Mobile, Inc.
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 private: 175 private:
176 DerivedFontData(bool custom) 176 DerivedFontData(bool custom)
177 : forCustomFont(custom) 177 : forCustomFont(custom)
178 { 178 {
179 } 179 }
180 }; 180 };
181 181
182 mutable OwnPtr<DerivedFontData> m_derivedFontData; 182 mutable OwnPtr<DerivedFontData> m_derivedFontData;
183 183
184 RefPtr<CustomFontData> m_customFontData; 184 RefPtr<CustomFontData> m_customFontData;
185 mutable OwnPtr<HashMap<String, bool>> m_combiningCharacterSequenceSupport;
186 }; 185 };
187 186
188 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const 187 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
189 { 188 {
190 if (isZeroWidthSpaceGlyph(glyph)) 189 if (isZeroWidthSpaceGlyph(glyph))
191 return FloatRect(); 190 return FloatRect();
192 191
193 FloatRect bounds; 192 FloatRect bounds;
194 if (m_glyphToBoundsMap) { 193 if (m_glyphToBoundsMap) {
195 bounds = m_glyphToBoundsMap->metricsForGlyph(glyph); 194 bounds = m_glyphToBoundsMap->metricsForGlyph(glyph);
(...skipping 20 matching lines...) Expand all
216 width = platformWidthForGlyph(glyph); 215 width = platformWidthForGlyph(glyph);
217 216
218 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 217 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
219 return width; 218 return width;
220 } 219 }
221 220
222 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 221 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
223 222
224 } // namespace blink 223 } // namespace blink
225 #endif // SimpleFontData_h 224 #endif // SimpleFontData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698