Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: tiwag on December 13, 2005, 11:53:27 am

Title: Teletype font tooooooo small
Post by: tiwag on December 13, 2005, 11:53:27 am
is it only me or do others also have problems with reading this Teletype font ?
it is very handy to have a fixed font and not being forced to use the
Code
code
format, but for me it is toooo small compared to the rest of the used fonts here.

would it be possible to change the teletype to the same font and size as the "code" font ?
thanks
Title: Re: Teletype font tooooooo small
Post by: Der Meister on December 13, 2005, 11:56:30 am
I don't see any problems. The font is as large as the font for normal text. Maybe it's a problem of your browser/system? I'm using Opera 8.51 on Linux.
Title: Re: Teletype font tooooooo small
Post by: tiwag on December 13, 2005, 12:06:23 pm
obviously it is a problem with my browser then,

here is how it looks on my Maxthon 1.5.0 (Unicode) on WinXP

[attachment deleted by admin]
Title: Re: Teletype font tooooooo small
Post by: thomas on December 13, 2005, 12:12:14 pm
Firefox displays teletype far too big  :?

No seriously, it is just fine for me. :lol:

I may assume you haven't inadvertedly set a small zoom factor? (Don't even know if Maxthon has any such thing as zoom, but I would guess).

Edit:   HAH!  Just found this:
Quote from: http://www.maxthon.com/
v1.5 build 95 [2005-10-05]
* Fix a bug in Page Zooming
Title: Re: Teletype font tooooooo small
Post by: Michael on December 13, 2005, 12:13:15 pm
Hello,

I have also the same problem with teletype. The text is very small and difficult to read. I thought it was a problem of my computer, but it seems that I am not the only one.

I use Windows XP SP2 and Internet Explorer 6.

Michael  
Title: Re: Teletype font tooooooo small
Post by: tiwag on December 13, 2005, 12:18:08 pm
...I may assume you haven't inadvertedly set a small zoom factor? ...
the zoom-factor is fine - see the screen-shot there you can see the proportions 1:1

and on all other websites and /or forums i don't have the problems with teletype font
for some reason which i don't know (till now) it happens only in this forum.
Title: Re: Teletype font tooooooo small
Post by: thomas on December 13, 2005, 12:26:28 pm
Probably because the css says so:
Code
.code
{
color: #000000;
background-color: #cccccc;
border: 1px solid #000000;
padding: 1px;
font-family: "courier new", helvetica, "times new roman", serif;
font-size: small;
/* font-size: x-small; */
width: 99%;
margin: 1px auto 1px auto;
white-space: nowrap;
overflow: auto;
}
The IE engine likely assigns something which is rather unhealthy to "small".

Yiannis, can you insert a conditional comment into the forum page template so it looks something like this?
Code
<head>
....
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie.css">
<![endif]-->
</head>

and have ie.css like so:
Code
tt, .code {font-size: normal;}

Yes, yes... telling Daddy where the children come from ;)
Title: Re: Teletype font tooooooo small
Post by: mandrav on December 13, 2005, 12:30:41 pm
Yiannis, can you insert a conditional comment into the forum page template so it looks something like this?

Rick is the web admin ;)
Rick?
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 13, 2005, 05:57:38 pm
Oh, i see :) I'll fix it tonight when I get home.
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 14, 2005, 05:59:25 pm
Fixed! :) ... I think... :?
Title: Re: Teletype font tooooooo small
Post by: tiwag on December 14, 2005, 06:02:57 pm
testing....

normal

teletype without size ... ooops gimme a magnifying-glass for IE-users

normal

teletype with size is ok

please go back to field 1 rick  8)
Title: Re: Teletype font tooooooo small
Post by: thomas on December 14, 2005, 06:15:13 pm
Err, Rick... please don't use thinks like font-size: 14px; . I am getting epileptic fits when I see things like this  :shock:

