Skip to content

Instantly share code, notes, and snippets.

@Chrisedmo
Created August 21, 2012 11:10
Show Gist options
  • Save Chrisedmo/3414575 to your computer and use it in GitHub Desktop.
Save Chrisedmo/3414575 to your computer and use it in GitHub Desktop.
Shopify: Google font loader
<tr>
<td><label for="logo_font">Logo Font</label></td>
<td>
<select name="logo_font" id="logo_font">
<optgroup label="Sans-serif">
<option value="'Helvetica Neue', Helvetica, Arial, sans-serif" selected="selected">Helvetica/Arial</option>
<option value="Impact, Charcoal, Helvetica, Arial, sans-serif">Impact</option>
<option value="'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Lucida, Helvetica, Arial, sans-serif">Lucida Grande</option>
<option value="Trebuchet MS, sans-serif">Trebuchet MS</option>
<option value="Verdana, Helvetica, Arial, sans-serif">Verdana</option>
<option value="Google_Asap_400_sans">Asap Normal 400</option>
<option value="Google_Cabin_400_sans">Cabin Semi-Bold 600</option>
<option value="Google_Molengo_400_sans">Molengo Normal 400</option>
<option value="Google_Open+Sans:600_600_sans">Open Sans Semi Bold 600</option>
<option value="Google_PT+Sans_400_sans">PT Sans Normal 400</option>
<option value="Google_Ubuntu:500_500_sans">Ubuntu Medium 500</option>
</optgroup>
<optgroup label="Serif">
<option value="Garamond, Baskerville, Caslon, serif">Garamond</option>
<option value="Georgia, Utopia, 'Times New Roman', Times, serif">Georgia</option>
<option value="Palatino, 'Palatino Linotype', 'Book Antiqua', serif">Palatino</option>
<option value="'Times New Roman', Times, serif">Times New Roman</option>
<option value="Google_Droid+Serif_400_serif">Droid Serif Normal 400</option>
</optgroup>
<optgroup label="Monospace">
<option value="'Courier New', Courier, monospace">Courier New</option>
<option value="Monaco, 'Lucida Console', 'DejaVu Sans Mono', monospace">Monaco/Lucida Console</option>
</optgroup>
<optgroup label="Fancy">
<option value="Google_Cabin+Sketch_400_sans">Cabin Sketch Normal 400</option>
<option value="Google_Pompiere_400_sans">Pompiere Normal 400</option>
<option value="Google_Shadows+Into+Light_400_sans">Shadows Into Light Normal 400</option>
</optgroup>
</select>
</td>
</tr>
{% if settings.logo_font contains 'Google' %}
{% assign logo_font_parts = settings.logo_font | split: '_' %}
<link href='http://fonts.googleapis.com/css?family={{ logo_font_parts[1] }}' rel='stylesheet' type='text/css'>
{% endif %}
{% if settings.logo_font contains 'Google' %}
{% assign logo_font_parts = settings.logo_font | split: '_' %}
<link href='http://fonts.googleapis.com/css?family={{ logo_font_parts[1] }}' rel='stylesheet' type='text/css'>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment