unicode textsize

W

Wim Roffal

Hi,

I am writing some menusystem.

Now I notice that when I put a unicode character into it the fontsize of the
unicode character is bigger is that of the other "normal" text. So that line
of my menu becomes higher as the rest (it is an english language site).

It concerns the arrow-right symbol. I insert it with the code:
var newText = document.createTextNode("\u25b6");

Some people may know this symbol better as ▶

My questions are: what causes this exactly and how can I work around it?

Thanks,

Wim
 
J

Jukka K. Korpela

Wim Roffal said:
I am writing some menusystem.

Has this got something to do with HTML? If yes, please post a URL (and,
before that, upload the current draft version somewhere).
Now I notice that when I put a unicode character into it the fontsize
of the unicode character is bigger is that of the other "normal"
text. So that line of my menu becomes higher as the rest (it is an
english language site).

Still no obvious connection to HTML, or to any specific context for that
matter. Maybe some program you use displays characters differently?
(Even this "suggestion" requires assumptions about what you are doing.)
It concerns the arrow-right symbol. I insert it with the code:
var newText = document.createTextNode("\u25b6");

Some people may know this symbol better as ▶

My questions are: what causes this exactly and how can I work around
it?

You want an exact answer without giving even inexact information about
what you are doing, except a random snippet from a program in some
unspecified language (which is surely not HTML)?

_If_ you are using some Web browser and the character actually appears in
an HTML document, then the probable general answer is that the browser
picks up a glyph for the arrow from a font different from the one it uses
for copy text.

What _really_ happens and how it might perhaps be fixed depends on the
HTML markup, eventual style sheet(s) involved, character encoding of the
document (see the point in asking for a URL?), browser(s) used, their
settings (especially in the fonts sections), and other things, possibly
including the phase of the moon.
 
J

Jukka K. Korpela

I suppose it depends on browser, platform, installed fonts, and so
on... I didn't observe any height difference there in my browser
(Mozilla 1.6 in Windows XP).

Same here, with IE 6.0 on Windows 98. The height of a character should
not affect the line height. Maybe the OP meant the _impression_ of
height. After all, the arrow symbol starts at the baseline and usually
extends to the same height as capital letters (on the fonts I tried, see
http://www.cs.tut.fi/cgi-bin/run/~jkorpela/char.cgi?code=25b6
for some samples), so it may _seem_ to raise the line.

The character ▶, though present in many fonts, does not work quite
reliably across browsing situations. So unless you need to rely on good
character support for other, more compelling reasons (e.g., the page
contains polytonic Greek or high math), I would suggest using a small
GIF image (with an adequate alt text, of course) instead. This may
actually raise the line height question, since an image may affect the
height, so it's best to make the images height fairly small, like
9 pixels. (Admittedly, by using a character you make it take the color of
the text, participating in link color variation if it is inside link
text.)
 
W

Wim Roffal

I am afraid an eye doctor can do good business in this newsgroup. The
difference is 2 or 3 pixels.