Please use relative sizes, or if you must use absolute sizes, use pt or mm.
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 14, 2005, 07:11:08 pm
aw :( darn.

Anyway guys did you want to modify the tt tag, or the text inside "code"?
Title: Re: Teletype font tooooooo small
Post by: thomas on December 14, 2005, 07:17:46 pm
As far as I understood, both are displayed too small in Internet Exploder. But that can be done in one assignment in css.

You could just copy the code snippet above, you know ;)


EDIT:
I just loaded The Beast and looked. Code displays ok, but tt is far too small.
Title: Re: Teletype font tooooooo small
Post by: Michael on December 14, 2005, 07:23:03 pm
As far as I understood, both are displayed too small in Internet Exploder. But that can be done in one assignment in css.

In my case, it is just the text inside the tt tags that it is too small.

The text inside code tags is ok.

Michael
Title: Re: Teletype font tooooooo small
Post by: 280Z28 on December 14, 2005, 07:28:12 pm
When you go to reply to a post, there is a copy of the existing posts below the reply box that you can reference. In Firefox 1.5, text that is not quoted is tiny in those replies.

Notice that thomas' quote is fine, but the other text is tiny.

[attachment deleted by admin]
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 14, 2005, 07:33:18 pm
:'( bwaaa... can you people agree on what needs to be changed?

Title: Re: Teletype font tooooooo small
Post by: Michael on December 14, 2005, 07:40:39 pm
:'( bwaaa... can you people agree on what needs to be changed?

The size of the text inside the tt tags...please... :).

Michael
Title: Re: Teletype font tooooooo small
Post by: tiwag on December 14, 2005, 07:42:47 pm
:'( bwaaa... can you people agree on what needs to be changed?

only teletyped text within  [ t t ]    teletype   [ / t t ]  is too small

do you have a IE on your computer ????
then you could try it yourself maybe !

thanks a lot
Title: Re: Teletype font tooooooo small
Post by: thomas on December 14, 2005, 07:58:43 pm
Notice that thomas' quote is fine, but the other text is tiny.
No, that is deliberate. These posts are meant to be that small.

The issue is about [ tt ] teletype text [ /tt ] which looks about like this on Internet Exploder.
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 14, 2005, 08:23:03 pm
I see no difference between FF and IE (see pic)

[attachment deleted by admin]
Title: Re: Teletype font tooooooo small
Post by: thomas on December 14, 2005, 08:26:33 pm
That is because I specified size=7pt for this particular text to simulate what it looks like using IE...

Compare this!

[attachment deleted by admin]
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 14, 2005, 08:31:15 pm
Ouch. I see your point now. Lemme see what I can do.
Title: Re: Teletype font tooooooo small
Post by: thomas on December 14, 2005, 08:46:56 pm
You could just copy the code from above ;)
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 14, 2005, 10:37:01 pm
changing the CSS is easy. The templates, however...
Title: Re: Teletype font tooooooo small
Post by: thomas on December 14, 2005, 10:43:08 pm
Find in files... :)

Search for </head>
Title: Re: Teletype font tooooooo small
Post by: 280Z28 on December 15, 2005, 12:06:08 am
This should just be a CSS problem :think:
Title: Re: Teletype font tooooooo small
Post by: thomas on December 15, 2005, 12:12:48 am
It is not just a CSS problem.

Internet Exploder is displaying some of the code badly. All other browsers do not have that problem. So unless you want to have the forum display nicely in IE and show ill-formatted in any other browser, you have to provide different style information to different browsers.

You have the following choices:
- conditional comments: these work reliably and are perfectly suitable in this case
- JavaScript: unreliable at best
- UserAgent: unreliable and requires changing the web server's config
- CSS hacks: these are, like their name says, hacks - no alternative
Title: Re: Teletype font tooooooo small
Post by: 280Z28 on December 15, 2005, 12:15:39 am
It is not just a CSS problem.

Internet Exploder is displaying some of the code badly. All other browsers do not have that problem. So unless you want to have the forum display nicely in IE and show ill-formatted in any other browser, you have to provide different style information to different browsers.

