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 <map> | 11 #include <map> |
12 | 12 |
13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/singleton.h" | 15 #include "base/memory/singleton.h" |
| 16 #include "base/message_loop/message_loop.h" |
16 #include "base/profiler/scoped_tracker.h" | 17 #include "base/profiler/scoped_tracker.h" |
17 #include "base/strings/string_split.h" | 18 #include "base/strings/string_split.h" |
18 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
19 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
20 #include "base/win/registry.h" | 21 #include "base/win/registry.h" |
21 #include "base/win/scoped_comptr.h" | 22 #include "base/win/scoped_comptr.h" |
22 #include "ui/gfx/font.h" | 23 #include "ui/gfx/font.h" |
23 #include "ui/gfx/font_fallback.h" | 24 #include "ui/gfx/font_fallback.h" |
24 #include "ui/gfx/platform_font_win.h" | 25 #include "ui/gfx/platform_font_win.h" |
25 #include "ui/gfx/win/direct_write.h" | 26 #include "ui/gfx/win/direct_write.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 base::string16 name; | 402 base::string16 name; |
402 if (FAILED(GetFamilyNameFromDirectWriteFont(mapped_font.get(), &name))) | 403 if (FAILED(GetFamilyNameFromDirectWriteFont(mapped_font.get(), &name))) |
403 return false; | 404 return false; |
404 *result = Font(base::UTF16ToUTF8(name), font.GetFontSize() * scale); | 405 *result = Font(base::UTF16ToUTF8(name), font.GetFontSize() * scale); |
405 return true; | 406 return true; |
406 } | 407 } |
407 return false; | 408 return false; |
408 } | 409 } |
409 | 410 |
410 } // namespace gfx | 411 } // namespace gfx |
OLD | NEW |