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

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

Issue 2927953003: Use CTFontCreateForString for RenderTextHarfbuzz on Mac (Closed)
Patch Set: Fix views::Label tests Created 3 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
« no previous file with comments | « no previous file | ui/gfx/font_fallback_mac.mm » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_H_ 5 #ifndef UI_GFX_FONT_FALLBACK_H_
6 #define UI_GFX_FONT_FALLBACK_H_ 6 #define UI_GFX_FONT_FALLBACK_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h"
11 #include "build/build_config.h"
10 #include "ui/gfx/font.h" 12 #include "ui/gfx/font.h"
11 #include "ui/gfx/gfx_export.h" 13 #include "ui/gfx/gfx_export.h"
12 14
13 namespace gfx { 15 namespace gfx {
14 16
15 class Font; 17 class Font;
16 18
17 // Given a font, returns the fonts that are suitable for fallback. 19 // Given a font, returns the fonts that are suitable for fallback.
18 GFX_EXPORT std::vector<Font> GetFallbackFonts(const Font& font); 20 GFX_EXPORT std::vector<Font> GetFallbackFonts(const Font& font);
19 21
22 #if defined(OS_MACOSX) || defined(OS_WIN)
23
24 // Finds a fallback font to render the specified |text| with respect to an
25 // initial |font|. Returns the resulting font via out param |result|. Returns
26 // |true| if a fallback font was found.
27 bool GFX_EXPORT GetFallbackFont(const Font& font,
28 const base::char16* text,
29 int text_length,
30 Font* result);
31
32 #endif
33
20 } // namespace gfx 34 } // namespace gfx
21 35
22 #endif // UI_GFX_FONT_FALLBACK_H_ 36 #endif // UI_GFX_FONT_FALLBACK_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/font_fallback_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698