ThesisAPISkinProperties$functionality → Google Fonts

Google Fonts

Google Fonts can be added to any Skin by way of the $functionality property and the fonts_google parameter:

public $functionality = array(
	'fonts_google' => true
);

After activating Google Fonts in your Skin, Google Fonts will appear with a (G) next to them in font <select> dropdowns in the Design Options.

Obviously: All official Thesis Skins from DIYthemes come equipped with Google Fonts functionality.

How to Add Google Fonts to Thesis

By default, Thesis includes all Google Fonts that come in 400, 400 italic, and 700 weights (see the full list below).

If you’d like to add other Google Fonts to Thesis, you can do so via the thesis_google_fonts array filter, which accepts items in a special format.

In the following example, I’ll illustrate how you can add Google Fonts to any Thesis site with a simple custom filter method:

add_filter('thesis_google_fonts', 'add_google_fonts');

function add_google_fonts($fonts) {
	$fonts['Dosis'] = array(
		'styles' => '400,700',
		'type' => 'sans-serif',
		'x' => false,
		'mu' => false);
	return $fonts;
}

In the code above, Dosis is the name of the Google Font being added. In order for this font to work properly, you must use the precise name Google uses to refer to its fonts.

Now let’s look at the parameters:

  • styles — whatever styles you want to include should be comma-separated here
    • To indicate an italic style, you would use: 400i
  • type — (optional) serif, sans-serif, or monospace
  • x — (optional) if you know this font’s x-height ratio, include it here
  • mu — (optional) if you know the character constant for this font, include it here

Pro tip: You can omit any parameters set to false. For example, there’s no need to include the x or mu parameters in the sample code above.

Default Google Fonts in Thesis

The following Google Fonts all contain 400, 400i, and 700 styles, which are the minimum styles necessary to render typical website content:

  1. Alegreya
  2. Alegreya SC
  3. Alegreya Sans
  4. Alegreya Sans SC
  5. Almendra
  6. Amaranth
  7. Amiri
  8. Anonymous Pro
  9. Archivo
  10. Archivo Narrow
  11. Arimo
  12. Arsenal
  13. Arvo
  14. Asap
  15. Asap Condensed
  16. Averia Libre
  17. Averia Sans Libre
  18. Averia Serif Libre
  19. Barlow
  20. Barlow Semi Condensed
  21. Bitter
  22. Cabin
  23. Cambay
  24. Cantarell
  25. Cardo
  26. Caudex
  27. Chivo
  28. Cormorant
  29. Cormorant Garamond
  30. Cormorant Infant
  31. Cousine
  32. Crimson Text
  33. Cuprum
  34. Droid Serif
  35. EB Garamond
  36. Economica
  37. Exo
  38. Exo 2
  39. Expletus Sans
  40. Faustina
  41. Fira Sans
  42. Fira Sans Condensed
  43. Fira Sans Extra Condensed
  44. Gentium Basic
  45. Gentium Book Basic
  46. Gudea
  47. Istok Web
  48. Josefin Sans
  49. Josefin Slab
  50. Judson
  51. Kanit
  52. Karla
  53. Lato
  54. Lekton
  55. Libre Baskerville
  56. Libre Franklin
  57. Lobster Two
  58. Lora
  59. Manuale
  60. Marvel
  61. Merriweather
  62. Merriweather Sans
  63. Montserrat
  64. Montserrat Alternates
  65. Muli
  66. Neuton
  67. Nobile
  68. Noticia Text
  69. Noto Sans
  70. Noto Serif
  71. Nunito
  72. Nunito Sans
  73. Old Standard TT
  74. Open Sans
  75. Overlock
  76. Overpass
  77. Philosopher
  78. Playfair Display
  79. Playfair Display SC
  80. Poppins
  81. Prompt
  82. Proza Libre
  83. PT Sans
  84. PT Serif
  85. Puritan
  86. Quantico
  87. Quattrocento Sans
  88. Raleway
  89. Rambla
  90. Roboto
  91. Roboto Condensed
  92. Roboto Mono
  93. Roboto Slab
  94. Rosario
  95. Rubik
  96. Sansita
  97. Scada
  98. Share
  99. Source Sans Pro
  100. Space Mono
  101. Spectral
  102. Spectral SC
  103. Taviraj
  104. Tinos
  105. Titillium Web
  106. Trirong
  107. Trochut
  108. Ubuntu
  109. Ubuntu Mono
  110. Unna
  111. Volkhov
  112. Vollkorn
  113. Zilla Slab