Click to See Complete Forum and Search --> : [Code] font
Sam Hobbs
January 5th, 2004, 03:47 PM
$
The HTML generated for my browser for the above is:
<tr>
<td bgcolor="#F1F1F1"><font face="verdana, arial, helvetica" size="2" ></font><blockquote><pre><font face="verdana,arial,helvetica" size="1" >code:</font><hr>$<hr></pre></blockquote><font face="verdana, arial, helvetica" size="2" ><!-- BEGIN TEMPLATE: postbit_signature -->
<p><font face="verdana, arial, helvetica" size="2" >__________________<br>
My web site <a href="http://SimpleSamples.Info" target="_blank">Simple Samples</a> is finally returning.</font></p>
<!-- END TEMPLATE: postbit_signature --></font></td>
</tr>
Brad Jones
January 5th, 2004, 03:58 PM
Breaking out your HTML....
The font for code will be the default for the PRE tag. All the other font tags used in this snippet are closed before you get to the actual code. Default for a PRE tag is a courier.
<font face="verdana, arial, helvetica" size="2" > __________________<br>
My web site <a href="http://SimpleSamples.Info" target="_blank">Simple Samples</a> is finally returning.
</font></p>
<!-- END TEMPLATE: postbit_signature -->
</font>
</td>
</tr>
Sam Hobbs
January 5th, 2004, 04:27 PM
12345678901234567890
iiiiiiiiiiWWWWWWWWWW
For my browser, the first W begins under the first 5 and the last W begins at the right side of the last 0 (beyond the end of the line). Therefore the font is not proportional. When I copy the text from the displayed result and paste into VS, the letters line up properly, as they should for a fixed font.
Edit: I am not getting that result anymore. See the explanation below.
Sam Hobbs
January 5th, 2004, 04:30 PM
12345678901234567890
iiiiiiiiiiWWWWWWWWWW
When I select the Courier font explicitly as above, the letters line up as they should for a fixed font.
Sam Hobbs
January 5th, 2004, 04:33 PM
So when I get a chance, I will try adding a font selection when I post code. If that works, I will probably add that to the syntax highlight utility.
Brad Jones
January 5th, 2004, 04:39 PM
Mine is courier in all the examples shown. If anyone else is reading this, please indicate whether you are seeing a proportional font or not. (Or simply state where the first W is lining up. Proportional will have it under the 1.
Brad!
Andreas Masur
January 5th, 2004, 04:51 PM
I can see all examples with a proportional font as well...
SolarFlare
January 5th, 2004, 05:00 PM
I see the same thing (courier) both times.
Yves M
January 5th, 2004, 05:16 PM
Originally posted by Andreas Masur
I can see all examples with a proportional font as well...
I guess you mean a fixed-width font like Courier. Brad made the same mistake above.
For me it's Courier (fixed-width) as well, both under Firebird and Internet Explorer. As far as I know HTML, the <pre> tag should take precedence over the specified font, so it could be your browser. Which one are you using ?
Sam Hobbs
January 5th, 2004, 05:28 PM
I am using IE 6.0 and I am not aware of any relevant changes I have made. I think a few months ago I noticed a difference in the way that the CodeGuru forums look and if that is when it happened, it was only the CodeGuru web site that I recall having been affected. I was not aware of any changes I made at the time, but perhaps I did.
This is an interesting mystery. If I am the only one affected then I will assume it is something I did.
SolarFlare
January 5th, 2004, 05:36 PM
Originally posted by Sam Hobbs
I am using IE 6.0
I too am using IE6 (as I'm sure many others are - seems to be the most popular around here), but don't see the problem. I see no option offhand which would affect the font.
Sam Hobbs
January 5th, 2004, 07:07 PM
The following is what I see above from using the [Code] tag without font specified:
http://simplesamples.info/images/CodeFont.png
SolarFlare
January 5th, 2004, 10:33 PM
Does Courier font show up as Courier for you? Perhaps it was somehow deleted from your computer...?
Sam Hobbs
January 5th, 2004, 11:23 PM
I would definitely have noticed that the courier font is missing. Note that the courier font even works for me here in this thread.
I have discovered the problem. I had the wrong encoding set. In IE, look at "View | Encoding". If you try other encodings, you will likely see the result I was getting. I now have it set to "Western European (Windows)" and now things are back to normal. Is that what is normally used?
Yves M
January 8th, 2004, 04:40 PM
Yes, Windows Western Europe is the one you want for an English OS.
Strange though, I've tried it with all encodings and still didn't manage to get the code segment to be displayed in a proportional font.
Sam Hobbs
January 8th, 2004, 05:35 PM
Try "Chinese Traditional (Big5)". I have been receiving a lot of spam that I can't read. They use Big5, so I know I played with it a bit. Although I don't recall using that encoding for my browser, my IE was using Big5. Of course, I still can't read the spam that uses Big5, even when I set the encoding for the message to Big5.
Homestead
January 8th, 2004, 07:16 PM
Originally posted by Sam Hobbs
Try "Chinese Traditional (Big5)". I have been receiving a lot of spam that I can't read. They use Big5, so I know I played with it a bit. Although I don't recall using that encoding for my browser, my IE was using Big5. Of course, I still can't read the spam that uses Big5, even when I set the encoding for the message to Big5.
Sam, Can you use Chinese keyboard ?
Sam Hobbs
January 8th, 2004, 07:56 PM
I assume I can use a Chinese keyboard. I think it does not matter where a keyboard is made.
Homestead
January 8th, 2004, 08:55 PM
Originally posted by Sam Hobbs
I assume I can use a Chinese keyboard. I think it does not matter where a keyboard is made.
Why ?
Sam Hobbs
January 8th, 2004, 09:04 PM
Probably for the same reason that it does not matter to you where a keyboard is made. Or am I wrong? Does it matter to you where a keyboard is made?
VuQ_Le
January 8th, 2004, 09:33 PM
Nina, Nina, Nina !!!!!!!!
I have just found out a 60s hippie buy's picture in my trunk !!! It looks funny
I'll send you.
Originally posted by Homestead
Why ?
:) Keyboard can be changeable. Go to Control Panel, click the keyboard and
freely choose what language you want to use. Your keyboard goes with your
choice then.
VuQ_Le
January 8th, 2004, 09:47 PM
You, a true elite member, posted most of all, that's amazing ! :D
Thanks for that useful link, and Thank Microsoft for their help,
but that becomes unusuable for Nina. She doesn't know it !
Originally posted by Sam Hobbs
I still can't read the spam that uses Big5, even when I set the encoding for the message to Big5.
I don't know much about the things or problems you are trying to solve, but I always know
for sure that it always takes time to break the record. ;) Please keep trying !!!
Regards,
-Vu
Sam Hobbs
January 8th, 2004, 10:04 PM
Originally posted by VuQ_Le
it always takes time to break the record. ;)Actually I keep trying to fix the record! :D ;)
Yves M
January 9th, 2004, 11:46 AM
Originally posted by Sam Hobbs
Try "Chinese Traditional (Big5)". I have been receiving a lot of spam that I can't read. They use Big5, so I know I played with it a bit. Although I don't recall using that encoding for my browser, my IE was using Big5. Of course, I still can't read the spam that uses Big5, even when I set the encoding for the message to Big5.
Same thing. Also with Chinese Traditonal the code segment appears in a fixed font.
Sam Hobbs
January 9th, 2004, 12:12 PM
The Big5 encoding definitiely affects what I see in the manner I have described. It does not make sense that it does; a fixed font should be always be used for a <pre> tag so perhaps my IE is improperly installed.
Brad Jones
January 9th, 2004, 01:42 PM
Side note....
I agree that a fixed-width font will generally be used with the <pre> tag; however, not always. The only time, however, that I've seen this changed is when a style sheet overwrote what the pre tag was to do. In that case, the pre tag used a didfferent font, size, color, and more.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.