OLD | NEW |
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 #include "ui/gfx/font_fallback_win.h" | 5 #include "ui/gfx/font_fallback_win.h" |
6 | 6 |
7 #include <dwrite_2.h> | 7 #include <dwrite_2.h> |
8 #include <usp10.h> | 8 #include <usp10.h> |
9 #include <wrl.h> | 9 #include <wrl.h> |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <map> | 12 #include <map> |
13 | 13 |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
| 17 #include "base/message_loop/message_loop.h" |
17 #include "base/profiler/scoped_tracker.h" | 18 #include "base/profiler/scoped_tracker.h" |
18 #include "base/strings/string_split.h" | 19 #include "base/strings/string_split.h" |
19 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
20 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
21 #include "base/win/registry.h" | 22 #include "base/win/registry.h" |
22 #include "base/win/scoped_comptr.h" | 23 #include "base/win/scoped_comptr.h" |
23 #include "ui/gfx/font.h" | 24 #include "ui/gfx/font.h" |
24 #include "ui/gfx/font_fallback.h" | 25 #include "ui/gfx/font_fallback.h" |
25 #include "ui/gfx/platform_font_win.h" | 26 #include "ui/gfx/platform_font_win.h" |
26 #include "ui/gfx/win/direct_write.h" | 27 #include "ui/gfx/win/direct_write.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 base::string16 name; | 409 base::string16 name; |
409 if (FAILED(GetFamilyNameFromDirectWriteFont(mapped_font.get(), &name))) | 410 if (FAILED(GetFamilyNameFromDirectWriteFont(mapped_font.get(), &name))) |
410 return false; | 411 return false; |
411 *result = Font(base::UTF16ToUTF8(name), font.GetFontSize() * scale); | 412 *result = Font(base::UTF16ToUTF8(name), font.GetFontSize() * scale); |
412 return true; | 413 return true; |
413 } | 414 } |
414 return false; | 415 return false; |
415 } | 416 } |
416 | 417 |
417 } // namespace gfx | 418 } // namespace gfx |
OLD | NEW |