Some fonts can be made more effective in bigger sizes or by applying font effects but that would be too much for this overview.
Enjoy and find your font.
A collection of mostly software related bits and pieces out of my world (UNIX, scripting, OpenOffice.org, etc.)
Some fonts can be made more effective in bigger sizes or by applying font effects but that would be too much for this overview.
Enjoy and find your font.
I thought it worthwhile to capture the essence of using fonts and also I wanted to see if I could use Google fonts in this blog.
Using Google fonts boils down to three things actually:
<link href="https://fonts.googleapis.com/css?family=Amarante" rel="stylesheet">
<style>
.coolFont { font-family: Amarante }
</style>
< ... class="coolFont" ... >
Here is a Javascript code snippet (which I actually included in the HTML text) which dynamically loads three fonts and defines three correponding styles. It applies each of the styles to an h1 element.
<script>
var fonts = [ 'Acme', 'Amarante', 'Audiowide' ]
for( i=0; i<fonts.length; i++ ) {
var style = document.createElement( 'STYLE' );
// Define class style '.font0', '.font1' etc.
style.innerHTML = ".font" + i + "{ font-family: " + fonts[i] + ";}"
document.getElementsByTagName('head')[0].appendChild( style );
var link = document.createElement( 'LINK' );
link.setAttribute( 'href', 'https://fonts.googleapis.com/css?family=' + encodeURI( fonts[i] ) );
link.setAttribute( 'rel', "stylesheet" ) ;
document.getElementsByTagName('head')[0].appendChild( link );
}
</script>
<h1 class="font0">Cool font, dude! </h1>
<h1 class="font1">Cool font, dude! </h1>
<h1 class="font2">Cool font, dude! </h1>
This will create a links like this
<link href="https://fonts.googleapis.com/css?family=Amarante" rel="stylesheet">and styles
.font1 {
font-family: Amarante;
}
and here is the result