I have updated the example file (http://www.classiccat.net/text9f.html), so
next to the first block there is now a second block that is exactly the same
except for the unicode arrow sign.

Wim
 
W

Wim Roffal

Just to be complete: this has been tested on IE 5.5 and Mozilla 1.7 under
Windows ME. Both give the same effect.

Interestingly Opera (both 6 and 7) does not display this effect.

Wim
 
J

Jukka K. Korpela

Wim Roffal said:
I am afraid an eye doctor can do good business in this newsgroup.

You don't seem to be interested in working by the newsgroup rules and
practices. You were already asked to stop top-posting, and your original
explanation was mostly a confusion. Now you are slowly approaching to
giving a useful description of your problem, but you still make things
difficult by using incorrect CSS and pixel-valued positioning that hides
much of the appearance of the problem. And you felt forced to start with
insulting people who have tried to help you.

Please continue using an apparently forged From field as a useful signal
_if_ you fail to understand the above or to adapt to constructive Usenet
behavior.
 
W

Wim Roffal

Jukka K. Korpela said:
You don't seem to be interested in working by the newsgroup rules and
practices. You were already asked to stop top-posting, and your original
explanation was mostly a confusion.

My original question was if unicode causes a higher textsize. I think that
that would be enough for someone who knew about this stuff. By thinking up
and making a nice demo (costs a lot of time) I have made the question more
accessable for the other readers, but I doubt if that will result in any
more usefull answers.

As for stopping top-posting: I disagree with this "rule". Sometimes it
works, sometimes other ways are more insightfull.
Now you are slowly approaching to
giving a useful description of your problem, but you still make things
difficult by using incorrect CSS and pixel-valued positioning that hides
much of the appearance of the problem.

I don't see how my pixel-valued positioning hides the problem. I want to
compare the two blocks so that the difference becomes visible and I think I
have achieved that goal.

Concerning the incorrect CSS (nothing serious as far as I can see), the
working by newsgroup rules and other things: please stop butchering everyone
who doesn't conform to your towerhigh standards.
And you felt forced to start with
insulting people who have tried to help you.

Where is your sense of humour?
Please continue using an apparently forged From field as a useful signal
_if_ you fail to understand the above or to adapt to constructive Usenet
behavior.

Nothing forged about the email address, just spam-protected.

Wim
 
N

Neal

My original question was if unicode causes a higher textsize. I think
that
that would be enough for someone who knew about this stuff. By thinking
up
and making a nice demo (costs a lot of time) I have made the question
more
accessable for the other readers, but I doubt if that will result in any
more usefull answers.

Your text wrap's too long too, but that's for another day.

If anyone here knows the answer to your problem, it's Jukka. Don't piss
him off, 'cause then you lose a rather valuable source of advice on this
issue.

If Jukka provides no answer, either you haven't given enough info or he's
done with you. So if he needs more, give him more. Seriously.
As for stopping top-posting: I disagree with this "rule". Sometimes it
works, sometimes other ways are more insightfull.

Guess what? When in Rome...
Where is your sense of humour?

Where is your smily? If you're going to insult us without a wink, we'll
pop out one of your eyes so you have to. ;)
 
W

Wim Roffal

Hi Neal,

Neal said:
If anyone here knows the answer to your problem, it's Jukka. Don't piss
him off, 'cause then you lose a rather valuable source of advice on this
issue.

If Jukka provides no answer, either you haven't given enough info or he's
done with you. So if he needs more, give him more. Seriously.

I spent half a day debugging my layout problem until I had analyzed that the
unicode character was the problem. So I come with a focussed and
well-prepared question to this newsgroup. If someone needs more info or a
demo, no problem. But I hate it when someone comes rolling over me like a
10-ton truck, his genuine questions mixed with a lot of hairsplitting
criticism and that all in a very unfriendly tone.
Guess what? When in Rome...
I have the impression that some people like to think that this is their
town. Top-posting is quite common in internet newsgroups and in some groups
even the rule. If you answer a message item by item bottom-posting is
easier. If you answer a message as a whole top-posting is easier.
Where is your smily? If you're going to insult us without a wink, we'll
pop out one of your eyes so you have to. ;)
;)

Wim
 
N

Neal

But I hate it when someone comes rolling over me like a
10-ton truck, his genuine questions mixed with a lot of hairsplitting
criticism and that all in a very unfriendly tone.

Understand that this is an international forum. Jukka struck me as odd
when I first met him, but as I grew to understand he isn't a US type but a
northern Euro type, I got it. Don't let the culture thing throw you aside.
I have the impression that some people like to think that this is their
town. Top-posting is quite common in internet newsgroups and in some
groups
even the rule. If you answer a message item by item bottom-posting is
easier. If you answer a message as a whole top-posting is easier.

But in this discipline, keeping track of the thread is vital. The
archiving is dependant on easy-to-follow posting.

When in alt.music.trombone or alt.music.saxophone I post like I always do,
but I'm not militant about others' posting style. Here, though, it's of
more relevance.
 
P

Peter

Neal schreef:
Understand that this is an international forum. Jukka struck me as odd
when I first met him, but as I grew to understand he isn't a US type
but a northern Euro type, I got it. Don't let the culture thing throw
you aside.



But in this discipline, keeping track of the thread is vital. The
archiving is dependant on easy-to-follow posting.

When in alt.music.trombone or alt.music.saxophone I post like I always
do, but I'm not militant about others' posting style. Here, though,
it's of more relevance.

when I resize (bigger) the arrow vanishes
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top