![]() | |
#11
| |||
| |||
|
|
In my stylesheets, I'm now specifying: font-family: "Consolas", "Bitstream Vera Sans Mono", "Andale Mono", "Monaco", "Lucida Console", monospace; |
|
for monospaced fonts. Virtually all Mac OS 9/X machines will have Andale Mono or Monoco. |
|
Each of those fonts are very readable, smart-looking |
#12
| |||
| |||
|
|
Toby A Inkster wrote: Each of those fonts are very readable, smart-looking But beauty is in the eye of the beholder. I have both Bitstream Vera Sans Mono and Lucida Console, but your order will force Vera Sans on me while Lucida Console is my default. Why don't you just let the user decide what's most readable in a monospace font? |
#13
| |||
| |||
|
|
Bergamot wrote: Why don't you just let the user decide what's most readable in a monospace font? By your logic, we shouldn't add any background or text colour either, |
|
as the user can set that themselves too - what if your webpage is black on white, while they would have preferred red on blue? |


#14
| ||||
| ||||
|
|
Els wrote: Bergamot wrote: Why don't you just let the user decide what's most readable in a monospace font? By your logic, we shouldn't add any background or text colour either, By your logic, we should set absolute font sizes to go with those fonts. |
|
as the user can set that themselves too - what if your webpage is black on white, while they would have preferred red on blue? Now we're getting carried away. ![]() |
|
Don't you get tired of every other web page insisting you use Arial or Verdana or whatever? Why don't more authors just use the generic families instead of over specifying everything? |
|
We all make such a big deal about user controlled font sizes, but default fonts are pretty much totally ignored. ![]() |
#15
| |||
| |||
|
|
Bergamot wrote: Don't you get tired of every other web page insisting you use Arial No, I don't get tired of that at all. Have a look at these pages. Each of them please: |
|
If you really want to have your internet pages all in Verdana, just write your own stylesheet. |
default fonts are pretty much totally ignored. ![]() Which is a good thing :-) |
#16
| |||
| |||
|
|
Scripsit Andy Fish: I am trying to output some html in monospaced font, Do you mean you wish to present HTML markup visibly or audibly on the page? Then a monospace font would normally be a good idea. I would suggest using <code> markup together with a style sheet like code { font-family: Consolas, "Courier New"; } to reduce the risk that some poor default monospace font is used. and I want spaces to take up the same width as any other character. A normal space, as well as a no-break space, has the same width as other characters, when the font is monospace i thought this would be easy for monospaced fonts - surely   and   would both be the same width? What? Why would you use specific-width space characters (which are poorly supported in fonts) _and_ ask them to have the same width as other characters? Why would you use them at all? so how do i generate a sequence of normal width spaces? By using the SPACE character U+0020 as everyone else. I can't use the <pre> tag because there is HTML markup in the output - it's not only plain text You have misunderstood the meaning of <pre>, and what else? The real problem is probably very different from the picture we've got so far. To avoid wasting more of everyone's time, post the URL. -- Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/ |
#17
| |||||
| |||||
|
|
ok maybe I didn't make myself clear |
|
i am using a monospaced font. on one line of the output i have 'abcde'; on the next line I have 'a' followed by 3 spaces followed by 'e' I want the 'e' in the second line to appear underneath the 'e' in the first line |
|
if I use a normal space, the 3 spaces are collapsed into one; if I use an m-width or n-width space, the spaces aren't the same width as letters; if I use a non-breaking space, this stops the line breaking (which is not the behaviour I want) |
|
Andy |
|
On 29 Feb, 17:36, "Jukka K. Korpela" wrote: Scripsit Andy Fish: [actual exchange snipped] -- Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/ |
#18
| |||||
| |||||
|
|
ajfish (AT) blueyonder (DOT) co.uk wrote: - - i am using a monospaced font. on one line of the output i have 'abcde'; on the next line I have 'a' followed by 3 spaces followed by 'e' I want the 'e' in the second line to appear underneath the 'e' in the first line Much clearer. |
|
if I use a normal space, the 3 spaces are collapsed into one; if I use an m-width or n-width space, the spaces aren't the same width as letters; if I use a non-breaking space, this stops the line breaking (which is not the behaviour I want) Even clearer. |
|
Then how about: <p>abcde</p><p>a e</p> ? |
|
That should give you both the spacing and a possible break. I believe you'd get the same effect (but with two break possibilities) if you did: <p>abcde</p><p>a e</p> . (Not tested in all browsers.) |
|
It's only consecutive spaces that get collapsed. |
#19
| |||
| |||
|
#20
| |||
| |||
|
|
3) Whether em spaces, en spaces, or no-break spaces collapse is explicitly declared unspecified in HTML specifications. In practice they don't, but if IE 8 or Firefox 4 starts collapsing them, you can only blame yourself if you relied on their not being collapsed. |
![]() |
| Thread Tools | |
| Display Modes | |
| |