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

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

Issue 682793002: Remove SimpleFontData::create only used by SVG Fonts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 enum Pitch { UnknownPitch, FixedPitch, VariablePitch }; 51 enum Pitch { UnknownPitch, FixedPitch, VariablePitch };
52 52
53 class PLATFORM_EXPORT SimpleFontData : public FontData { 53 class PLATFORM_EXPORT SimpleFontData : public FontData {
54 public: 54 public:
55 // Used to create platform fonts. 55 // Used to create platform fonts.
56 static PassRefPtr<SimpleFontData> create(const FontPlatformData& platformDat a, PassRefPtr<CustomFontData> customData = nullptr, bool isTextOrientationFallba ck = false) 56 static PassRefPtr<SimpleFontData> create(const FontPlatformData& platformDat a, PassRefPtr<CustomFontData> customData = nullptr, bool isTextOrientationFallba ck = false)
57 { 57 {
58 return adoptRef(new SimpleFontData(platformData, customData, isTextOrien tationFallback)); 58 return adoptRef(new SimpleFontData(platformData, customData, isTextOrien tationFallback));
59 } 59 }
60 60
61 // Used to create SVG Fonts.
62 static PassRefPtr<SimpleFontData> create(PassRefPtr<CustomFontData> customDa ta, float fontSize, bool syntheticBold, bool syntheticItalic)
63 {
64 return adoptRef(new SimpleFontData(customData, fontSize, syntheticBold, syntheticItalic));
65 }
66
67 virtual ~SimpleFontData(); 61 virtual ~SimpleFontData();
68 62
69 const FontPlatformData& platformData() const { return m_platformData; } 63 const FontPlatformData& platformData() const { return m_platformData; }
70 #if ENABLE(OPENTYPE_VERTICAL) 64 #if ENABLE(OPENTYPE_VERTICAL)
71 const OpenTypeVerticalData* verticalData() const { return m_verticalData.get (); } 65 const OpenTypeVerticalData* verticalData() const { return m_verticalData.get (); }
72 #endif 66 #endif
73 67
74 PassRefPtr<SimpleFontData> smallCapsFontData(const FontDescription&) const; 68 PassRefPtr<SimpleFontData> smallCapsFontData(const FontDescription&) const;
75 PassRefPtr<SimpleFontData> emphasisMarkFontData(const FontDescription&) cons t; 69 PassRefPtr<SimpleFontData> emphasisMarkFontData(const FontDescription&) cons t;
76 PassRefPtr<SimpleFontData> brokenIdeographFontData() const; 70 PassRefPtr<SimpleFontData> brokenIdeographFontData() const;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 width = platformWidthForGlyph(glyph); 243 width = platformWidthForGlyph(glyph);
250 244
251 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 245 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
252 return width; 246 return width;
253 } 247 }
254 248
255 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 249 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
256 250
257 } // namespace blink 251 } // namespace blink
258 #endif // SimpleFontData_h 252 #endif // SimpleFontData_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698