Font and Type Override

8 replies [Last post]
M.E.Traylor's picture
M.E.Traylor
User offline. Last seen 21 weeks 1 day ago. Offline
Joined: 07/09/2010

I am just full of technical questions today.

Does anyone know how to override default fonts and typefaces for Drupal themes? Is it theme dependent? I tried using html with size and font values, but nothing happened, and it overrode the italics tags I already had. Being able to use multiple fonts in a piece is important to the function of the story because I'm using different fonts to distinguish different languages.

Any suggestions or experiences with this?

Thanks everyone!

__________________

Guts and Sass: An Anti-Epic

Guts and Sass is the story of when semi-suicidal vet Hannah Roverton gets transported to a magical land, thus abandoning her cat, her sister, and her therapist. Except actually, it’s not. Welcome to a land embroiled in war and invasion with a pinch of magic, meet pirates, shapeshifters, and chicks with swords. Now throw your expectations out the window. Got no heroes, no glory, and it ain’t no lie.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Gabriel Gadfly's picture
Gabriel Gadfly
User offline. Last seen 47 weeks 20 hours ago. Offline
Joined: 10/27/2009

Those details are usually theme dependent. Within your sites/themes/yourtheme/ directory should be a CSS file (often, style.css, or if you're using a child theme, yourthemename.css), and you would set your font size, type, and color within that like any CSS document.

If you need to override those defaults for something else, you can always wrap the text in a div or span with a custom style when you write the actual post. I do this frequently on my site -- most of my site is done in Georgia, but for certain poems, I need a monospaced font, so I wrap those poems in a div set with font-family: Courier New.

Does that help? I can try to explain a little clearer if not.

M.E.Traylor's picture
M.E.Traylor
User offline. Last seen 21 weeks 1 day ago. Offline
Joined: 07/09/2010

Hey Gabriel,

Yeah that definitely gives me a better idea of what's going on. Once I access the CSS file, can I change the fonts directly, or should I stick to div/span's? I'd like to make the text on my site bigger overall for readability. I was just introduced to the span commands through some customization with the theme I'm using.

Gabriel Gadfly wrote:
I wrap those poems in a div set with font-family: Courier New.

Could you write out the syntax for that (with a size variable if possible?). Then I can monkey around with it and see what works for me.

Thanks!

__________________

Guts and Sass: An Anti-Epic

Guts and Sass is the story of when semi-suicidal vet Hannah Roverton gets transported to a magical land, thus abandoning her cat, her sister, and her therapist. Except actually, it’s not. Welcome to a land embroiled in war and invasion with a pinch of magic, meet pirates, shapeshifters, and chicks with swords. Now throw your expectations out the window. Got no heroes, no glory, and it ain’t no lie.

MeiLin's picture
MeiLin
User is online Online
Joined: 09/20/2009

To make your font size bigger overall, specify the font size you want in the body spec in your CSS file.

A good cheat sheet to CSS specs: http://www.htmlhelp.com/reference/css/

If you use Firefox, I suggest getting the extension Firebug. Once installed, it will let you right-click on any part of the page and choose to see its specific CSS and what style sheet it's coming from. Makes editing/overriding style sheets infinitely easier.

__________________

An Intimate History of the Greater Kingdom
WebLit.Us:
Helping the Web Literati Spread the Word by Helping One Another
DigitalNovelists.com: Web Services for WebLit

M.E.Traylor's picture
M.E.Traylor
User offline. Last seen 21 weeks 1 day ago. Offline
Joined: 07/09/2010

Thanks for the references MeiLin!

__________________

Guts and Sass: An Anti-Epic

Guts and Sass is the story of when semi-suicidal vet Hannah Roverton gets transported to a magical land, thus abandoning her cat, her sister, and her therapist. Except actually, it’s not. Welcome to a land embroiled in war and invasion with a pinch of magic, meet pirates, shapeshifters, and chicks with swords. Now throw your expectations out the window. Got no heroes, no glory, and it ain’t no lie.

M.E.Traylor's picture
M.E.Traylor
User offline. Last seen 21 weeks 1 day ago. Offline
Joined: 07/09/2010

Hey there,

I've been experimenting with div and span and I'm still having trouble.

In my style.css sheet, under typography, I have:

.seclednar {
font-family: Calligraph810 BT;
font-size: 13 pt;

}

When I put in a div tag like below, I'm still not getting any change (my filter is set to full html).

< div class="Seclednar">Text text text< /div>

I've also tried:

< span style="font-family: Calligraph810 BT;">Text Text Text< /span>

and

< P STYLE="font-family: Calligraph810 BT">text text text< /P>

With no result (sans spaces, I did that so they'd show up).

A span tag for font-size has worked, which just left me confused.

I'm not sure if I'm missing something fundamental (I'm basically copy-pasting from a tutorial), putting the div block in the wrong area of the style sheet, or if the theme is somehow overriding it. When I look at it in Firebug everything appears to be there. Do I need to enable unusual fonts somewhere?

These are the tutorials I've been using:

Any suggestions? Thanks for your help!

UPDATE: Okay, for some reason putting the div/span syntax in the page itself doesn't give me results, but editing it in Firebug does. Still a glitch though: When I try to use Calligrapher810 BT, the font changes, but not to the correct font, like it isn't available or something. Is this browser or style sheet dependent?

__________________

Guts and Sass: An Anti-Epic

Guts and Sass is the story of when semi-suicidal vet Hannah Roverton gets transported to a magical land, thus abandoning her cat, her sister, and her therapist. Except actually, it’s not. Welcome to a land embroiled in war and invasion with a pinch of magic, meet pirates, shapeshifters, and chicks with swords. Now throw your expectations out the window. Got no heroes, no glory, and it ain’t no lie.

MeiLin's picture
MeiLin
User is online Online
Joined: 09/20/2009

Show me the page.

__________________

An Intimate History of the Greater Kingdom
WebLit.Us:
Helping the Web Literati Spread the Word by Helping One Another
DigitalNovelists.com: Web Services for WebLit

M.E.Traylor's picture
M.E.Traylor
User offline. Last seen 21 weeks 1 day ago. Offline
Joined: 07/09/2010

Hi Meilin,

Here's an example of the span tag: http://metraylor.com/water1

I used the span tag for Georgia.

One thing I noticed trying to edit the font in Firebug was that it only wanted to let me do it one paragraph at at time, which didn't seem very efficient. In the body I put the /span tag at the end, and in Firebug it shows up at the end of the first line. When I tried using a WYSIWYG editor, it did something similar, which you can see at http://metraylor.com/beginning.

For an example of the div tag: http://metraylor.com/credits

Thanks for checking it out!

UPDATE: Hmm... I just had a sneaking suspicion and went and checked the page on the other computer. My div tag appears to be working there, but not the span tag. Well, it's progress!

__________________

Guts and Sass: An Anti-Epic

Guts and Sass is the story of when semi-suicidal vet Hannah Roverton gets transported to a magical land, thus abandoning her cat, her sister, and her therapist. Except actually, it’s not. Welcome to a land embroiled in war and invasion with a pinch of magic, meet pirates, shapeshifters, and chicks with swords. Now throw your expectations out the window. Got no heroes, no glory, and it ain’t no lie.

M.E.Traylor's picture
M.E.Traylor
User offline. Last seen 21 weeks 1 day ago. Offline
Joined: 07/09/2010

*Glee*

I have managed to get the fonts to do everything I want them to. I don't know if you got to looking at it or not Meilin, but thanks for being open to checking it out. Thanks everyone who commented, giving me inspiration to bang my head against the wall in marginally different ways.

__________________

Guts and Sass: An Anti-Epic

Guts and Sass is the story of when semi-suicidal vet Hannah Roverton gets transported to a magical land, thus abandoning her cat, her sister, and her therapist. Except actually, it’s not. Welcome to a land embroiled in war and invasion with a pinch of magic, meet pirates, shapeshifters, and chicks with swords. Now throw your expectations out the window. Got no heroes, no glory, and it ain’t no lie.

Recent comments

Who's new

  • jasimine957
  • wholesaleeuropeancup
  • AliciaWorkman
  • mrjersyes44
  • xiaoebw6
  • chrisjaybecker
  • Soccer Jerseys ...

Who's online

There is currently 1 user and 1 guest online.

Online users

  • MeiLin