Log in

View Full Version : Up for a challenge? Multi font sizes for 1 block of text on different fonts.



Snot
04-23-2008, 02:45 AM
I think I have a tough one.

In dreamweaver I have the option to pick more than one font so that I make sure any user that views my page will use one of the fonts. I guess the browsers check to see if the user has the first font in my list and if they don't it checks to see if they have the 2nd in my list and so on.

I can't get this to work my dreamweaver. I am trying to make the same block of text have different sizes depending on if the user has the first text or not.

Like for example

My pc has Text1 and Text2 but not very many people have Text1 but everyone has Text2

At 100% Text1 is this size

Text1Text1Text1Text1Text1Text1Text1

and at 100% Text2 is this size

Text2Text2Text2Text2Text2Text2Text2

So what I am trying to do is set Text1 to 170% so that everyone one who has Text1 on there pc can see it at a large enough size but in doing this it also sets Text2 to 170% which makes it way way to large. It's the same paragraph. The only reason anyone would ever see Text2 is if they don't have text one.

I can only test this in dreamweaver without uninstalling and reinstalling fonts. If you look at my site and the text is normal size and matches my images you are looking at chiller. If you look at my site and the text is HUGE and doesnt match anything then you don't have chiller. I would like to make that really huge text smaller and look better on my page for you :D

Do you guys have any ideas on how this could be done?

Nile
04-23-2008, 02:57 AM
I don't think that this can be achieved unless you use javascript, and with the javascript, I don't know how if you do use javascript. You'll have to find a function that can find if the font exists. But what I suggest is going in your Fonts(if you have Vista you can type this in your windows explorer: Control Panel\Appearance and Personalization\Fonts you can try it with XP too, but I don't know if it'll work). Find the font, then drag it into your FTP, you can then type something like:

font-family: 'chiller.ttf';
And that will display the font from the server, so everyone can view the same font.
Hope this Helps,
Nile

Snot
04-23-2008, 03:04 AM
Wow that would be really cool if it works. I will play around with it

Nile
04-23-2008, 03:14 AM
Ok, if you need anymore help just post it here.
Hope this Helps,
Nile

Snot
04-23-2008, 03:31 AM
Is there any kind of code I need to put on my pages or just stick the chiller.ttf file in my root dir?

Medyman
04-23-2008, 03:31 AM
Find the font, then drag it into your FTP, you can then type something like:

font-family: 'chiller.ttf';
And that will display the font from the server, so everyone can view the same font.

Nile, do you have any examples of this in action? I've never heard of such a thing and my limited testing of it doesn't seem to work.

there is the @font-face CSS3 property which allows for web fonts, but this is only currently supported by WebKit (Safari).

Snot, in this instance, I would use something like sIFR (http://www.mikeindustries.com/blog/sifr/) if that font is imperative to your design.

Nile
04-23-2008, 03:45 AM
Hmm, it seems your right. Sorry. But this works with PHP Gd :rolleyes:

Medyman
04-23-2008, 03:49 AM
Hmm, it seems your right. Sorry. But this works with PHP Gd :rolleyes:

Ahh, yes. That it does...but that's a whole another beast.

Snot
04-23-2008, 03:54 AM
Thanks for trying M8 it did sound a little to easy haha man that would have been nice.


@ Medyman thanks for the link I think that is going to be great for me because my site doesn't really have that much text on it.