You have the following choices:
- conditional comments: these work reliably and are perfectly suitable in this case
- JavaScript: unreliable at best
- UserAgent: unreliable and requires changing the web server's config
- CSS hacks: these are, like their name says, hacks - no alternative

CSS problem as in CSS not designed specifically to compensate for IE's inability to follow rules. Technically that's an IE problem, but when a site doesn't keep that in mind and forgets to make the site look right in the most popular browser, it becomes a problem with their CSS code.

IE makes me like this when I'm trying to make a site:  :x :x
Title: Re: Teletype font tooooooo small
Post by: thomas on December 15, 2005, 12:22:03 am
IE is actually no problem at all if you do not have the requirements to be pixel-precise and to have the exact same look in different browsers.

If you can live with pages looking slightly different (which they will anyway, realistically) then you can make a 100% standards compliant page which is accessible and good looking in every browser. All you need to do is provide either a fallback css or a correction css for IE and conditional comments are a really gorgeous invention for that purpose. These are certainly the best thing Microsoft ever invented.

No hacks needed, no scripts, nothing.
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 15, 2005, 12:54:54 am
I read there is a way to solve the discrepancies between ie and other browsers in font size...
http://www.clagnut.com/blog/348/

html { font-size: 100%; /* IE hack */ }
body { font-size: 0.75em; }

But I don't remember the original source. I'll try it out.
Title: Re: Teletype font tooooooo small
Post by: sethjackson on December 15, 2005, 02:51:10 am
I read there is a way to solve the discrepancies between ie and other browsers in font size...
http://www.clagnut.com/blog/348/

html { font-size: 100%; /* IE hack */ }
body { font-size: 0.75em; }

But I don't remember the original source. I'll try it out.

Umm just use point (pt) sizes it works the same in Internet Exploder and Firefox. I know because I have to do it in my CSS. :)

Something like this

Code
#your-selector
{
    font-size: 14pt;
}
Title: Re: Teletype font tooooooo small
Post by: 280Z28 on December 15, 2005, 04:58:46 am
I read there is a way to solve the discrepancies between ie and other browsers in font size...
http://www.clagnut.com/blog/348/

html { font-size: 100%; /* IE hack */ }
body { font-size: 0.75em; }

But I don't remember the original source. I'll try it out.

Umm just use point (pt) sizes it works the same in Internet Exploder and Firefox. I know because I have to do it in my CSS. :)

Something like this

Code
#your-selector
{
    font-size: 14pt;
}

That's what I do.

Edit: nevermind. I use font-size: small;
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 15, 2005, 05:08:01 am
LOL! :lol: that was a good one.

(If you weren't kidding, please go to the beginning of the thread and see what was causing us problems in the firxt place :P )
Title: Re: Teletype font tooooooo small
Post by: 280Z28 on December 15, 2005, 05:17:52 am
LOL! :lol: that was a good one.

(If you weren't kidding, please go to the beginning of the thread and see what was causing us problems in the firxt place :P )

At the end of the css file change it from this:

Code
* html body tt
{
font-size:10pt;
}

to this:

Code
tt
{
font-size:small;
}
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 15, 2005, 05:23:09 am
In any case, it's fixed now. Rejoice! :D
Title: Re: Teletype font tooooooo small
Post by: 280Z28 on December 15, 2005, 05:25:47 am
I was wrong with ignoring comments. I think that's only IE 5 for Mac. :o

But yes, it is fixed.
Title: Re: Teletype font tooooooo small
Post by: tiwag on December 15, 2005, 07:08:37 am
In any case, it's fixed now. Rejoice! :D

just starting rejoicing ...

thanks a lot rick !!!


[edit]
btw what was the final solution ?
Title: Re: Teletype font tooooooo small
Post by: rickg22 on December 15, 2005, 05:57:48 pm
I used the
Code
html { font-size:100%; }
hack, and at the BOTTOM of the stylesheet, I added:
Code
tt, .code { font-size:1em; }