469,275 Members | 1,690 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

&ensp in a monospaced font

Hi,

I am trying to output some html in monospaced font, and I want spaces to
take up the same width as any other character. i thought this would be easy
for monospaced fonts - surely   and   would both be the same
width?

unfortunately not -   is narrower than other characters and   is
wider :-(

so how do i generate a sequence of normal width spaces?

I can't use the <pretag because there is HTML markup in the output - it's
not only plain text

Andy
Feb 29 '08
59 7125
Neredbojias wrote:
On 03 Mar 2008, Jonathan N. Little wrote:
>Jonathan N. Little wrote:
>>As the line wraps in the markup there may be more then one white...
^^
Damn!

s/then/than/

I wasn't going to point out that total blunder. Honest.
Sure you weren't ;-)

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Mar 4 '08 #51
Scripsit Jon Fairbairn:
Actually there's already a kind of collapsing of characters
in some browsers (using some rendering engines): some
character pairs (fi for example) are displayed as ligatures
(fi).
Well, it's a quite different kind of collapse, isn't it, but this makes
me curious: which browsers do such things, for which character
combinations?
I don't think we would want to mandate that that didn't
happen either.
That's debatable. I might want that. For example, if I write my E-mail
address, I don't want any wowser to display the ".fi" part using an "fi"
ligature. Generally, use of ligatures (at least for Latin characters)
would be something _unexpected_. So I think ligature rendering should be
off by default. But this is (at least currently) a quality of
implementation issue, not something required *n HTML specs.

If you want ligatures, you can explicitly ask for them using a control
character or, more effectively, replacing a sequence of characters by a
compatibility character representing their ligature, such as &#xfb01;.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Mar 4 '08 #52
Els
Harlan Messinger wrote:

[Brazilian]
>>Those people dispense with more vowels when they speak.

Not seeing what you mean there really - Brazilians actually do it the
other way round - they *add* vowels between 'hard' consonants. For
example the word 'ignorante', is pronouned 'iginorante'.

Really? It was my impression that they swallowed as many vowels as
possible. Or maybe it's the Portuguese I'm thinking of, who swallow
their final "e" where Brazilians turn them into "i".
Yup, that's a fact. And because they think 'ti' doesn't sound right
(or maybe it's difficult to pronounce?), they make it sound like
'tchi' or 'tyi' (y as in yes). So really, 'ignorante' becomes
'iguinorantchi'. Same as in the sound of a clock - where we say 'tick
tock', they say 'tchik tock' :-)

--
Els http://locusmeus.com/
Mar 4 '08 #53
Toby A Inkster wrote:
Michael Fesser wrote:
>Els wrote
>>The word I meant is 'angstschreeuw'. Noun, 'scream of fear'.

"Angstschrei" in German, quite similar.

And "angst-scream" would probably be understood by most English speakers,
though you wouldn't find it in a dictionary. However the word "angst" has
different connotations in English -- it would be more of a "scream of
bother".

I always delight in seeing these little cognates between the Germanic
languages. The languages are really a lot closer together than people give
them credit for -- especially the rarely used words, which haven't had
such an opportunity to mutate. Frisian (spoken in some coastal regions of
the Netherlands, Germany and Denmark) sounds almost like English spoken in
a very funny accent.
Ah! Kind of like English the way the Brits speak it. ;)

--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Blinky: http://blinkynet.net

Mar 4 '08 #54
On 04 Mar 2008, Blinky the Shark wrote:
>>>The word I meant is 'angstschreeuw'. Noun, 'scream of fear'.

"Angstschrei" in German, quite similar.

And "angst-scream" would probably be understood by most English
speakers, though you wouldn't find it in a dictionary. However the
word "angst" has different connotations in English -- it would be
more of a "scream of bother".

I always delight in seeing these little cognates between the Germanic
languages. The languages are really a lot closer together than people
give them credit for -- especially the rarely used words, which
haven't had such an opportunity to mutate. Frisian (spoken in some
coastal regions of the Netherlands, Germany and Denmark) sounds
almost like English spoken in a very funny accent.

Ah! Kind of like English the way the Brits speak it. ;)
Brits don't speak English; they sort of gargle it.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds
Mar 4 '08 #55
..oO(Neredbojias)
>On 04 Mar 2008, Blinky the Shark wrote:
>Ah! Kind of like English the way the Brits speak it. ;)

Brits don't speak English; they sort of gargle it.
"We're going to be speaking English, because we're English and German
people speak better English than we speak English." ;)

[George Hinchliffe of the "Ukulele Orchestra of Great Britain" at a
concert in Berlin]

Micha
Mar 4 '08 #56
On 04 Mar 2008, Michael Fesser wrote:
.oO(Neredbojias)
>>On 04 Mar 2008, Blinky the Shark wrote:
>>Ah! Kind of like English the way the Brits speak it. ;)

Brits don't speak English; they sort of gargle it.

"We're going to be speaking English, because we're English and German
people speak better English than we speak English." ;)

[George Hinchliffe of the "Ukulele Orchestra of Great Britain" at a
concert in Berlin]
Years ago I met this German who had come to the USA after WWII. In all
honesty, he spoke better English than I or most long-term American people
did. (He also spoke excellent German.) Now Werner von Braun - he still
sounds like mashed potatoes in the mouth.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds
Mar 5 '08 #57
"Jukka K. Korpela" <jk******@cs.tut.fiwrites:
Scripsit Jon Fairbairn:
>Actually there's already a kind of collapsing of characters
in some browsers (using some rendering engines): some
character pairs (fi for example) are displayed as ligatures
(fi).

