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