Runge Forums  

Go Back   Runge Forums > XPAC Forums > Scripting Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-Oct-2006, 03:22 AM
Sean Stewart Sean Stewart is offline
Administrator
 
Join Date: Jun 2005
Posts: 203
Default Fonts for UltraEdit

If you spend a lot of your time in UltraEdit, you've probably gotten sick of the courier font which it uses by default. A number of Runge employees use a replacement font -- five minutes effort can take you from this



to this



which I find a lot more readable -- and you get more lines on the screen. I use a font called "Bitstream Vera Sans Mono", which is an open source font from the people at the GNOME project. Many people use Andale Mono also, which is a similar font Microsoft once produced. The directions below are for the Bitstream Vera font, but if you can find Andale or any other font you like the steps are the same.

To install a replacement font:
1. Download this to your computer.
2. Extract the contents anywhere.
3. From Start|Control Panel|Fonts, File|Install New Font.
4. Go to the directory you extracted the fonts to. Select all, and select "Copy fonts to Fonts folder", then hit Ok.
5. Now, from within UltraEdit, choose "Bitstream Vera Sans Mono" from the View|Set Font dialog box.
6. In some cases, your PC may be set up poorly and any font will look blocky. The best way to fix this is to:
a) Open Display Properties by right clicking on an empty portion of your desktop and selecting Properties from the menu.



b) Choose the Effects button from the Appearance tab.



c) Tick on font smoothing and choose ClearType -- Ok your way out



d) Also note that if you are using an LCD monitor, and don't have it set at it's nominal resolution, it will always look bad.
Attached Images
File Type: jpg CourierImage.jpg (54.8 KB, 226 views)
File Type: jpg BitstreamVeraImage.jpg (61.5 KB, 228 views)
File Type: jpg AddFont.jpg (41.2 KB, 59 views)
File Type: jpg DisplayProperties.jpg (13.2 KB, 187 views)
File Type: jpg Appearance.jpg (41.1 KB, 183 views)
File Type: jpg Effects.jpg (25.8 KB, 185 views)
Attached Files
File Type: zip ttf-bitstream-vera-1.10.zip (344.9 KB, 182 views)
Reply With Quote
  #2  
Old 16-Oct-2006, 11:54 PM
Alun Phillips's Avatar
Alun Phillips Alun Phillips is offline
Super Moderator
 
Join Date: Jun 2005
Posts: 70
Default A bit more about fonts

The fonts you use everyday in documents and spreadsheets are called proportional or variable width fonts, becuase the width of each character is different. A 'W' is much wider than an 'I' for example. In Ultraedit, we don't use this type of font becuase the text on each line won't line up (particualrly with comment blocks). Instead, we use fixed width or mono-spaced fonts where each character ocupies exactly the same width. The following example shows the same code sample in Courier New and Arial. Courier isnt exactly a pretty font, but you can see that getting everything to line up does makes it easier to read.

Code:
Sub Example 'Using Courier New
   For lEachLoop = 1 To 3 Step 1        'Repeat for each item
      If lEachLoop = 2 Then             'If this is the second item
         lVariable = 6                  'Set the denominator
      Else                              'If this wasn't second item
         lVariable = lEachLoop + 3      'Set the denominator
      End If
      dAnother = lVariable / 15         'Calculate ratio
      Print dAnother                    'Print result
   Next lEachLoop                       'Process next 
End Sub
Code:
Sub Example 'Using Arial
   For lEachLoop = 1 To 3 Step 1        'Repeat for each item
      If lEachLoop = 2 Then             'If this is the second item
         lVariable = 6                  'Set the denominator
      Else                              'If this wasn't second item
         lVariable = lEachLoop + 3      'Set the denominator
      End If
      dAnother = lVariable / 15         'Calculate ratio
      Print dAnother                    'Print result
   Next lEachLoop                       'Process next 
End Sub
The fonts Sean recomends are all mono-spaced, but they have also been designed with programming in mind. A good programmers font should ...
  • Have crisp, clear characters.
  • have an extended character set.
  • Make good use of whitespace.
  • 'l', '1' and 'i' are easily distinguished
  • '0', 'o' and 'O' are easily distinguished
  • forward quotes are easily distinguished from back quotes (preferably mirrored)
  • Punctuation characters are clear, especially braces, parenthesis and brackets
These features are all important, but for me, being able to distinguish between similar characters is the most important aspect of the fonts design. There is a lot of difference between Courier and Bitstream Vera Sans Mono in this regard, as the following example shows.



If you are as retentive about programming fonts as Sean and I, you can find out more information about them here.
Attached Images
File Type: bmp Examples of Mono-Spaced Fonts.bmp (167.5 KB, 184 views)

Last edited by Alun Phillips : 16-Oct-2006 at 11:57 PM.
Reply With Quote
  #3  
Old 31-Oct-2006, 05:27 AM
Scott Barber's Avatar
Scott Barber Scott Barber is offline
Super Moderator
 
Join Date: Sep 2006
Posts: 20
Default XPAC formatting vs. UE

If you've got a really well commented and formatted XCM, which looks great in UE because of your font, and your effort to line up comments, etc... Take a look at it through the eyes of a client, going in to edit it within the XPAC editor (which is what most clients use)... I'm sure most people know that the tabs in the XPAC editor represent 6 spaces rather than what most would have set in UE (3), which throws everything off, causing it to look almost like Alun's example of the comment alignment with the different fonts.

Is there a way to change this setting, or to have it changable in future editions?

I just think it's a shame for a client to look through an XCM that we've spent alot of time and effort making look good, and not be able to read what is there. This may be my fault in the way I'm formatting my XCMs, but I digress...
Reply With Quote
  #4  
Old 31-Oct-2006, 10:37 PM
Sean Stewart Sean Stewart is offline
Administrator
 
Join Date: Jun 2005
Posts: 203
Default

Scott,
That's a good point. It would make a great minor enhancement -- you can log it on the minor enhancement forum here.
Reply With Quote
  #5  
Old 01-Nov-2006, 07:12 AM
Alun Phillips's Avatar
Alun Phillips Alun Phillips is offline
Super Moderator
 
Join Date: Jun 2005
Posts: 70
Default

Quote:
Originally Posted by Scott Barber View Post
Take a look at it through the eyes of a client, going in to edit it within the XPAC editor (which is what most clients use)... I'm sure most people know that the tabs in the XPAC editor represent 6 spaces rather than what most would have set in UE (3), which throws everything off, causing it to look almost like Alun's example of the comment alignment with the different fonts.
Scott, I use the XPAC editor quite a bit becuase the debugger uses it. But I don't have the issue you raise, because I never use Tab characters to indent code. To help with this, I use an option in UltraEdit that makes it replace any tab characters with the appropriate number of spaces. It doesn't help when you hit the tab key inside the XPAC editor, but it does mean that when a client opens your scripts, they still look pretty.

To configure UltraEdit so it replaces tabs with spaces, open the configuration dialogue (Advanced | Configuration), select the Editor | Word Wrap & Tab Settings item in the tree then tick the Use Spaces Instead Of Tabs checkbox.
Reply With Quote
  #6  
Old 25-Jul-2010, 08:01 AM
Sean Stewart Sean Stewart is offline
Administrator
 
Join Date: Jun 2005
Posts: 203
Default

A good article on LOTS of NP fonts can be found here.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.