Results 1 to 10 of 10

Thread: 7 Segment Digital Readout

  1. #1
    Join Date
    Jun 2009
    Location
    Oshawa ON
    Posts
    1,459

    Default 7 Segment Digital Readout

    Hello, I have downloaded the files as suggested in another post from the Font Library, but I cannot get it to work in OR.

    I do not use MSTS, but that should not matter. The file that I have is "Standard7Segment" and it is installed in the Win10 Fonts folder as well as the MSTS Fonts folder.

    I was informed that it did not need to be made into an ACE-file, just put the file as-is into the Fonts Folder.

    Is there something I am missing? The display in the locomotive did not change, however, I used the OpenRails line to change the other displays to a better looking Font and they show properly. The line with "Arial" works fine.

    Here is the line as installed:

    )
    Digital (
    Type ( MAIN_RES DIGITAL )
    Position ( 332 382 26 10 )
    ScaleRange ( 0 160 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 255 255 255 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( PSI )
    ORTSfont ( 8 0 "Arial" )
    )
    Gauge (
    Type ( LOAD_METER GAUGE )
    Position ( 412 369 90 8 )
    Area ( 0 0 16 16 )
    Graphic ( dig_white.ace )
    Style ( SOLID )
    ScaleRange ( -1200 1800 )
    ZeroPos ( 0 )
    PositiveColour ( 1
    ControlColour ( 90 158 112 )
    )
    NegativeColour ( 1
    ControlColour ( 221 221 0 )
    )
    Orientation ( 0 )
    DirIncrease ( 0 )
    Units ( AMPS )
    ORTSfont ( 8 0 "Segment7Standard" )
    )

    Any suggestions?

  2. #2
    Join Date
    Apr 2011
    Location
    New England
    Posts
    793

    Default

    Go to your Control Panel, Fonts item and double-click the font you installed to get the typography sample display. You may find that when you double-click it, more font file icons may appear because the file is a "family" of several versions. Double-click the file you want to examine and look up at the top of the window for the "Font Name:" entry. Make sure the font name displayed there is exactly the same as you typed it in the ORTSFont line. If not, adjust it in the .cvf file.

    Some fonts have a filename slightly different from the font's actual name it reports to Windows. That's because one font file may include the regular, bold, italic, etc. versions and there has to be a way to name them individually.

    For instance the master "Arial" font file is just called Arial. But it includes versions inside all with different variations on the name.

    If you downloaded the font from fontlibrary.org, then the actual name is just "Segment7".

    If it still doesn't work, or gives odd results, it may be because it's in OpenType format instead of TrueType. (TrueType is the standard font format used by Windows, and the XNA framework used in OR may have a preference for it.) There are quite a few font converters available online that can convert the font file format to a .ttf (TrueType) version.
    Last edited by EricF; 06-11-2016 at 05:31 PM.


    MSTS-Roundhouse

    With Open Rails and ZDSimulator
    Info

  3. #3
    Join Date
    Jun 2009
    Location
    Oshawa ON
    Posts
    1,459

    Default

    Thank you for the information Eric, but to no avail as yet.

    I found that the number 8 was an error on my part, this font does not have a 8 but it is 18, so I changed that. It is "OpenType" font as can be seen here:
    Segment 7 digital.jpg

    I will download a converter to get it to a TTF.

    Thank You

  4. #4
    Join Date
    Jun 2009
    Location
    Oshawa ON
    Posts
    1,459

    Default

    So, I got the file converted, there are a lot of sites!!

    It now reads that it is a "True Type Font" and is installed in the main computer Fonts Folder as well as in the MSTS Fonts Folder.

    I am using the #18 size, but it still is not showing, just the default Font for the Amps (LMG).

    Oh and I also deleted the "standard" off the end.

    Gauge (
    Type ( LOAD_METER GAUGE )
    Position ( 412 369 90 8 )
    Area ( 0 0 16 16 )
    Graphic ( dig_white.ace )
    Style ( SOLID )
    ScaleRange ( -1200 1800 )
    ZeroPos ( 0 )
    PositiveColour ( 1
    ControlColour ( 90 158 112 )
    )
    NegativeColour ( 1
    ControlColour ( 221 221 0 )
    )
    Orientation ( 0 )
    DirIncrease ( 0 )
    Units ( AMPS )
    ORTSfont ( 18 0 "Segment7" )
    )

    Is it the way the script is written for that particular Gauge? I see that it has the lines: Graphic ( dig_white.ace ) - Style ( SOLID )

    That does not appear in the other digital readouts. This is in Loco #206 P42cab SLI SW Chief 2012.

    Ok, I tried that font in another gauge and it works fine. Must be in the way it is written?
    Last edited by Don6218; 06-12-2016 at 02:05 PM. Reason: Tried another gauge

  5. #5
    Join Date
    Apr 2011
    Location
    New England
    Posts
    793

    Default

    This could be part of the problem:
    ORTSfont ( 18 0 "Segment7" )

    According to the documentation the maximum allowed "fontsize" value which i highlighted in red is "10". Your line exceeds that, with "18" and at that point, OR may stop processing on the invalid value and go with the default behavior. Might be a typo.

    Try it as:
    ORTSfont ( 8 0 "Segment7" ) and see what happens.

    If the size is too big, go down one step at a time. Decimal values, like "6.3" or 8.7" are OK according to the OR documentation. So you range should be any floating-point value between 1 and 10.


    MSTS-Roundhouse

    With Open Rails and ZDSimulator
    Info

  6. #6
    Join Date
    Jun 2009
    Location
    Oshawa ON
    Posts
    1,459

    Default

    Ok, I have that value reset to 12 for the AP gauge and it works fine, just had to reposition it a little.

    The font set has numbers to the left which denote the size, that is what I was going by. I believe it has something to do with the way the added lines are referenced:
    Area ( 0 0 16 16 )
    Graphic ( dig_white.ace )
    Style ( SOLID )


    The other gauges do not have these lines. What do you think?

  7. #7
    Join Date
    Apr 2011
    Location
    New England
    Posts
    793

    Default

    Just dawned on me that the particular section you're working on is related to the horizontal bar indicator for the load meter. Just take the "ORTSfont" line out of that section in case it's causing a parse error.

    Look for yet another entry that starts out "Digial (" that still doesn't have an ORTSfont entry at the end of its group. That should be the offending display section.

    Any chance you could post the displays and gauges section of the .cvf file and I'll have a look?


    MSTS-Roundhouse

    With Open Rails and ZDSimulator
    Info

  8. #8
    Join Date
    Jun 2009
    Location
    Oshawa ON
    Posts
    1,459

    Default

    Here is the complete CabView file. The installed Segment7 entry works fine.

    [email protected]@@@@@@@@@JINX0h0t______

    Tr_CabViewFile (
    CabViewType ( 2 )
    CabViewFile ( "P42dc_mainview.ace" )
    CabViewWindow ( 0 0 640 480 )
    CabViewWindowFile ( "" )
    Position ( 1 3.5 8.8 )
    Direction ( 5 0 0 )
    CabViewFile ( "P42dc_ConductorView.ace" )
    CabViewWindow ( 0 0 640 480 )
    CabViewWindowFile ( "" )
    Position ( -1 3.5 8.8 )
    Direction ( 5 0 0 )
    CabViewFile ( "P42dc_sideview.ace" )
    CabViewWindow ( 0 0 640 480 )
    CabViewWindowFile ( "" )
    Position ( 1.2 3.5 8.8 )
    Direction ( 8 76 0 )
    EngineData ( AMTRAK_P42DC )
    CabViewControls ( 16
    MultiStateDisplay (
    Type ( DIRECTION_DISPLAY MULTI_STATE_DISPLAY )
    Position ( 475 393 23 8 )
    Graphic ( "reverser.ace" )
    States ( 3 3 1
    State (
    Style ( 0 )
    SwitchVal ( -1 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 1 )
    )
    )
    )
    Digital (
    Type ( LOAD_METER DIGITAL )
    Position ( 431 352 38 10 )
    ScaleRange ( -1200 1800 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 90 159 116 )
    )
    NegativeColour ( 1
    ControlColour ( 255 255 0 )
    )
    DecreaseColour ( 0
    ControlColour ( 0 0 0 )
    )
    Units ( AMPS )
    )
    Digital (
    Type ( SPEEDOMETER DIGITAL )
    Position ( 387 360 22 10 )
    ScaleRange ( 0 100 )
    Accuracy ( 0 )
    AccuracySwitch ( 10 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 0
    ControlColour ( 170 182 185 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( MILES_PER_HOUR )
    ORTSfont ( 10 0 "Arial" )
    )
    MultiStateDisplay (
    Type ( SANDING MULTI_STATE_DISPLAY )
    Position ( 448 391 23 13 )
    Graphic ( sand.ace )
    States ( 2 2 1
    State (
    Style ( 0 )
    SwitchVal ( 0 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 1 )
    )
    )
    )
    Dial (
    Type ( SPEEDOMETER DIAL )
    Position ( 394 305 9 41 )
    Graphic ( speedo.ace )
    Style ( NEEDLE )
    ScaleRange ( 0 100 )
    ScalePos ( 212 147 )
    Units ( MILES_PER_HOUR )
    Pivot ( 32 )
    DirIncrease ( 0 )
    )
    Digital (
    Type ( EQ_RES DIGITAL )
    Position ( 334 309 20 10 )
    ScaleRange ( 0 160 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 255 255 255 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( PSI )
    ORTSfont ( 8 0 "Arial" )
    )
    Digital (
    Type ( BRAKE_PIPE DIGITAL )
    Position ( 334 334 20 10 )
    ScaleRange ( -120 160 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 255 255 255 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( PSI )
    ORTSfont ( 8 0 "Arial" )
    )
    Digital (
    Type ( BRAKE_CYL DIGITAL )
    Position ( 334 358 20 10 )
    ScaleRange ( 0 160 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 255 255 255 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( PSI )
    ORTSfont ( 8 0 "Arial" )
    )
    Digital (
    Type ( MAIN_RES DIGITAL )
    Position ( 332 386 26 10 )
    ScaleRange ( 0 160 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 255 255 255 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( PSI )
    ORTSfont ( 12 0 "Segment7" )
    )
    Gauge (
    Type ( LOAD_METER GAUGE )
    Position ( 412 369 90 8 )
    Area ( 0 0 16 16 )
    Graphic ( dig_white.ace )
    Style ( SOLID )
    ScaleRange ( -1200 1800 )
    ZeroPos ( 0 )
    PositiveColour ( 1
    ControlColour ( 90 158 112 )
    )
    NegativeColour ( 1
    ControlColour ( 221 221 0 )
    )
    Orientation ( 0 )
    DirIncrease ( 0 )
    Units ( AMPS )
    ORTSfont ( 12 0 "Segment7" )
    )
    Gauge (
    Type ( EQ_RES GAUGE )
    Position ( 437 305 64 7 )
    Area ( 0 0 16 16 )
    Graphic ( dig_white.ace )
    Style ( SOLID )
    ScaleRange ( 40 120 )
    ZeroPos ( 0 )
    PositiveColour ( 1
    ControlColour ( 38 135 188 )
    )
    NegativeColour ( 0 )
    Orientation ( 0 )
    DirIncrease ( 0 )
    Units ( PSI )
    )
    Lever (
    Type ( ENGINE_BRAKE LEVER )
    Position ( 591 288 11 64 )
    Graphic ( dig_blank_lever.ace )
    Style ( NOT_SPRUNG )
    MouseControl ( 1 )
    NumFrames ( 22 11 2 )
    NumPositions ( 1 0 )
    NumValues ( 1 0 )
    Orientation ( 1 )
    DirIncrease ( 1 )
    ScaleRange ( 0 1 )
    )
    Lever (
    Type ( TRAIN_BRAKE LEVER )
    Position ( 606 296 32 32 )
    Graphic ( dig_blank_lever.ace )
    Style ( NOT_SPRUNG )
    MouseControl ( 1 )
    NumFrames ( 16 4 4 )
    NumPositions ( 5 0 1 13 14 15 )
    NumValues ( 5 0 0.3 0.85 0.9 0.95 )
    Orientation ( 1 )
    DirIncrease ( 1 )
    ScaleRange ( 0 1 )
    )
    Gauge (
    Type ( BRAKE_PIPE GAUGE )
    Position ( 437 333 64 7 )
    Area ( 0 0 16 16 )
    Graphic ( dig_white.ace )
    Style ( SOLID )
    ScaleRange ( 40 120 )
    ZeroPos ( 0 )
    PositiveColour ( 1
    ControlColour ( 38 135 188 )
    )
    NegativeColour ( 1
    ControlColour ( 0 0 0 )
    )
    Orientation ( 0 )
    DirIncrease ( 0 )
    Units ( PSI )
    )
    CombinedControl (
    Type ( CP_HANDLE COMBINED_CONTROL )
    Position ( 570 288 21 42 )
    Graphic ( dig_blank_lever.ace )
    Style ( NONE )
    MouseControl ( 1 )
    NumFrames ( 18 6 3 )
    NumPositions ( 10 1056964608 0 0 0 0 0 0 0 0 0 )
    NumValues ( 10 0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5125 )
    Orientation ( 1 )
    DirIncrease ( 1 )
    )
    MultiStateDisplay (
    Type ( CPH_DISPLAY MULTI_STATE_DISPLAY )
    Position ( 475 349 24 15 )
    Graphic ( throttledyn.ace )
    States ( 18 3 6
    State (
    Style ( 0 )
    SwitchVal ( 0 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.0625 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.125 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.1875 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.25 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.3125 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.375 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.4375 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.5 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.55555 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.6111 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.66665 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.73 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.77775 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.8333 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.88885 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.9444 )
    )
    State (
    Style ( 0 )
    SwitchVal ( 0.99995 )
    )
    )
    )
    )
    )

    From SLI SouthWest Chief P42 #206

  9. #9
    Join Date
    Apr 2011
    Location
    New England
    Posts
    793

    Default

    Here is where I think the problem is:

    *Snip*
    Digital (
    Type ( LOAD_METER DIGITAL )
    Position ( 431 352 38 10 )
    ScaleRange ( -1200 1800 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 90 159 116 )
    )
    NegativeColour ( 1
    ControlColour ( 255 255 0 )
    )
    DecreaseColour ( 0
    ControlColour ( 0 0 0 )
    )
    Units ( AMPS )
    ) <-------------- LOAD_METER DIGITAL section ends here and has no "ORTSfont" entry. This is the problem.
    Digital (
    Type ( SPEEDOMETER DIGITAL )
    Position ( 387 360 22 10 )
    ScaleRange ( 0 100 )
    Accuracy ( 0 )
    AccuracySwitch ( 10 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 0
    ControlColour ( 170 182 185 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( MILES_PER_HOUR )
    ORTSfont ( 10 0 "Arial" )
    )
    *SNIP*

    Try this instead:
    *Snip*
    Digital (
    Type ( LOAD_METER DIGITAL )
    Position ( 431 352 38 10 )
    ScaleRange ( -1200 1800 )
    Accuracy ( 0 )
    AccuracySwitch ( 0 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 1
    ControlColour ( 90 159 116 )
    )
    NegativeColour ( 1
    ControlColour ( 255 255 0 )
    )
    DecreaseColour ( 0
    ControlColour ( 0 0 0 )
    )
    Units ( AMPS )
    ORTSfont ( 8 0 "Segment7" ) <-------------- Add the entry here. This is the load meter digital number readout.
    )
    Digital (
    Type ( SPEEDOMETER DIGITAL )
    Position ( 387 360 22 10 )
    ScaleRange ( 0 100 )
    Accuracy ( 0 )
    AccuracySwitch ( 10 )
    LeadingZeros ( 0 )
    Justification ( 1 )
    PositiveColour ( 0
    ControlColour ( 170 182 185 )
    )
    NegativeColour ( 0 )
    DecreaseColour ( 0 )
    Units ( MILES_PER_HOUR )
    ORTSfont ( 10 0 "Arial" )
    )
    *SNIP*

    Then remove the entry in the other section:

    *Snip*
    Gauge (
    Type ( LOAD_METER GAUGE )
    Position ( 412 369 90 8 )
    Area ( 0 0 16 16 )
    Graphic ( dig_white.ace )
    Style ( SOLID )
    ScaleRange ( -1200 1800 )
    ZeroPos ( 0 )
    PositiveColour ( 1
    ControlColour ( 90 158 112 )
    )
    NegativeColour ( 1
    ControlColour ( 221 221 0 )
    )
    Orientation ( 0 )
    DirIncrease ( 0 )
    Units ( AMPS )
    ORTSfont ( 12 0 "Segment7" ) <-------------- Remove this line, because it won't work for a "Gauge" section.
    )
    *Snip*

    Make these two changes (You're just removing the ORTSfont line from where it won't work to the section where it will) and see how it runs.


    MSTS-Roundhouse

    With Open Rails and ZDSimulator
    Info

  10. #10
    Join Date
    Jun 2009
    Location
    Oshawa ON
    Posts
    1,459

    Default

    I will try that. Thank you again.

    **********************************

    YES!! That did work, and now the readouts look so much better. I am going to start changing all the locos I use regularly.
    Last edited by Don6218; 06-14-2016 at 08:54 PM. Reason: Instructions worked

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •