unicode textsize

Discussion in 'HTML' started by Wim Roffal, Sep 27, 2004.

  1. Wim Roffal

    Wim Roffal Guest

    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
    Wim Roffal, Sep 27, 2004
    #1
    1. Advertising

  2. "Wim Roffal" <> 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
    Jukka K. Korpela, Sep 27, 2004
    #2
    1. Advertising

  3. Wim Roffal

    Wim Roffal Guest

    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" <> schreef in bericht
    news:cj90hr$r45$...
    > 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
    >
    >
    Wim Roffal, Sep 27, 2004
    #3
  4. "Wim Roffal" <> wrote in message news:<cj97h1$c87$>...
    > 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
    Daniel R. Tobias, Sep 27, 2004
    #4
  5. (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/~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.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Sep 27, 2004
    #5
  6. Wim Roffal

    Wim Roffal Guest

    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" <> schreef in bericht
    news:Xns95722EF3D6E9jkorpelacstutfi@193.229.0.31...
    > (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/~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.)
    >
    > --
    > Yucca, http://www.cs.tut.fi/~jkorpela/
    > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    >
    >
    Wim Roffal, Sep 28, 2004
    #6
  7. Wim Roffal

    Wim Roffal Guest

    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" <> schreef in bericht
    news:cjbcpk$hk6$...
    > 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" <> schreef in bericht
    > news:Xns95722EF3D6E9jkorpelacstutfi@193.229.0.31...
    > > (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/~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.)
    > >
    > > --
    > > Yucca, http://www.cs.tut.fi/~jkorpela/
    > > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    > >
    > >

    >
    >
    Wim Roffal, Sep 28, 2004
    #7
  8. "Wim Roffal" <> 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
    Jukka K. Korpela, Sep 28, 2004
    #8
  9. Wim Roffal

    Wim Roffal Guest

    "Jukka K. Korpela" <> schreef in bericht
    news:Xns957295713614Cjkorpelacstutfi@193.229.0.31...
    > "Wim Roffal" <> 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
    Wim Roffal, Sep 28, 2004
    #9
  10. Wim Roffal

    Neal Guest

    On Tue, 28 Sep 2004 15:29:18 +0200, Wim Roffal
    <> wrote:

    >
    > "Jukka K. Korpela" <> 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 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...

    >> 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. ;)
    Neal, Sep 28, 2004
    #10
  11. Wim Roffal

    Wim Roffal Guest

    Hi Neal,

    "Neal" <> schreef in bericht
    news:eek:...
    > 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.

    > > As for stopping top-posting: I disagree with this "rule". Sometimes it
    > > works, sometimes other ways are more insightfull.

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

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

    ;)

    Wim
    Wim Roffal, Sep 28, 2004
    #11
  12. Wim Roffal

    Neal Guest

    On Tue, 28 Sep 2004 21:44:02 +0200, Wim Roffal
    <> wrote:

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

    >> > As for stopping top-posting: I disagree with this "rule". Sometimes it
    >> > works, sometimes other ways are more insightfull.

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


    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.
    Neal, Sep 29, 2004
    #12
  13. Wim Roffal

    Peter Guest

    Neal schreef:

    > On Tue, 28 Sep 2004 21:44:02 +0200, Wim Roffal
    > <> wrote:
    >
    >> 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.
    >
    >>> > As for stopping top-posting: I disagree with this "rule".
    >>> Sometimes it
    >>> > works, sometimes other ways are more insightfull.
    >>>
    >>> 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.

    >
    >
    > 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
    Peter, Sep 29, 2004
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Mark Bram
    Replies:
    0
    Views:
    3,904
    Robert Mark Bram
    Sep 28, 2003
  2. ygao

    unicode wrap unicode object?

    ygao, Apr 8, 2006, in forum: Python
    Replies:
    6
    Views:
    527
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 8, 2006
  3. Gabriele *darkbard* Farina

    Unicode digit to unicode string

    Gabriele *darkbard* Farina, May 16, 2006, in forum: Python
    Replies:
    2
    Views:
    494
    Gabriele *darkbard* Farina
    May 16, 2006
  4. Bauke Veenstra

    PIL PSDraw textsize method

    Bauke Veenstra, Sep 18, 2006, in forum: Python
    Replies:
    0
    Views:
    409
    Bauke Veenstra
    Sep 18, 2006
  5. =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=

    Dynamically changing TextSize

    =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    299
    =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=
    Oct 6, 2006
Loading...

Share This Page