Skip to main content

Useful Trivia: Fixed-width Fonts

Have you ever had situation where you copied something (usually from a command line terminal) that's aligned and paste it, and find that it's not aligned anymore?
 
This is because command line terminals usually use a fixed-width font, but the default font in Windows is usually not. A fixed-width font (also called monospaced font) means that every character in the font will always have the same width. Hence, lines would always align. 
 
See this example where 10 '.' and 10 numbers are used:

Fixed-width (Consolas)
..........
0123456789

Non fixed-width (Arial)
..........
0123456789

So the simple solution for the aforementioned scenario is just to change the font where you paste it and viola, your text is aligned again.
 
A few of my favourite fixed width fonts: Consolas (comes with Windows), Bitstream Vera Sans Mono. Also notable: Courier New, Ubuntu Sans Mono, Inconsolata.

Comments

Popular posts from this blog

Another Rainmeter setup

Because I like dark wallpapers too. Current desktop Alternative wallpaper Details 10 Foot HUD YBoris edit skin for the time and date Enigma Now Playing skin Dynamic quotes skin by me. Uses the quote plugin to display a random lime from a text file. Notes skin to display my to do list. Based on the notes skin from Lady Gaga Tribute by Alek Aldinger and Simplesentence3 by White-Baron. Uptime skin by me Autobahn font for my tweaked skins Lamp wallpaper by CL88 Aurore wallpaper   Why use Rainmeter? I've tried Rainmeter before but it never stuck because I didn't really get the point of it. That is, until I read the Lifehacker primer and it clicked together for me - it's widgets! (I highly recommend the article, especially the section on glossary.) It's just like Yahoo Widgets (is anyone still using these?) and Windows Gadgets, except you can get all the widgets ("skins") in a matching col...

How To Find Out How Easy A Certain Japanese Text Would Be For You

Are you trying to up your Japanese reading skills? Have a set of electronic reading materials, but don't know which one to start with? One way to rate them is by how easy they would be for you to read, so you can pick the level you're comfortable with. To do that, you'll first need a text list of words you already know, and then use that as an input file to the Japanese Text Frequency Analyzer tool. An easy way to get the list is to use the Morphman plugin in Anki (I'm assuming you're using Anki. Find out how to export the list if you use another SRS/flashcard system). What you'll need: Anki Morphman Anki Plugin cb's Japanese Text Analysis Tool Steps: 1. Ensure your database of known words is up to date by forcing a Morphman Recalc. You can do this by using the Anki tools menu or the default shortcut Ctrl+M. If there are words you already know that are not in Anki, see this section of MorphMan Wiki . To make things easier for m...

Where Google+ is better than Facebook

The new kid on the social networking block, Google+ has been in field trial for just over a month. After using it actively this past week or so, I thought I'd write down the things that I like about it. Before I start, a disclaimer: this is  not  a post bashing Facebook, nor am I claiming that Google+ is the best social network out there. This is meant to be a list of the details that make me lean ever so slightly (all right, a lot) towards Google+. Some terminology before we start (Facebook on the left, Google+ on the right), wall/news feed = stream friend list = circles Here's the list of places where I think Google+ is better than Facebook, starting with the smaller details before moving to the larger differences between them. Skip to the end for the tl;dr version. 1. Editable posts and comments Google+ allows you to edit as well as delete your posts and comments. There is no time limit, and the time of last edit is displayed. ...