One of my top wishlist items for Open Rails has been a better way to handle digital displays for brakes, speedometers, etc in Open Rails. OR uses a one-size-fits all approach, which is usually closer to one-size-fits-none. The size and typeface usually looks wrong on just about every locomotive except maybe the MSTS default Dash9 and Acela, and even those, frankly, don’t look great. With version 1.0 looming on the horizon, that’s a big issue to me.
Up to now in MSTS, a few producers of high-detail cabs have offered up a means of swapping the gui_fnts.dat file in MSTS for an alternative file with smaller display digits. That works well in cabs by Borislav Miletić and Charlie Sibaja; and it’s possible to swap the small-fonts version of gui_fnts.dat out for the standard set with a batch file that copies in a stored version of either on demand. Open Rails, however, has the font handling coded in; there’s no file-swapping trickery possible. So up until now, we’ve been stuck with what Open Rails uses as a default.
Carlo Santucci, known by many in the MSTS world for defining an improved SOUNDCFG.DAT file, has added much improved font-handling to Open Rails. It’s now part of the experimental release cycle, starting with version X2257 of Sunday, 25 March. It will show up in the general weekly publication of the experimental release on Friday, 6 March. (If you’re not using at least the “weekly” experimental release available every Friday, you’re missing out on a lot!)
When you first start up OR, it will seem that nothing has changed. There are no font options in the menu, no key commands in the simulation. To take advantage of this new feature, you need to add a new parameter to any .CVF file you want to give improved fonts.
Here is the format:
ORTSfont ( fontsize fontstyle "fontname" )
This line has to be inserted in each block of the digital controls or digital clock that you want to modify. It must reside inside the parenthesis that delineate the block. I like to drop it in as the last line before the close parenthesis.
Each section has a specific format:
fontsize is a floating-point value. (The default value, and largest, is 10) Whole numbers are easiest, but you can use decimals (ex. 7.5) to tweak it.
fontstyle an integer value which can be either 0 (default) for regular and 1 for bold.
“fontname” is a string that matches the desired font family name (The default is “Courier New”) “Arial” is a good choice for a sans-serif font that matches locomotive displays; it’s present on all Windows installations so it should always work. Note that the “fontname” is always enclosed in double quotes.
January 2017 update: The “fontname” is the exact name of the font. Original Open Rails documentation of this feature calls it “fontfamily” but that can be confusing due to how Windows fonts are named and organized, so I’ve updated my documentation to use “fontname” for clarity. The font name can always be determined by going to the Control Panel and opening Fonts, then double-click the font file for the font you want to use. In the example window that opens, more than one variation may be listed in a widow. Double-click the variation you’d like to use, and in the example window that appears, the exact name will be given at the heading “Font Name:”. Some fonts use the same name for all variations in a family. This may limit how you can utilize the font’s variations in Open Rails. OR can only base the display on the fundamental version of the font, and apply regular or bold weight to it.
Remember that each display needs this line added and configured. At first, that might seem a little tedious, but it’s necessary for the flexibility that’s offered in this method. If one or more digital displays are of a different size, they can be individually configured for the best appearance this way.
Adding these lines has absolutely no effect in MSTS — it simply ignores them — so one .CVF file can be used in both MSTS and Open Rails. MSTS will handle the .CVF as always, and Open Rails will recognize and apply the settings defined in the new lines.
Here’s an example, using my default Dash9. I’ve configured it to use a cab by Borislav Miletić, which has smaller displays than the default MSTS setup required in its .CVF file. Open Rails will normally generate digital display numbers that overlap / overrun the areas on the panel they belong in. With the modified .CVF file, they are set to a prototypical size and style.
First there are four brake system displays that have the line added, and they are right at the start of the Displays section as you can see in this section from the .CVF file. (Note that WordPress left-justifies everything and I can’t stop it, so the left-right formatting isn’t as it shows up in the .CVF file. I’ve highlighted the new OpenRails line in red.) Again, notice that the added line comes just before the closing parenthesis of each block, right after the ‘Units’ declaration. It could as easily go anywhere in the block, but the last position is the easiest to make a new line, paste it in and avoid parenthesis errors. Here’s the example:
CabViewControls ( 27
Digital (
Type ( BRAKE_PIPE DIGITAL )
Position ( 257 257 26 17 )
ScaleRange ( 0 120 )
Accuracy ( 0 )
AccuracySwitch ( 0 )
LeadingZeros ( 0 )
Justification ( 1 )
PositiveColour ( 1
ControlColour ( 182 201 173 )
)
NegativeColour ( 0 )
DecreaseColour ( 0 )
Units ( PSI )
ORTSfont ( 5 0 "Arial" )
)
Digital (
Type ( EQ_RES DIGITAL )
Position ( 257 269 26 17 )
ScaleRange ( 0 120 )
Accuracy ( 0 )
AccuracySwitch ( 0 )
LeadingZeros ( 0 )
Justification ( 1 )
PositiveColour ( 1
ControlColour ( 182 201 173 )
)
NegativeColour ( 0 )
DecreaseColour ( 0 )
Units ( PSI )
ORTSfont ( 5 0 "Arial" )
)
Digital (
Type ( BRAKE_CYL DIGITAL )
Position ( 257 282 26 17 )
ScaleRange ( 0 90 )
Accuracy ( 0 )
AccuracySwitch ( 0 )
LeadingZeros ( 0 )
Justification ( 1 )
PositiveColour ( 1
ControlColour ( 182 201 173 )
)
NegativeColour ( 0 )
DecreaseColour ( 0 )
Units ( PSI )
ORTSfont ( 5 0 "Arial" )
)
Digital (
Type ( MAIN_RES DIGITAL )
Position ( 273 282 26 17 )
ScaleRange ( 0 140 )
Accuracy ( 0 )
AccuracySwitch ( 0 )
LeadingZeros ( 0 )
Justification ( 1 )
PositiveColour ( 1
ControlColour ( 182 201 173 )
)
NegativeColour ( 0 )
DecreaseColour ( 0 )
Units ( PSI )
ORTSfont ( 5 0 "Arial" )
)
These added lines above will cause Open Rails to show the brake pressure displays in a smaller size, with the Arial sans-serif font. The speedometer digital readout should be larger, so its entry, further down in the .CVF file, is slightly different:
Digital (
Type ( SPEEDOMETER DIGITAL )
Position ( 304 271 30 30 )
ScaleRange ( 0 80 )
Accuracy ( 0 )
AccuracySwitch ( 9.9 )
LeadingZeros ( 0 )
Justification ( 1 )
PositiveColour ( 0
ControlColour ( 182 201 173 )
)
NegativeColour ( 0 )
DecreaseColour ( 0 )
Units ( MILES_PER_HOUR )
ORTSfont ( 7 0 "Arial" )
)
Notice the larger size value above for the speedometer display.
You can see the result in this screenshot:
The speedometer display could probably be improved with changing the font style to bold, but as it is now it’s a great improvement.
Remember, adding this line to the .CVF file will affect how Open Rails applies size and font effects, but it’s completely ignored if you use the same file in MSTS. So it doesn’t cause any compatibility issues at all.