Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Could monospaced fonts be used when editing text in a code block?

Discussion in 'Meta-forum Discussion' started by Arowx, Aug 14, 2022.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Sometimes it's nice to have text monospaced and correclty aligned and that is very hard to do when you are edition it in a non-monospaced font.

    How hard would it be to ensure that in edit view anything in a code block is in a monospaced font?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    9,944
    It maybe hard or not, Unity forum team has no resources to implement such obscure request.

    Most likely you would need to change whole forum.
     
  3. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Not necessarily - they'd only need to change the font-family of the "Insert Code" overlay text area, and it's one line of CSS.

    Before (current):
    before.png

    After (with monospace):
    after.png

    The other problem is that this input box is just too small. Would be nice to increase the width & height of it like so:
    overlay.png
     
    Last edited: Aug 16, 2022
    Arowx likes this.
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    9,944
    Interesting

    I do wonder, how this would affect mobile experience. Does anyone use this feature on mobile at all? And how many people really need to use that even on desktop?

    I typically just paste the code. I think I remember using this editor once or twice in the past. But never needed further more. You can just use script tags with a click of button and is simply showing readable code on the forum.

    I try to understand usable use case.

    Perhaps someone could use CSS injection script. Somehow similar, as for dark version of the forum, or othe Unity forum areas. But that perhaps mostly would (conviniently) work on PC?
     
  5. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Tabulated information, e.g. columns of text / data.
    e.g.
    Code (Boo):
    1. Sorted
    2. 1 SOA Burst NativeArray            8,797.44 ticks 190.51%
    3. 2 SOA Burst                        9,868.87 ticks 169.82%
    4. 3 SOA Burst NativeArray Job       11,507.84 ticks 145.64%
    5. 4 AOS Burst                       13,764.39 ticks 121.76%
    6. 5 AOS Burst NativeArray           13,852.77 ticks 120.98%
    7. 6 AOS Burst NativeArray Job       13,973.93 ticks 119.94%
    8. 7 SOA                             15,239.35 ticks 109.98%
    9. 8 AOS                             16,759.74 ticks 100.00%