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