Alternative font & size

  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

Can you specify a different font & size if the page viewer doesnt have the font you are using installed?


Example:

Say I am using MyHandwritingFont at 18 point size, but if someone doesnt have that font installed it would just be Times New Roman and really large on their screen, so can you specify an alternative font & size, say verdana size 10 that they would read instead?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23460
  • Loc: Woodbridge VA

Post 3+ Months Ago

Font-family yes. You do it like this inline: style="font-family : Arial, Verdana, 'MS Sans Serif', sans-serif;" (substitute fonts as you like). They will default in order. The first one that the browser sees as installed will be the one displayed. If none of the alternatives are available, it will default to the browser settings which is typically by default Times New Roman.

For External or Internal CSS it would be:

Code: [ Select ]
element {
   font-family : Arial, Verdana, "Ms Sans Serif", sans-serif;
}
  1. element {
  2.    font-family : Arial, Verdana, "Ms Sans Serif", sans-serif;
  3. }


I don't believe there is a way in CSS to do the same thing for size, though.
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

Ok thanks :D we are sitting here trying to work it out :D
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23460
  • Loc: Woodbridge VA

Post 3+ Months Ago

As a side note, you should always try to use a core true type font as your last one as most users will have it.
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

yeah its for a diary site and mainly only the same people read it, we just made personal handwriting fonts :D
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

You can embed a font into a web page..

I've done it many times with a font called "matchworks". Matchworks is a pixel font (at least, it is at 10px.

What you need is a program called Micro$oft WEFT (Web Embedding Font Tools).

You can download & read more about it here

It does require having an extra file that your page has to download, but when a user has loaded it once and it's in their cache, it doesn't slow anything down afterwards.

Also, bear in mind that this is a Micro$oft product, and as such will only work on Internet Explorer (that I know of for sure), although I have heard rumour that it also works in Konqueror & Opera (but I don't know which version(s), and I've not confirmed this personally).
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

ok cool i will check it out - im not too fussed would just be nice that if it didnt work for them it wouldnt show the font so large :P
  • conorific
  • Proficient
  • Proficient
  • User avatar
  • Posts: 350
  • Loc: NY

Post 3+ Months Ago

Eh, as a dialup user, and this is just a word anyway, regardless of whether the problem has been solved or not: I wouldn't recommend embedding fonts because they take an extreme toll on the connection, and more than once have made multiple browsers crash.

I would recommend that you stick with common TrueType fonts. But if it's a site that only a few people access, then I guess it doesn't matter...
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

Yeah I wouldn't imbed the font, I don't think this diary site supports it anyways, I will just stick with verdana ;)

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 17 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.