Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to set font sizes of the white space character?

    Help wanted · · · – – – · · ·
    2
    2
    694
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wu Changze
      Wu Changze last edited by

      I intend to read some documents in a particular style. It is great that I can define different fonts for different words using Keywords in User Defined Language. But I can’t find where to set the font size of the white space character. Can I use different font sizes (and size families) for white space characters in different user-defined languages, and how?

      Another problem about it is that if a fixed-width font is used (e.g. consolas) to style codes in the text, while another font is used (e.g. Courier New) in the global default region, the widths would be a little different despite the same font size. The last few words would not be aligned in columns and the lines in text tables (like below) would not comes exactly as lines, as some of the verticle lines would be at a little left position and some would be right. (The pixel length of a line with 2 seeable characters and 8 white spaces is different with that of a line with 8 seeable characters and 2 white spaces. It is, in my opinion, the matter of font-families here.)

      ┌────────────────────┬─────────────────────┐
      │    Table           │  Like This          │ 
      ├────────────────────┼─────────────────────┤ 
      │                    │                     │ 
      └────────────────────┴─────────────────────┘
      
      Meta Chuh 1 Reply Last reply Reply Quote 0
      • Meta Chuh
        Meta Chuh @Wu Changze last edited by

        welcome to the notepad++ community, @Wu-Changze

        it is not possible to change the whitespace fonts separately from the text font containing them.
        but maybe @dail 's ElasticTabstops plugin may help you to get some of your documents aligned as desired.
        you can install it via the built in plugins > plugins admin menu in all newer versions of notepad++.

        regarding the usage of fixed width fonts and their spacing differences, it is recommended to use one single font only, and only use colour, bold and italic as highlighting elements, to avoid misalignments.

        many thanks and best regards.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors