Help with fonts

Das Forum befindet sich im reduzierten Betrieb. Die Addon- und Supportforen bleiben weiterhin verfügbar.
Bitte beachte, dass OMSI nicht mehr weiterentwickelt wird. Ein Teil der Entwickler widmet sich inzwischen der Entwicklung eines neuen Simulators. Weitere Informationen zum LOTUS-Simulator findest Du hier.
  • EN:


    Hello OMSIers. I have an OMSI dilemma that I hope to overcome with the help of you all. And if this thread is a doppelganger, then point me to the thread that solves this, please point me to it. However, that is not the point. What I request of you is how one is to graph a font in OMSI so that it is visible Because I understand how works but what I don't understand is how it is graphed in the .OFT file. I would most appreciate your help. If you can, break the process down to the simplest you can make it, please.




    Best Regards and Thanks, MTA3306.



    P.S. Here are pictures of the fonts are shown below!




    DE:


    Hallo OMSIers. Ich habe eine OMSI Dilemma, dass ich hoffe, mit Hilfe von euch allen zu überwinden. Und wenn dieses Themas ist ein Doppelgänger, dann zeigen Sie mir den Thread, der diese löst, bitte zeigen Sie mir, es zu. Doch das ist nicht der Punkt. Was ich von Ihnen verlangen, ist, wie man ist, um eine Schrift in OMSI Graphen, so dass es sichtbar ist, weil ich verstehen, wie funktioniert, aber was ich nicht verstehe, ist, wie es in der OFT-Datei grafisch dargestellt. Ich würde die meisten schätze Ihre Hilfe. Wenn Sie können, brechen Sie den Prozess bis hin zum einfachsten können Sie es reservieren, senden.




    Beste Grüße und Danke, MTA3306.

  • Let's have a look at the file Kennz_DtAlt.oft in the fonts folder:



    Translation:
    OMSI font (*.oft)
    This is where a new character set is defined. This is done using the following instructions:


    [newfont]
    {name}
    {bitmap file}
    {alpha file}
    {height in pixels (including vertical offset)}
    {horizontal gap}


    [char]
    {character}
    {x coordinate left}
    {x coordinate right (including offset to next character)}
    {y coordinate of upper edge}
    --- end of translation ---


    So you define global parameters below the [newfont] keyword. Sometimes a font doesn't have the bitmap file and only the alpha file. The bitmap file is only needed if you want to use the original color of the font and not set the color in the model CFG file that makes use of the font to display text. In the Kennz font, the color is used and if you take a look at the bmp file you will notice it is all black with the exception of the circular badges in the hyphen ("-") character. The actual shape of the letters comes from the alpha file.


    Then you define each character below a "[char]" keyword. First comes the character you want to be represented by the definition, followed by the pixel coordinates (zero-based) from the bitmap/alpha file. The left x and top y coordinates are inclusive, i.e. the pixel row/column specified will be included in the texture when the character is displayed. The bottom y coordinate is derived by OMSI through the height parameter in the newfont specification. The right x coordinate is exclusive, i.e. the pixel column will NOT be included in the texture when the character is displayed in OMSI.
    Note that if OMSI finds a character in the string to display which is not defined in the font file, it will use the first char defined there, whatever it is. So if you want these characters to be replaced by a blank, define the blank as first character.