font_names_testing.cc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ui/gfx/font_names_testing.h"
  5. #include "build/build_config.h"
  6. namespace gfx {
  7. /*
  8. Reference for fonts available on Android:
  9. Jelly Bean:
  10. https://android.googlesource.com/platform/frameworks/base/+/jb-release/data/fonts/system_fonts.xml
  11. KitKat:
  12. https://android.googlesource.com/platform/frameworks/base/+/kitkat-release/data/fonts/system_fonts.xml
  13. master:
  14. https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml
  15. Note that we have to support the full range from JellyBean to the latest
  16. dessert.
  17. */
  18. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
  19. const char kTestFontName[] = "Arimo";
  20. #elif BUILDFLAG(IS_ANDROID)
  21. const char kTestFontName[] = "sans-serif";
  22. #else
  23. const char kTestFontName[] = "Arial";
  24. #endif
  25. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
  26. const char kSymbolFontName[] = "DejaVu Sans";
  27. #elif BUILDFLAG(IS_ANDROID)
  28. const char kSymbolFontName[] = "monospace";
  29. #elif BUILDFLAG(IS_WIN)
  30. const char kSymbolFontName[] = "Segoe UI Symbol";
  31. #else
  32. const char kSymbolFontName[] = "Symbol";
  33. #endif
  34. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
  35. const char kCJKFontName[] = "Noto Sans CJK JP";
  36. #elif BUILDFLAG(IS_ANDROID)
  37. const char kCJKFontName[] = "serif";
  38. #elif BUILDFLAG(IS_APPLE)
  39. const char kCJKFontName[] = "Heiti SC";
  40. #else
  41. const char kCJKFontName[] = "SimSun";
  42. #endif
  43. } // namespace gfx