Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > unicode textsize

Reply
Thread Tools

unicode textsize

 
 
Wim Roffal
Guest
Posts: n/a
 
      09-27-2004
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


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-27-2004
"Wim Roffal" <(E-Mail Removed)> wrote:

> 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.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
 
Wim Roffal
Guest
Posts: n/a
 
      09-27-2004
The url can be found at http://www.classiccat.net/text9f.html

If you look sharply you will see that the one line with the arrow is a bit
higher as all the other lines. I would like to know why.

Thanks,
Wim



"Wim Roffal" <(E-Mail Removed)> schreef in bericht
news:cj90hr$r45$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Daniel R. Tobias
Guest
Posts: n/a
 
      09-27-2004
"Wim Roffal" <(E-Mail Removed)> wrote in message news:<cj97h1$c87$(E-Mail Removed)>...
> The url can be found at http://www.classiccat.net/text9f.html
>
> If you look sharply you will see that the one line with the arrow is a bit
> higher as all the other lines. I would like to know why.


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).

Don't top-post:
http://mailformat.dan.info/quoting/

--
Dan
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-27-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (Daniel R. Tobias) wrote:

>> The url can be found at http://www.classiccat.net/text9f.html
>>
>> If you look sharply you will see that the one line with the arrow is
>> a bit higher as all the other lines. I would like to know why.

>
> 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/~jk....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.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Wim Roffal
Guest
Posts: n/a
 
      09-28-2004
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

"Jukka K. Korpela" <(E-Mail Removed)> schreef in bericht
news:Xns95722EF3D6E9jkorpelacstutfi@193.229.0.31.. .
> (E-Mail Removed) (Daniel R. Tobias) wrote:
>
> >> The url can be found at http://www.classiccat.net/text9f.html
> >>
> >> If you look sharply you will see that the one line with the arrow is
> >> a bit higher as all the other lines. I would like to know why.

> >
> > 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/~jk....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.)
>
> --
> Yucca, http://www.cs.tut.fi/~jkorpela/
> Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
>
>



 
Reply With Quote
 
Wim Roffal
Guest
Posts: n/a
 
      09-28-2004
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


"Wim Roffal" <(E-Mail Removed)> schreef in bericht
news:cjbcpk$hk6$(E-Mail Removed)...
> 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
>
> "Jukka K. Korpela" <(E-Mail Removed)> schreef in bericht
> news:Xns95722EF3D6E9jkorpelacstutfi@193.229.0.31.. .
> > (E-Mail Removed) (Daniel R. Tobias) wrote:
> >
> > >> The url can be found at http://www.classiccat.net/text9f.html
> > >>
> > >> If you look sharply you will see that the one line with the arrow is
> > >> a bit higher as all the other lines. I would like to know why.
> > >
> > > 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/~jk....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.)
> >
> > --
> > Yucca, http://www.cs.tut.fi/~jkorpela/
> > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
> >
> >

>
>



 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-28-2004
"Wim Roffal" <(E-Mail Removed)> wrote:

> 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.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Wim Roffal
Guest
Posts: n/a
 
      09-28-2004

"Jukka K. Korpela" <(E-Mail Removed)> schreef in bericht
news:Xns957295713614Cjkorpelacstutfi@193.229.0.31. ..
> "Wim Roffal" <(E-Mail Removed)> wrote:
>
> > 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.


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


 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      09-28-2004
On Tue, 28 Sep 2004 15:29:18 +0200, Wim Roffal
<(E-Mail Removed)> wrote:

>
> "Jukka K. Korpela" <(E-Mail Removed)> schreef in bericht
> news:Xns957295713614Cjkorpelacstutfi@193.229.0.31. ..
>> 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.


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 ****
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...

>> And you felt forced to start with
>> insulting people who have tried to help you.

>
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically changing TextSize =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?= ASP .Net 2 10-06-2006 11:41 AM
PIL PSDraw textsize method Bauke Veenstra Python 0 09-18-2006 07:14 PM
Unicode digit to unicode string Gabriele *darkbard* Farina Python 2 05-16-2006 01:15 PM
unicode wrap unicode object? ygao Python 6 04-08-2006 09:54 AM
Unicode + jsp + mysql + tomcat = unicode still not displaying Robert Mark Bram Java 0 09-28-2003 05:37 AM



Advertisments