Menu

Fixed length spaces

2008-03-21
2012-11-13
  • Nobody/Anonymous

    I've created my own user defined style with courier new font (fixed lenght font), but space character have smaller width then any other character. How can I properly display space characters in fixed length font?

     
    • Nobody/Anonymous

      Use the same default font as all style fonts.

       
    • Nobody/Anonymous

      I'am using "Courier New" 10px as a default font. All other fonts are set to "Courier New" 10px.
      When i write something like this:
      "
      first line
        second line
      "

      with two spaces before second line my second line starts in half of "i" letter not under the "r" letter.

       
      • Nobody/Anonymous

        Are you sure all fonts are the same, that is, if you type

        first___second

        will this have the same width as

        __first_second

        ? The underscore character _ represents a space character, but you may also use any other (combination of) characters to see whether they result in a different width.

        Are you sure you didn't set the space character to be an identifier of any other category, like comment or operator symbol?

        Did you put the quotes "" here deliberately, or are they in the file as well, possibly resulting in another font being active because of the STRING style?

         
        • laqula

          laqula - 2008-03-31

          I set "Courier New" 10px in all tabs in "User style" dialog and my text looks like this:

          http://www.fotosik.pl/pokaz_obrazek/0e48e4f45be5d81a.html

          Lines with space are shorter then lines with underscore. I can show screenshot from user style dialog if you want.

           
          • Harry

            Harry - 2008-04-01

            Looking at the CR LF blobs I say the default style is set to a different font. To test very quickly, in the Global Styles go to Global Override, select Courier new as font with 10 pts, then check both font and font size checkboxes, everything should be the same then.
            If it helps, look for the Default style and change that

             
            • laqula

              laqula - 2008-04-01

              Thanks. I changed "Default Style" in "Global Styles". It works for now, until I have one fixed lenght user defined style.

               
          • Fool4UAnyway

            Fool4UAnyway - 2008-03-31

            Perhaps you can figure out which styling is applied to the space characters by setting the underline option (or background color or...) for all (other) Styles, one at a time.