Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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
    London, UK
    could you explain more?

  3. #3
    For example
    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

  4. $spacer_open
  5. #4
    Linux Newbie
    Join Date
    Jun 2005
    Whitstable, Kent, England
    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.

  6. #5
    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.

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

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

  8. #7
    Linux Guru
    Join Date
    Apr 2003
    London, UK
    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.


Posting Permissions

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