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

Side by Side Diff: Source/WebCore/platform/graphics/SimpleFontData.h

Issue 11299089: Merge 134871 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 { 95 {
96 return adoptRef(new SimpleFontData(fontData, fontSize, syntheticBold, sy ntheticItalic)); 96 return adoptRef(new SimpleFontData(fontData, fontSize, syntheticBold, sy ntheticItalic));
97 } 97 }
98 98
99 virtual ~SimpleFontData(); 99 virtual ~SimpleFontData();
100 100
101 static const SimpleFontData* systemFallback() { return reinterpret_cast<cons t SimpleFontData*>(-1); } 101 static const SimpleFontData* systemFallback() { return reinterpret_cast<cons t SimpleFontData*>(-1); }
102 102
103 const FontPlatformData& platformData() const { return m_platformData; } 103 const FontPlatformData& platformData() const { return m_platformData; }
104 #if ENABLE(OPENTYPE_VERTICAL) 104 #if ENABLE(OPENTYPE_VERTICAL)
105 const OpenTypeVerticalData* verticalData() const { return m_verticalData; } 105 const OpenTypeVerticalData* verticalData() const { return m_verticalData.get (); }
106 #endif 106 #endif
107 107
108 PassRefPtr<SimpleFontData> smallCapsFontData(const FontDescription&) const; 108 PassRefPtr<SimpleFontData> smallCapsFontData(const FontDescription&) const;
109 PassRefPtr<SimpleFontData> emphasisMarkFontData(const FontDescription&) cons t; 109 PassRefPtr<SimpleFontData> emphasisMarkFontData(const FontDescription&) cons t;
110 PassRefPtr<SimpleFontData> brokenIdeographFontData() const; 110 PassRefPtr<SimpleFontData> brokenIdeographFontData() const;
111 111
112 PassRefPtr<SimpleFontData> variantFontData(const FontDescription& descriptio n, FontDataVariant variant) const 112 PassRefPtr<SimpleFontData> variantFontData(const FontDescription& descriptio n, FontDataVariant variant) const
113 { 113 {
114 switch (variant) { 114 switch (variant) {
115 case SmallCapsVariant: 115 case SmallCapsVariant:
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 mutable OwnPtr<GlyphMetricsMap<FloatRect> > m_glyphToBoundsMap; 266 mutable OwnPtr<GlyphMetricsMap<FloatRect> > m_glyphToBoundsMap;
267 mutable GlyphMetricsMap<float> m_glyphToWidthMap; 267 mutable GlyphMetricsMap<float> m_glyphToWidthMap;
268 268
269 bool m_treatAsFixedPitch; 269 bool m_treatAsFixedPitch;
270 bool m_isCustomFont; // Whether or not we are custom font loaded via @font- face 270 bool m_isCustomFont; // Whether or not we are custom font loaded via @font- face
271 bool m_isLoading; // Whether or not this custom font is still in the act of loading. 271 bool m_isLoading; // Whether or not this custom font is still in the act of loading.
272 272
273 bool m_isTextOrientationFallback; 273 bool m_isTextOrientationFallback;
274 bool m_isBrokenIdeographFallback; 274 bool m_isBrokenIdeographFallback;
275 #if ENABLE(OPENTYPE_VERTICAL) 275 #if ENABLE(OPENTYPE_VERTICAL)
276 const OpenTypeVerticalData* m_verticalData; 276 RefPtr<OpenTypeVerticalData> m_verticalData;
277 #endif 277 #endif
278 bool m_hasVerticalGlyphs; 278 bool m_hasVerticalGlyphs;
279 279
280 Glyph m_spaceGlyph; 280 Glyph m_spaceGlyph;
281 float m_spaceWidth; 281 float m_spaceWidth;
282 float m_adjustedSpaceWidth; 282 float m_adjustedSpaceWidth;
283 283
284 Glyph m_zeroWidthSpaceGlyph; 284 Glyph m_zeroWidthSpaceGlyph;
285 285
286 GlyphData m_missingGlyphData; 286 GlyphData m_missingGlyphData;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 #endif 369 #endif
370 else 370 else
371 width = platformWidthForGlyph(glyph); 371 width = platformWidthForGlyph(glyph);
372 372
373 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 373 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
374 return width; 374 return width;
375 } 375 }
376 376
377 } // namespace WebCore 377 } // namespace WebCore
378 #endif // SimpleFontData_h 378 #endif // SimpleFontData_h
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/FontCache.cpp ('k') | Source/WebCore/platform/graphics/SimpleFontData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698