Embedding different Fonts in Moodle - Help Needed!

Embedding different Fonts in Moodle - Help Needed!

by W Page -
Number of replies: 18

Hi Everyone!!

I would like to use some different fonts on a Moodle site I am working on.  I want the block headers to have a different font than the text in the block contents.  This font will not be on everyone's computer. I think I have to do something called "embedding" the font into the site to get it to display correctly on the computers of all who visit the site.

How do I do this?

Thanks in advance for any and all help with this.

WP1

Average of ratings: -
In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by N Hansen -
If you google "embedded fonts" you will find a lot about this topic. I was considering doing it on my site and decided against it because of all the potential troubles. In my case, the font I needed to use (in my html editor) has an alternative notation system that can be displayed in any font. So what I did was simply to offer the font for download on my site, and specified a serif font for those who don't have it in the list of fonts for the html editor. They will see something different, but still acceptable. That won't solve your problem but you really need to weigh the disadvantages of embedding fonts simply to get a "look" on your site. I decided it wasn't worth it even for a definite technical need.
In reply to N Hansen

Re: Embedding different Fonts in Moodle - Help Needed!

by W Page -

Hi N!

Thanks for your response.  I know there is a lot of stuff out there about embedding a font but I wanted to know if there is a certain "approach" to doing it in Moodle, especially in light of all the changes that have taken place with the Themes and CSS.

Hopefully, Urs will also weigh in on this and let us know how hard or how easy it is to do in the present (v1.5) Moodle.

WP1

In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by N Hansen -
It has been done in 1.5. Look at the words "Using Moodle" in the upper left corner of this window.
In reply to N Hansen

Re: Embedding different Fonts in Moodle - Help Needed!

by W Page -

Hi N!

Yes it looks like something is different with the type style.  How'd they do that?  Huuuummmmmmm!

WP1

In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by N Hansen -
I'm sure it is embedded because I remember reading this somewhere ages ago. But since the theme on the Moodle.org site currently is not available, it's kind of hard to check it. But if you check out the 1.4 standard theme, you might find it in there.
In reply to N Hansen

Re: Embedding different Fonts in Moodle - Help Needed!

by Michael Penney -
Isn't that arial? Are you talking about the drop shadow effect? Looks like an offset div to me.

<td class="headermain" height="31" nowrap="nowrap" valign="top" width="50%">
<div style="position: absolute; margin-left: 6px; margin-top: 1px; color: rgb(34, 34, 34);"> Using Moodle</div>
<div style="position: absolute; margin-left: 5px; margin-top: 0px; color: rgb(223, 138, 0);"> Using Moodle</div>
</td>
Using Moodle (arial bold)
In reply to Michael Penney

Re: Embedding different Fonts in Moodle - Help Needed!

by W Page -

Thanks Michael P!

I really learned something here.  But, I just gotta say this CSS stuff is really sending me crazy. wide eyes surprise mixed wide eyes surprise mixed wide eyes surprise surprise surprise surprise 

WP1

In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by Urs Hunkler -
Picture of Core developers

Hi WP1,

sorry for answering late. I have been very busy the last days.

I have followed the discussions on the web concerning FIR, sFIR and many other similar methods. All have their pros and cons, but none is perfect. A collection you can find on css-discuss ImageReplacement.

I had made some extensive efforts in a project to find a way to make it possible for a client to use his corporate font with Microsoft PowerPoint. I was sure there is a way if I only look and ask long enough. I was not successful because there is no way - either the solution didn't work technically or it was illegal or the employees could not handle the technique.

Since that time I am very careful with non standard techniques and these image replacements are more or less tricks - very interesting tricks indeed.

I would like to suggest that you think about going the secure way. First build your Moodle site with standards. When you have it running you could start to use the newest and best tested of these image replacement techniques to make your site "better looking".

I hope I could help you.
Urs

In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by David Scotson -

I would recommend you look into something called sIFR.

It allows you to use any font you like, and creates a small flash movie of exactly the right size to replace the text you specify with a certain class.

It's an ideal tool for adding typographical richness to headlines without sacrificing broad compatability, accessability or giving yourself a great deal of work.

I've been meaning to integrate this into Moodle for a while, but Flash isn't really my thing. It may take a bit of savvy to get it to work, but I know there's a few flash-heads around here and I'd say it's much less of a dead-end than embedding fonts.

In reply to David Scotson

Re: Embedding different Fonts in Moodle - Help Needed!

by W Page -

Hi David S!

This looks soooooooo cool!  I just do not know if I have the "know how" to incorporate this into the Moodle I am working on.  I will try however.

WP1

In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You cannot embed fonts in HTML as HTML is meerly a description of how a page should appear. It leaves the rendering to the client. Thus you can include a description of a font you would like to appear, but if the client doesn not have that font it will replace it with its best guess.

Although you certainly can use flash to place exactly the font you want onto a page, you could as easily use a graphic format such as gif/png/jpg. This brings the advantage that absolutly every graphical web client will support it (some systems do not have flash support) and there is a vast array of tools for manipulating those file formats. By contrast there are not so many tools for manipulating flash and the market leaders are expensive.
In reply to Marcus Green

Re: Embedding different Fonts in Moodle - Help Needed!

by W Page -

Hi Marcus!

Thanks for your input.  What gif/png/jpg manipulating tools would you recommend.  This would give me a start into the process of assessing these tools.

WP1

In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by Jamie Pratt -
Hi,

You can use GD which you probably have on your server to create gifs and jpgs on the fly with text in a font on your server. I'm not sure about GDs support for non English character sets though if that is what you want to use. Since the GD software is on your server though it doesn't require anything of your users.

You will need the Flash software to create a Flash movie to use with sifr. But then you will only need to author one movie for each font you need to use.

It would probably be possible to author a movie for use with sifr using some of the new open source Flash compilers but since the explanations of how to do author a movie for use with sifr assume you are using the Flash authoring enviroment it would not be easy for a beginner to use the open source compilers.

Jamie
In reply to Jamie Pratt

Re: Embedding different Fonts in Moodle - Help Needed!

by Jaime Villate -
Another problem with flash is that even if there is a plug-in available for
your system, some of us cannot use it because we do not agree with its very
restrictive license terms.

If you want your content to be available to a larger audience, it is best to
stick to web standards.
In reply to Jaime Villate

Re: Embedding different Fonts in Moodle - Help Needed!

by David Scotson -

Note that sIFR technique degrades gracefully, presenting standard text to non-visual browsers as well as those with flash or javascript unavailable or turned off. They estimate (correctly in my view) that sIFR reaches 90% of web browsers and since it is purely presentational, no functionality is denied to that remaining 10%. This is not the case with most standard uses of Flash.

In reply to David Scotson

Re: Embedding different Fonts in Moodle - Help Needed!

by Jaime Villate -
That's indeed a very nice solution (sIFR). Thanks for the link.
In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by W Page -

Hello All!

I would like to thank everyone who took the time to stop and respond to my call for help.  I learned a lot in this thread about technique and different experiences relating to using special/custom fonts on a web site.

Once I complete this web site, I will post the approaches and solutions I tried and finally used.  I hope it will help other folks.

Again, thanks to all who made suggestions and shared experiences.

WP1

In reply to W Page

Re: Embedding different Fonts in Moodle - Help Needed!

by dave cormier -

Hey,

Interesting thread. I've been looking into some of the same things, one of the places I've found the most inspiration is csszengarden. They start with a standard html file and do some pretty fantastic replacement stuff with css. I don't know if that's any help to you, but it makes interesting viewing all the same.

cheers,

dave.