Find the answer to your Linux question:
Results 1 to 7 of 7
Code looks ugly and is harder to read if it does not appear in fixed width font....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575

    Fixed width font for the code tag


    Code looks ugly and is harder to read if it does not appear in fixed width font.

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    could you explain more?

  3. #3
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    For example
    Code:
    wwww
    ....
    Although both lines in the code have 4 characters, one appears much wider
    than the other.Or at least that's how it looks on my screen.I'm saying
    the choice of fonts should be such that both lines should have the same
    width because otherwise it makes code harder to read.

    I don't know much about fonts but I'm assuming that there are fonts
    where every character has the same width and it would appear as such
    on every computer which has these fonts.Using Kedit , Courier fonts have this
    property.

  4. #4
    Linux Newbie
    Join Date
    Jun 2005
    Location
    Whitstable, Kent, England
    Posts
    136
    There are quite a few fonts that do have a set width, for example "Lucida Console". Probably anything with console in the name is a good chice for code editing.
    The biggest security threat is the user.

  5. #5
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    Actually I viewed this thread on a different computer and the two lines in
    the code had the same width.So perhaps it has to do with my browser's (Firefox)
    settings and not the page ? I was assuming it is the page which tells the browser
    which fonts to use.

  6. #6
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    Settings. Works fine here on firefox.

    I use Lucida Typewriter font for Monospace fonts.
    I\'m so tired .....
    #200472

  7. #7
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    It displays fixed-width for me in FF.

    I've added Lucida Console into the CSS file as a font option for the code blocks, if that doesnt make any difference to you go to Edit -> Preferences -> General -> Fonts & Colors in FireFox, and choose a different font for Monospace text.

    J.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •