473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

font-variant fonts

hi

Is there any separate font for small-caps version of fonts?
if the answer is true , what happened if for a font there is'nt any small-caps version or is'nt installed in operating system? does browsers simulate that ? if your answer is true , what is the rate of smallness size of lowercase letters that is converted to lowercase letters?

thanks in advance.
Jun 8 '11 #1

✓ answered by JKing

1) No there isn't actually a small caps version of the font. Any font can be renedered in small caps because it essentially is only using uppercase letters with a smaller font size.

Here is a small example. Run this in firefox.
Expand|Select|Wrap|Line Numbers
  1. <!doctype html>
  2. <html>
  3. <head>
  4.     <title>Example</title>
  5. </head>
  6. <body>
  7.     <p style="font-size:14px;font-variant:small-caps;font-family:Tahoma;">This is small caps text.<span style="font-size:11px;font-variant:normal;color:blue;">THIS IS UPPERCASE WITH A SMALLER FONT SIZE</span></p>
  8. </body> 
  9. </html>
  10.  
2) I am not sure how the browser determines the rate of smallness. As far as I know it is set by the browser. But each browser renders it slightly different. In the example I provided, if you were to run it in IE8 wouldn't line up. It's about a 1px difference in font size.

3 1744
JKing
1,206 Expert 1GB
As far as I know this is handled by the browser. The lowercase letters are converted to uppercase with a smaller font size.
Jun 8 '11 #2
thanks JKing ,
1-but you mean that there is'nt any small caps version for fonts?
2-how is determined the rate of smallness lowercase letters that is converted to uppercase letters via font-variant: small-capse ? is it set by browser and it is diffrent between browsers?
Jun 10 '11 #3
JKing
1,206 Expert 1GB
1) No there isn't actually a small caps version of the font. Any font can be renedered in small caps because it essentially is only using uppercase letters with a smaller font size.

Here is a small example. Run this in firefox.
Expand|Select|Wrap|Line Numbers
  1. <!doctype html>
  2. <html>
  3. <head>
  4.     <title>Example</title>
  5. </head>
  6. <body>
  7.     <p style="font-size:14px;font-variant:small-caps;font-family:Tahoma;">This is small caps text.<span style="font-size:11px;font-variant:normal;color:blue;">THIS IS UPPERCASE WITH A SMALLER FONT SIZE</span></p>
  8. </body> 
  9. </html>
  10.  
2) I am not sure how the browser determines the rate of smallness. As far as I know it is set by the browser. But each browser renders it slightly different. In the example I provided, if you were to run it in IE8 wouldn't line up. It's about a 1px difference in font size.
Jun 10 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
0
by: Paul D. Sullivan | last post by:
I've been trying to find out how to increase the font size in the text entry fields in Invision Power Board 1.3 for a while. The part where you enter your post and do the quick reply and all that...
9
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with...
3
by: pnp | last post by:
I have created a coposite user control of a text box and a label. I have exposed the font of the textbox property through a property of the control but every time I try to change that through the...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
1
by: Henry Jones | last post by:
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, ...
2
by: kheitmann | last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.