First page of the CSS archive.

Add A Custom Font

Posted by The Doctor on Feb 27, 2012 with No Comments | Short Link
in Tips, Typography
as , ,

Using @font-face …

  1. Find the font you like
  2. Make sure the font license allows you to use it!
  3. Upload the font to your site / include with your theme package.
  4. Write the CSS.

OK … that seems simple enough, four relatively easy steps to follow. Let’s give it a run.

Step 1, I went to Google Web Fonts and browsed for something I liked; I chose “Glass Antiqua” by Denis Masharov1.

Step 2, the font is licensed under the SIL Open Font License, Version 1.1, which is compatible with the GNU GPLv2 License (something I strive to release all projects under).

Step 3, I uploaded the font and license text to my current theme’s font folder.

Step 4, I made the necessary CSS modifications to, in this case, change the site’s title font.

@font-face {
  font-family: 'Glass Antiqua';
  src: url('fonts/GlassAntiqua-Regular.ttf') format('truetype');
}

#blog-title {
  /* font-family: "Copperplate Gothic Bold", Arial, sans-serif; */
  /* font-size: 30px; */
  font-family: "Glass Antiqua", cursive;
  font-size: 70px;
  ...

… and with a tweak to the `font-size` value, we’re done!

Very easy, and points for not having to worry about being behind a firewall, intranet or local test environment as this method will work in those cases as well.

To see the footnotes click here.To hide the footnotes click here.
Footnotes:
1. Please note the original design for Glass Antiqua, as noted by Denis Masharov, should be accredited to Franz Paul Glass. The Doctor

Strike Through Text

Posted by The Doctor on Apr 15, 2010 with No Comments | Short Link
in Tips
as , , , ,

A simple how-to for creating a strike-through text effect with an HTML tag or CSS.

Strike-through text using the <del> tag.

OK, that was really easy. Here is a reference at W3Schools that goes into all the details.

If you are using WordPress you will find the del button on the HTML editor screen. Of course the editor button conveniently drops a date and time stamp attribute into the <del> tag as well, so the above line looks like this under the page:

<del datetime="2010-04-15T13:41:32+00:00">Strike-through text</del>

The ABC button of the visual editor uses inline CSS to create the strike-through effect. Here is an example of what the above line would look like under the page:

<span style="text-decoration: line-through;">Strike-through text</span>

To see an example of how strike-through text can be used feel free to read the latest revision of WordPress 3.0 Navigation Menu Styles.

WordPress 3.0 Navigation Menu Styles

Posted by The Doctor on Mar 17, 2010 with No Comments | Short Link
Last modified by The Doctor on April 15, 2010
in Functions, Tips
as , , , , ,

A list of WordPress version 3.0 Navigation Menu default widget, and wp_nav_menu() function, generated CSS style elements.