Alternative font size for alternative fonts...

  • Justine
  • Newbie
  • Newbie
  • Justine
  • Posts: 9

Post 3+ Months Ago

Hi,
I've been typing in an alternative font for my site but the corresponding size to the preferred font is too large. How do I specify an alternative font size for my alternative font? :roll:
Justine
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

Code: [ Select ]
<font size='n'>
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

*shakes head* Don't use font...it's dirty...err..depricated...er frowned upon, or something.

What they want to be able to do is say have "Courier New" Courier for their font family, and have "Courier New" be 12px while "Courier is only 10. And have that somehow definably in css.

I have no idea how it'd be done.
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

so your saying that it is better to have the user define the size huh?
  • JrzyCrim
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2062

Post 3+ Months Ago

I don't believe that is what b_heyer is saying. CSS should be used for presentation and layout of a web page and html for markup. CSS is a much more efficient way of styling an html document.

With CSS, you can still define fixed (px, pt) or scalable (em, %) font sizes.

See http://www.w3schools.com/html/html_fonts.asp
  • JrzyCrim
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2062

Post 3+ Months Ago

Justine wrote:
Hi,
I've been typing in an alternative font for my site but the corresponding size to the preferred font is too large. How do I specify an alternative font size for my alternative font? :roll:
Justine


:scratchhead:
The only thing I can recommend is choosing a different alternate closer to the size you want. I'll post back if I can think of a way.
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

yeah, I am really weak in css....I use a little of it, and I have a basic understanding of it...but I am not sure how to use it to make a layout. Guess I better learn
  • JrzyCrim
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2062

Post 3+ Months Ago

CSS layouts are cool but you don't necessarily have to use css for laying out a page. It's my opinion that using the normal flow of html as much as possible is a good thing. I guess it depends on what you are doing. I know a lot of people hate table layouts but they don't really bother me.

When I mentioned css being more effiecient I was talking more about font styles, colors, etc.

Example:
If you have a site with 100 pages, each with several headings, using a a font tag to style each heading can be tedious. Especially if you decide to change the font properties.

With CSS, you can set up a single rule to style every h1, or other element, and link your style sheet to all of your pages. If you decide to change the color or size, etc, it's an easy modification. Plus the html code is much easier to read without all the extra tags.

Edit: oops, I did mention using css for layouts is best (And I guess it is) but if you are just learning css, it's difficult getting the hang of layouts. There are tons of layout templates on the web that you can study.
Cheers,
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

yeah, that is what I have been using css for, and your right it is a whole lot easier than writing out the font tags. I still will check out your suggestion. I have so much to learn and it is difficult for me to sit down and concentrate on one thing.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

The advantage of using css for layout is that you can completely change the page without changing the html at all. go to:

http://www.csszengarden.com/?cssfile=/100/100.css&page=0

then click on "wiggles the wonder worm" on the right hand side.

The html is the same, only the stylesheet has changed, imagine trying to convert anything more than 20 pages if you had used a table layout.....
With css just change the stylesheet. I also find that layouts are quicker, simpler and less restrctive using css.

With the font thing, there is nothing in css 2 to do this, however:

css 3 draft spec wrote:
In bicameral scripts, the subjective apparent size and legibility of a font are less dependent on their 'font-size' value than on the value of their 'x-height', or, more usefully, on the ratio of these two values, called the aspect value (x-height divided by font-size). The higher the aspect value, the more likely it is that a font at smaller sizes will be legible. Inversely, faces with a lower aspect value will become illegible more rapidly below a given threshold size than faces with a higher aspect value. Straightforward font substitution that relies on font size alone may lead to illegible characters.

For example, the popular font Verdana has an aspect value of 0.58; when Verdana's font size 100 units, its x-height is 58 units. For comparison, Times New Roman has an aspect value of 0.46. Verdana will therefore tend to remain legible at smaller sizes than Times New Roman. Conversely, Verdana will often look 'too big' if substituted for Times New Roman at a chosen size.

This property allows authors to specify an aspect value for an element that will preserve the x-height of the first choice font, whether it is substituted or not. Values have the following meanings:

none
Do not preserve the font's x-height.
<number>
Specifies the aspect value. The number typically refers to the aspect value of the first choice font. The scaling factor for all fonts is computed according to the following formula:

y(a/a') = c

where:

y = 'font-size' actual value
a = aspect value as specified by the font-size-adjust property value
a' = aspect value of actual font
c = 'font-size' to apply to font

Example(s):

For example, if 14px Verdana (with an aspect value of 0.58) was unavailable and an available font had an aspect value of 0.46, the font-size of the substitute would be 14 * (0.58/0.46) = 17.65px. If Verdana is available, no adjustment occurs, as long as its actual aspect value is the same as the hypothetical aspect value provided by the font-size-adjust property.

Font size adjustments take place when computing the actual value of 'font-size'. Since inheritance is based on the computed value, child elements will inherit unadjusted values. Font size adjustments are applied to all fonts used by child elements, substituted or not.


Which is exactly what you are looking for. Unless someone can find a hack in css2, you are looking at just finding fonts that are closer in size. Or embedding a font.
  • Justine
  • Newbie
  • Newbie
  • Justine
  • Posts: 9

Post 3+ Months Ago

Hmmm...think I', gonna have to study this one...css is pretty new to me...thanks for the links thou...when I've worked it out, I'll post up the code...j

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 47 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
 
 

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