| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/platform_font_gtk.h" | 5 #include "ui/gfx/platform_font_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <fontconfig/fontconfig.h> | 8 #include <fontconfig/fontconfig.h> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <pango/pango.h> | 10 #include <pango/pango.h> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/string_piece.h" | 14 #include "base/string_piece.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "third_party/skia/include/core/SkTypeface.h" | 16 #include "third_party/skia/include/core/SkTypeface.h" |
| 17 #include "third_party/skia/include/core/SkPaint.h" | 17 #include "third_party/skia/include/core/SkPaint.h" |
| 18 #include "ui/gfx/canvas_skia.h" | 18 #include "ui/gfx/canvas_skia.h" |
| 19 #include "ui/gfx/font.h" | 19 #include "ui/gfx/font.h" |
| 20 #include "ui/gfx/gtk_util.h" | 20 #include "ui/gfx/linux_util.h" |
| 21 | 21 |
| 22 #if !defined(USE_WAYLAND) | 22 #if !defined(USE_WAYLAND) |
| 23 #include <gdk/gdk.h> | 23 #include <gdk/gdk.h> |
| 24 #include <gtk/gtk.h> | 24 #include <gtk/gtk.h> |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // The font family name which is used when a user's application font for | 29 // The font family name which is used when a user's application font for |
| 30 // GNOME/KDE is a non-scalable one. The name should be listed in the | 30 // GNOME/KDE is a non-scalable one. The name should be listed in the |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 return new PlatformFontGtk(native_font); | 462 return new PlatformFontGtk(native_font); |
| 463 } | 463 } |
| 464 | 464 |
| 465 // static | 465 // static |
| 466 PlatformFont* PlatformFont::CreateFromNameAndSize(const string16& font_name, | 466 PlatformFont* PlatformFont::CreateFromNameAndSize(const string16& font_name, |
| 467 int font_size) { | 467 int font_size) { |
| 468 return new PlatformFontGtk(font_name, font_size); | 468 return new PlatformFontGtk(font_name, font_size); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace gfx | 471 } // namespace gfx |
| OLD | NEW |