Well, it's a quite different kind of collapse, isn't it,
Indeed.
but this makes me curious: which browsers do such things,
for which character combinations?
I'm using
firefox Mozilla/5.0 (X11; U; Linux x86_64; en-GB;
rv:1.8.1.12) Gecko/20080208 Fedora/2.0.0.12-1.fc7
Firefox/2.0.0.12 On Fedora. I think it uses pango.

But it seems I was mistaken. What fooled me was that if I
type into a text area the spacing of the characters changes
suddenly once one of the fi fl ffi ffl combinations is
entered. This is disconcerting, so I looked closely and saw
something that looked like a ligature. As far as I can tell
it doesn't do this in page bodies.
>I don't think we would want to mandate that that didn't
happen either.

That's debatable. I might want that. For example, if I write
my E-mail address, I don't want any wowser to display the
".fi" part using an "fi" ligature.
It's not clear to me what the problem with that is, as long
as selecting the text gave you the right sequence of
characters (and perhaps something clever happened to permit
selection without the final i, though I can't see why that
would be what someone really wanted).
Generally, use of ligatures (at least for Latin
characters) would be something _unexpected_.
No, I don't think so. I saw it because I was expecting it!
In printed typography, use of ligatures is the norm; the
ligatures are used simply to improve appearance -- eg "fi"
either looks too spaced out or the dot on the top of the "i"
crashes into the kern of the f.
So I think ligature rendering should be off by
default. But this is (at least currently) a quality of
implementation issue, not something required *n HTML specs.
That's what I meant by not mandating that it doesn't
happen. It's certainly the sort of thing that a user might
turn off, but (as long as it was done right), I think the
HTML (or CSS) specs shouldn't say that it mustn't be done.
If you want ligatures, you can explicitly ask for them using
a control character or, more effectively, replacing a
sequence of characters by a compatibility character
representing their ligature, such as &#xfb01;.
The trouble with that is that it turns a presentation issue
into content. If my site is called "Waffle shop" I might
reasonably hope that (given a capable output device) the ffl
is displayed as nicely as possible, but I certainly want a
user to get 11 characters if they copy and paste it, and I
want it to match those eleven characters in web searches.
--
Jón Fairbairn Jo***********@cl.cam.ac.uk

Mar 5 '08 #58
On 2008-03-05, Jon Fairbairn <jo***********@cl.cam.ac.ukwrote:
"Jukka K. Korpela" <jk******@cs.tut.fiwrites:
[...]
>Generally, use of ligatures (at least for Latin
characters) would be something _unexpected_.

No, I don't think so. I saw it because I was expecting it!
In printed typography, use of ligatures is the norm; the
ligatures are used simply to improve appearance -- eg "fi"
either looks too spaced out or the dot on the top of the "i"
crashes into the kern of the f.
Most of the current generation of browsers (including IE, Firefox 2,
Opera 9) don't even do kerning.
>So I think ligature rendering should be off by
default. But this is (at least currently) a quality of
implementation issue, not something required n HTML specs.

That's what I meant by not mandating that it doesn't
happen. It's certainly the sort of thing that a user might
turn off, but (as long as it was done right), I think the
HTML (or CSS) specs shouldn't say that it mustn't be done.
Definitely. Arabic and Devanagari look pretty bad without ligatures,
although English doesn't really need them.
>If you want ligatures, you can explicitly ask for them using
a control character or, more effectively, replacing a
sequence of characters by a compatibility character
representing their ligature, such as &#xfb01;.

The trouble with that is that it turns a presentation issue
into content.
I also think it's unreasonable to expect authors to go that much
trouble.
If my site is called "Waffle shop" I might reasonably hope that (given
a capable output device) the ffl is displayed as nicely as possible,
but I certainly want a user to get 11 characters if they copy and
paste it, and I want it to match those eleven characters in web
searches.
Exactly.
Mar 5 '08 #59
Ben C wrote:
On 2008-03-05, Jon Fairbairn <jo***********@cl.cam.ac.ukwrote:
>"Jukka K. Korpela" <jk******@cs.tut.fiwrites:
[...]
>>Generally, use of ligatures (at least for Latin
characters) would be something _unexpected_.
No, I don't think so. I saw it because I was expecting it!
In printed typography, use of ligatures is the norm; the
ligatures are used simply to improve appearance -- eg "fi"
either looks too spaced out or the dot on the top of the "i"
crashes into the kern of the f.

Most of the current generation of browsers (including IE, Firefox 2,
Opera 9) don't even do kerning.
>>So I think ligature rendering should be off by
default. But this is (at least currently) a quality of
implementation issue, not something required *n HTML specs.
That's what I meant by not mandating that it doesn't
happen. It's certainly the sort of thing that a user might
turn off, but (as long as it was done right), I think the
HTML (or CSS) specs shouldn't say that it mustn't be done.

Definitely. Arabic and Devanagari look pretty bad without ligatures,
although English doesn't really need them.
>If my site is called "Waffle shop" I might reasonably hope that (given
a capable output device) the ffl is displayed as nicely as possible,
but I certainly want a user to get 11 characters if they copy and
paste it, and I want it to match those eleven characters in web
searches.

Exactly.
I just copied the following three words from an Arabic web page from
both IE7 and Firefox and pasted it into Notepad on Windows Vista:

كتفسير لآيات الكتاب

Then in both copies I inserted a space after every letter. This caused
every letter's appearance to switch to its isolated form AND I was able
to insert a space into the laam-alif ligature at the beginning of the
second word, resulting in the separation of the letters. In fact, I can
do that here in Thunderbird as well:

ك ت ف س ي ر ل آ ي ا ت ا ل ك ت ا ب

So it's definitely the content, and not the presentation, that's being
conveyed via the clipboard.

Mar 5 '08 #60

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.