Quantcast

Forums | MacLife

You are not logged in.

#1 2009-03-28 8:48 pm

Nefarious
Tuning Fork
Moderator
From: 45°22"N 84°57"W
Registered: 2002-09-30
Posts: 7996

How to create embedded fonts for a webpage ?

Google and Macupdate didn't come thru for me.  I want to use the Didot font.

Or... does every modern PC have the Didot font ?

TIA.

Offline

 

#2 2009-03-29 1:37 am

resedit
Chicken Little
Royal Wombat
From: /dev/null
Registered: 1999-11-01
Posts: 50361
Website

Re: How to create embedded fonts for a webpage ?

I think you have to use a font utility to create a .pfr file - and if I'm not mistaken, some fonts specify they can not be embedded and then you have to edit the font first to remove that bit (probably a violation) to create the .pfr file. I think only OpenType fonts can have that, but ttf style OpenType have a .ttf extension so just using .ttf font doesn't guarantee it is not easily converted (type 1 fonts as far as I know can be embedded)

I don't know what tools make the conversion though. I believe fontforge can but I'm not positive.

Anyway - once you have a pfr file -

<link rel = "fontdef" src="/path/to/you/font.pfr">

Then you can declare the font in your style sheet the same way as any other font.


In her right hand Jenny held the Bible of her mother
Jenny had a pistol in the other
-- Steve Taylor

Offline

 

#3 2009-03-29 4:57 am

resedit
Chicken Little
Royal Wombat
From: /dev/null
Registered: 1999-11-01
Posts: 50361
Website

Re: How to create embedded fonts for a webpage ?

It seems that method worked in NS 4 but only worked in IE with an ActiveX plugin, but doesn't work in anything post Netscape 4 nor in IE for the mac.

There doesn't seem to be a unified method that works everywhere.
The one IE currently uses (developed with Adobe) is actually conceptually better because the instructions on downloading the font are part of the CSS (where it belongs - even if it isn't valid CSS) but won't work with non IE browsers.

Hopefully the (X)HTML 5 that is long overdue will provide a standard for embedded fonts that everyone supports, I'm tired of all this proprietary crap for stuff that should have been standard a long time ago.

Last edited by resedit (2009-03-29 4:58 am)


In her right hand Jenny held the Bible of her mother
Jenny had a pistol in the other
-- Steve Taylor

Offline

 

#4 2009-03-29 8:10 am

Nefarious
Tuning Fork
Moderator
From: 45°22"N 84°57"W
Registered: 2002-09-30
Posts: 7996

Re: How to create embedded fonts for a webpage ?

thx

I'll just code in Didot then.

Offline

 

#5 2009-03-29 12:59 pm

matt
a very bad matt
Registered: 1999-09-16
Posts: 16685
Website

Re: How to create embedded fonts for a webpage ?

The CSS font-family takes a list of fonts, like this:

Code:

h1 {
    font-family: Helvetica, Arial, Verdana, sans-serif;
    }

It will try to use the first font listed. If that is not available it will use the second. If that is not available it will use the third, et cetera.


Being loud: The next best thing to being right.

Do not click here.

Offline

 

#6 2009-03-29 6:24 pm

Basseq
Fixxy of F&S fame
From: D.C.
Registered: 2002-12-18
Posts: 3125
Website

Re: How to create embedded fonts for a webpage ?

resedit wrote:

There doesn't seem to be a unified method that works everywhere.

Au contraire, mon ami.

http://www.mikeindustries.com/blog/sifr/


Basseq is me, John Whittet.
(Finishing the remainder of the thought expressed in the post has been left as an exercise for the reader.)

Offline

 

#7 2009-04-04 5:04 pm

b_dubb
loch whatchamacallit
From: chapel hill, nc
Registered: 2002-11-19
Posts: 510
Website

Re: How to create embedded fonts for a webpage ?

Basseq wrote:

resedit wrote:

There doesn't seem to be a unified method that works everywhere.

Au contraire, mon ami.

http://www.mikeindustries.com/blog/sifr/

how quickly does this solution render in older computers?


"The Fates lead he who will; he who won't, they drag." - Seneca

Offline

 

#8 2009-04-04 5:20 pm

resedit
Chicken Little
Royal Wombat
From: /dev/null
Registered: 1999-11-01
Posts: 50361
Website

Re: How to create embedded fonts for a webpage ?

It was a little slugging on my IBM Thinkpad T20 but not that bad -

http://www.mikeindustries.com/blog/files/sifr/2.0/

And it still displayed decently w/ NoScript blocking it, so it definitely is a solution that is viable.


In her right hand Jenny held the Bible of her mother
Jenny had a pistol in the other
-- Steve Taylor

Offline

 

#9 2009-04-13 9:36 pm

yoshu
Member
Registered: 2009-04-13
Posts: 3
Website

Re: How to create embedded fonts for a webpage ?

I have didot on OS X, but I don't know if that font is available on windows. If you don't want to use siFR you could just code something like this:

Code:

body {font-family:didot, georgia, serif;}

Some people will get didot, others will get georgia. (By the way I don't know if georgia is the best back up font for didot, I'm just giving you an example.)

If you're interested in font embedding, which I don't know if you can do with didot for licensing reasons, check out Jon Tan's article at http://jontangerine.com/log/2008/10/fon … fonts-work . It's a really informative article.

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson