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

Side by Side Diff: ui/gfx/font_fallback_win.h

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/font.h ('k') | ui/gfx/font_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_FONT_FALLBACK_WIN_H_ 5 #ifndef UI_GFX_FONT_FALLBACK_WIN_H_
6 #define UI_GFX_FONT_FALLBACK_WIN_H_ 6 #define UI_GFX_FONT_FALLBACK_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ui/gfx/font.h" 11 #include "ui/gfx/font.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 14
15 // Internals of font_fallback_win.cc exposed for testing. 15 // Internals of font_fallback_win.cc exposed for testing.
16 namespace internal { 16 namespace internal {
17 17
18 // Parses comma separated SystemLink |entry|, per the format described here: 18 // Parses comma separated SystemLink |entry|, per the format described here:
19 // http://msdn.microsoft.com/en-us/goglobal/bb688134.aspx 19 // http://msdn.microsoft.com/en-us/goglobal/bb688134.aspx
20 // 20 //
21 // Sets |filename| and |font_name| respectively. If a field is not present 21 // Sets |filename| and |font_name| respectively. If a field is not present
22 // or could not be parsed, the corresponding parameter will be cleared. 22 // or could not be parsed, the corresponding parameter will be cleared.
23 void UI_EXPORT ParseFontLinkEntry(const std::string& entry, 23 void GFX_EXPORT ParseFontLinkEntry(const std::string& entry,
24 std::string* filename, 24 std::string* filename,
25 std::string* font_name); 25 std::string* font_name);
26 26
27 // Parses a font |family| in the format "FamilyFoo & FamilyBar (TrueType)". 27 // Parses a font |family| in the format "FamilyFoo & FamilyBar (TrueType)".
28 // Splits by '&' and strips off the trailing parenthesized expression. 28 // Splits by '&' and strips off the trailing parenthesized expression.
29 void UI_EXPORT ParseFontFamilyString(const std::string& family, 29 void GFX_EXPORT ParseFontFamilyString(const std::string& family,
30 std::vector<std::string>* font_names); 30 std::vector<std::string>* font_names);
31 31
32 } // namespace internal 32 } // namespace internal
33 33
34 // Iterator over linked fallback fonts for a given font. The linked font chain 34 // Iterator over linked fallback fonts for a given font. The linked font chain
35 // comes from the Windows registry, but gets cached between uses. 35 // comes from the Windows registry, but gets cached between uses.
36 class UI_EXPORT LinkedFontsIterator { 36 class GFX_EXPORT LinkedFontsIterator {
37 public: 37 public:
38 // Instantiates the iterator over the linked font chain for |font|. The first 38 // Instantiates the iterator over the linked font chain for |font|. The first
39 // item will be |font| itself. 39 // item will be |font| itself.
40 explicit LinkedFontsIterator(Font font); 40 explicit LinkedFontsIterator(Font font);
41 virtual ~LinkedFontsIterator(); 41 virtual ~LinkedFontsIterator();
42 42
43 // Sets the font that would be returned by the next call to |NextFont()|, 43 // Sets the font that would be returned by the next call to |NextFont()|,
44 // useful for inserting one-time entries into the iterator chain. 44 // useful for inserting one-time entries into the iterator chain.
45 void SetNextFont(Font font); 45 void SetNextFont(Font font);
46 46
(...skipping 26 matching lines...) Expand all
73 73
74 // Index of the current entry in the |linked_fonts_| list. 74 // Index of the current entry in the |linked_fonts_| list.
75 size_t linked_font_index_; 75 size_t linked_font_index_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(LinkedFontsIterator); 77 DISALLOW_COPY_AND_ASSIGN(LinkedFontsIterator);
78 }; 78 };
79 79
80 } // namespace gfx 80 } // namespace gfx
81 81
82 #endif // UI_GFX_FONT_FALLBACK_WIN_H_ 82 #endif // UI_GFX_FONT_FALLBACK_WIN_H_
OLDNEW
« no previous file with comments | « ui/gfx/font.h ('k') | ui/gfx/font_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698