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

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

Issue 331713003: RenderTextHarfBuzz: Implement font fallback for Win and Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests; add placeholder impl for Mac Created 6 years, 6 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
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
(...skipping 11 matching lines...) Expand all
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 GFX_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 GFX_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
33
34 // Iterator over linked fallback fonts for a given font. The linked font chain 32 // Iterator over linked fallback fonts for a given font. The linked font chain
35 // comes from the Windows registry, but gets cached between uses. 33 // comes from the Windows registry, but gets cached between uses.
36 class GFX_EXPORT LinkedFontsIterator { 34 class GFX_EXPORT LinkedFontsIterator {
37 public: 35 public:
38 // Instantiates the iterator over the linked font chain for |font|. The first 36 // Instantiates the iterator over the linked font chain for |font|. The first
39 // item will be |font| itself. 37 // item will be |font| itself.
40 explicit LinkedFontsIterator(Font font); 38 explicit LinkedFontsIterator(Font font);
41 virtual ~LinkedFontsIterator(); 39 virtual ~LinkedFontsIterator();
42 40
43 // Sets the font that would be returned by the next call to |NextFont()|, 41 // Sets the font that would be returned by the next call to |NextFont()|,
(...skipping 26 matching lines...) Expand all
70 68
71 // List of linked fonts; weak pointer. 69 // List of linked fonts; weak pointer.
72 const std::vector<Font>* linked_fonts_; 70 const std::vector<Font>* linked_fonts_;
73 71
74 // Index of the current entry in the |linked_fonts_| list. 72 // Index of the current entry in the |linked_fonts_| list.
75 size_t linked_font_index_; 73 size_t linked_font_index_;
76 74
77 DISALLOW_COPY_AND_ASSIGN(LinkedFontsIterator); 75 DISALLOW_COPY_AND_ASSIGN(LinkedFontsIterator);
78 }; 76 };
79 77
78 } // namespace internal
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

Powered by Google App Engine
This is Rietveld 408576698