Board index FlightGear Support Installation

Missing Font led.ttf

Need help getting up and running? Installing FlightGear, add-on planes, sceneries etc.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?

Please, also see Requesting Technical Help.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Missing Font led.ttf

Postby dhudach » Tue Apr 23, 2019 12:07 pm

I'm working with fgpanel making great progress. But one of the instruments must need a Font:

Missing font : /path/to/flightgear/../fgdata/Fonts/led.ttf

Font directory doesn't contain that file. I was hoping to figure out where it's getting set but I could not. These returned no results (I'm sitting in the correct directory):

find . -name "*.xml" -exec grep -il 'led.ttf' {} \;
find . -name "*.cxx" -exec grep -il 'led.ttf' {} \;
find . -name "*.hxx" -exec grep -il 'led.ttf' {} \;
find . -name "*.ac" -exec grep -il 'led.ttf' {} \;

If a different led file can be used, which one and in which file I would find it (how to find it) or if led.ttf can be found someplace.

Silly me, if I know which one of these is suitable, I can just copy it to led.ttf (LED-8.ttf or LED-16.ttf)

Thanks,
Dave
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby bugman » Tue Apr 23, 2019 1:56 pm

Strange, I don't find led.ttf in any of the FlightGear repositories. Where does this message come from? Are there other messages? I do see led.txf which is explained in Docs/README.osgtext. The led.txf file is used quite a lot in FGAddon. Did you copy and paste the error message?

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: Missing Font led.ttf

Postby dhudach » Tue Apr 23, 2019 2:04 pm

The error came from fgpanel. I'm building a sim cockpit and am going to use fgpanel. I probably wouldn't mind, but the message simply repeats and scrolls. I don't know where it comes from. It's odd. So I just copied LED-8.ttf to led.ttf in the Font directory and of course the message goes away. I don't know which if any of the instruments it will impact, but I'll probably find out. Here is basically what continues to scroll by in the command terminal when I run fgpanel:

OpenGL version = 3.0 Mesa 17.2.8
0.07 [ALRT]:cockpit Could not open font : /home/MYNAME/flightgear/install/install/flightgear/bin/../fgdata/Fonts/led.ttf
0.07 [ALRT]:cockpit Missing font : /home/MYNAME/flightgear/install/install/flightgear/bin/../fgdata/Fonts/led.ttf 6.09375
0.17 [ALRT]:cockpit Could not open font : /home/MYNAME/flightgear/install/install/flightgear/bin/../fgdata/Fonts/led.ttf
0.17 [ALRT]:cockpit Missing font : /home/MYNAME/flightgear/install/install/flightgear/bin/../fgdata/Fonts/led.ttf 6.09375
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby xDraconian » Wed Apr 24, 2019 6:58 am

I'm guessing you have <font>led</font> in your panel configuration files.
fgpanel is expecting a .ttf file so "led" becomes "led.ttf".

FGTextLayer could use an update to only append ".ttf" when a font extension was not specified.

Scott
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: Missing Font led.ttf

Postby dhudach » Wed Apr 24, 2019 9:21 am

Ok, I'll give it a look. Thanks.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby dhudach » Wed Apr 24, 2019 10:06 am

Ok, I indeed found <font>led<font> in the following Instrument files:

./install/flightgear/fgdata/Aircraft/Instruments/dme.xml
./install/flightgear/fgdata/Aircraft/Instruments/radar.xml
./install/flightgear/fgdata/Aircraft/Instruments/fps.xml
./install/flightgear/fgdata/Aircraft/Instruments/adf-radio.xml
./install/flightgear/fgdata/Aircraft/Instruments/navcom-kx155.xml
./install/flightgear/fgdata/Aircraft/Instruments/KAP140TwoAxisAlt.xml
./install/flightgear/fgdata/Aircraft/Instruments/clock.xml
./install/flightgear/fgdata/Aircraft/Instruments/kr-87adf.xml
./install/flightgear/fgdata/Aircraft/Instruments/navcom-radio.xml
./install/flightgear/fgdata/Aircraft/Instruments/oat.xml
./install/flightgear/fgdata/Aircraft/Instruments/wxradar.xml
./install/flightgear/fgdata/Aircraft/Instruments/rpm-c172s-digi-hobbs.xml
./install/flightgear/fgdata/Aircraft/Instruments/KAP140TwoAxis.xml
./install/flightgear/fgdata/Aircraft/Instruments/autopilot.xml

And FGTextLayer.cxx has the following method:

Code: Select all
void
FGTextLayer::setFontName (const string &name) {
  if (The_Font_Path.isNull ()) {
    char *Env_Path = ::getenv ("FG_FONTS");
    if (Env_Path != NULL) {
      The_Font_Path = SGPath::fromEnv (Env_Path);
    } else {
      The_Font_Path = ApplicationProperties::GetRootPath ("Fonts");
    }
  }
  m_font_name = The_Font_Path.local8BitStr () + "/" + name + ".ttf";
}


Which is called by flightgear/utils/fgpanel/panel_io.cxx. And in my case, I'm displaying dme on the panel which of course uses dme.xml in the above list.

And that is all very helpful, however, other than my hack to copy led-8.ttf to led.ttf to eliminate the error, I really don't know what led.ttf should be.

Thanks,
Dave
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby bugman » Wed Apr 24, 2019 1:17 pm

Does the font work if you modify Aircraft/Instruments/dme.xml from:

Code: Select all
<font>led</font>

to:

Code: Select all
<font>led.txf</font>

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: Missing Font led.ttf

Postby dhudach » Wed Apr 24, 2019 1:56 pm

Thanks,

Interesting, the error actually occurs because of Aircraft/Instruments/clock.xml. I removed the copy of led.ttf file that I created in Fonts and re-ran with dme.xml in fgpanel and oddly there were no errors. I found that strange because

Code: Select all
<font>led</font>


is used numerous times in dme.xml. So I removed dme.xml from my fgpanel definition and added clock.xml and bingo, I got the led.ttf file not found. Ok I then changed the above font in clock.xml to:

Code: Select all
<font>led.ttf</font>


and I got what I suspected I would get:

7.72 [ALRT]:cockpit Missing font : /home/MYNAME/flightgear/install/install/flightgear/bin/../fgdata/Fonts/led.txf.ttf 6.5

and it's because setFontName in FGTextLayer.cxx appends "ttf" to the name in all cases:

Code: Select all
void
FGTextLayer::setFontName (const string &name) {
  if (The_Font_Path.isNull ()) {
    char *Env_Path = ::getenv ("FG_FONTS");
    if (Env_Path != NULL) {
      The_Font_Path = SGPath::fromEnv (Env_Path);
    } else {
      The_Font_Path = ApplicationProperties::GetRootPath ("Fonts");
    }
  }
  m_font_name = The_Font_Path.local8BitStr () + "/" + name + ".ttf";
}


I have a laundry list of tasks I need to get done on my fgpanel implementation so this doesn't actually rise to the highest priority for me. But it may impact others and it's one of those little details that may need some attention. Also, having that error message scroll by constantly is probably not the best practice. So my hacked solution of copying led-8.ttf or led-16.ttf to led.ttf for the moment solves the repeating error messages.

On a side note, and I don't know how the code works, but I do find it odd that as fgpanel is running it constantly needs to run IO to find the font rather than obtaining all properties for a given instrument one time, say during initialization. But that's just a side note. It's not something I've totally investigated, just a cursory assumption based on observation.

Thanks,
Dave
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby bugman » Wed Apr 24, 2019 2:00 pm

But what about led.txf? Note this is not a true type font (TTF)!
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: Missing Font led.ttf

Postby dhudach » Wed Apr 24, 2019 2:08 pm

I'm not sure what you are asking here:
But what about led.txf? Note this is not a true type font (TTF)!
Perhaps you are asking that in addition to led.ttf missing, why is led.txf sitting in the Font directory. Note that Folder contains numerous txf as well as ttf files.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby Gijs » Wed Apr 24, 2019 2:14 pm

See this discussion from 2016 on the mailing list: https://sourceforge.net/p/flightgear/ma ... sg35559952
I cannot test FGPanel right now, but looks like it no longer loads .txf files and the instruments have not been updated since (or the font converted to .ttf, as that'd probably be the better solution).
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9549
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Missing Font led.ttf

Postby dhudach » Wed Apr 24, 2019 2:25 pm

Ok, so if I'm understanding everything then, it appears my temporary solution of copying one of the other led ttf files to led.ttf is ok for now.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby bugman » Wed Apr 24, 2019 2:46 pm

There was a change back in 2016 which probably broke this:

Code: Select all
commit effca9da5eb608f58d1ff19a1261bb9f372eaba6
Author: gallaert <gaetan.allaert@belgacom.net>
Date:   Sun Dec 4 18:36:53 2016 +0000

    Update FGPanel:
    - use OpenGL 2.0 instead of OpenGL 1.0;
    - port to Raspberry Pi;
    - remove PLib dependencies.
---
 utils/fgpanel/ApplicationProperties.cxx    |  69 ++++++++++++++
 utils/fgpanel/ApplicationProperties.hxx    |  17 ++--
 utils/fgpanel/CMakeLists.txt               | 135 +++++++++++++++++++-------
 utils/fgpanel/FGCroppedTexture.cxx         | 127 +++++++++++++++++++++++++
 utils/fgpanel/FGCroppedTexture.hxx         |  69 ++++++++++++++
 utils/fgpanel/FGDummyTextureLoader.cxx     |  41 ++++++++
 utils/fgpanel/FGDummyTextureLoader.hxx     |  32 +++++++
 utils/fgpanel/FGFontCache.cxx              | 325 +++++++++++++++++++++++++++-----------------------------------
 utils/fgpanel/FGFontCache.hxx              | 118 +++++++++++------------
 utils/fgpanel/FGGLApplication.cxx          | 162 +++++++++++++++++++------------
 utils/fgpanel/FGGLApplication.hxx          |  34 ++++---
 utils/fgpanel/FGGroupLayer.cxx             |  43 +++++++++
 utils/fgpanel/FGGroupLayer.hxx             |  43 +++++++++
 utils/fgpanel/FGInstrumentLayer.cxx        | 100 ++++++++++++++++++++
 utils/fgpanel/FGInstrumentLayer.hxx        |  61 ++++++++++++
 utils/fgpanel/FGLayeredInstrument.cxx      |  70 ++++++++++++++
 utils/fgpanel/FGLayeredInstrument.hxx      |  54 +++++++++++
 utils/fgpanel/FGPNGTextureLoader.cxx       | 131 ++++++++++++-------------
 utils/fgpanel/FGPNGTextureLoader.hxx       |   6 +-
 utils/fgpanel/FGPanel.cxx                  | 434 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 utils/fgpanel/FGPanel.hxx                  | 109 +++++++++++++++++++++
 utils/fgpanel/FGPanelApplication.cxx       | 368 ++++++++++++++++++++++++++++++-----------------------------------------
 utils/fgpanel/FGPanelApplication.hxx       |  30 +++---
 utils/fgpanel/FGPanelInstrument.cxx        |  65 +++++++++++++
 utils/fgpanel/FGPanelInstrument.hxx        |  56 +++++++++++
 utils/fgpanel/FGPanelProtocol.cxx          | 162 +++++++++++++++----------------
 utils/fgpanel/FGPanelProtocol.hxx          |  22 +++--
 utils/fgpanel/FGPanelTransformation.cxx    |  28 ++++++
 utils/fgpanel/FGPanelTransformation.hxx    |  52 ++++++++++
 utils/fgpanel/FGRGBTextureLoader.cxx       | 694 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------
 utils/fgpanel/FGRGBTextureLoader.hxx       |   6 +-
 utils/fgpanel/FGSwitchLayer.cxx            |  37 ++++++++
 utils/fgpanel/FGSwitchLayer.hxx            |  38 ++++++++
 utils/fgpanel/FGTextLayer.cxx              | 301 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 utils/fgpanel/FGTextLayer.hxx              | 111 ++++++++++++++++++++++
 utils/fgpanel/FGTextureLoaderInterface.hxx |  18 +++-
 utils/fgpanel/FGTexturedLayer.cxx          | 124 ++++++++++++++++++++++++
 utils/fgpanel/FGTexturedLayer.hxx          |  65 +++++++++++++
 utils/fgpanel/GLES_utils.cxx               | 385 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 utils/fgpanel/GLES_utils.hxx               |  81 ++++++++++++++++
 utils/fgpanel/GL_utils.cxx                 | 374 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 utils/fgpanel/GL_utils.hxx                 |  85 +++++++++++++++++
 utils/fgpanel/README.RPi                   |  44 +++++++++
 utils/fgpanel/main.cxx                     |  12 +--
 utils/fgpanel/panel.cxx                    | 971 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 utils/fgpanel/panel.hxx                    | 452 ---------------------------------------------------------------------------------------
 utils/fgpanel/panel_io.cxx                 | 512 ++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------
 utils/fgpanel/panel_io.hxx                 |  13 ++-
 48 files changed, 4461 insertions(+), 2825 deletions(-)


The code can no longer translate led as meaning led.txf. My suggestion is to see if led.txf can still be used. If so, then the fix is easy. You can change all FGData instances with a command such as:

Code: Select all
find Aircraft/Instruments/ -name "*.xml" -exec sed -i "s/font>led<\/font/font>led.txf<\/font/g" {} \;


This results in a diff like:

Code: Select all
diff --git a/Aircraft/Instruments/KAP140TwoAxis.xml b/Aircraft/Instruments/KAP140TwoAxis.xml
index 66aaeb152..8ef833cdc 100644
--- a/Aircraft/Instruments/KAP140TwoAxis.xml
+++ b/Aircraft/Instruments/KAP140TwoAxis.xml
@@ -374,7 +374,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>11</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/KAP140TwoAxisAlt.xml b/Aircraft/Instruments/KAP140TwoAxisAlt.xml
index 320506299..ee75122f8 100644
--- a/Aircraft/Instruments/KAP140TwoAxisAlt.xml
+++ b/Aircraft/Instruments/KAP140TwoAxisAlt.xml
@@ -372,7 +372,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>11</point-size>
    <color>
     <red>1.0</red>
@@ -466,7 +466,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>11</point-size>
    <color>
     <red>1.0</red>
@@ -680,7 +680,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>11</point-size>
    <color>
     <red>1.0</red>
@@ -745,7 +745,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>11</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/adf-radio.xml b/Aircraft/Instruments/adf-radio.xml
index a4b9d5f68..be25364d3 100644
--- a/Aircraft/Instruments/adf-radio.xml
+++ b/Aircraft/Instruments/adf-radio.xml
@@ -59,7 +59,7 @@ properties' values.
     </greater-than>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>7</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/autopilot.xml b/Aircraft/Instruments/autopilot.xml
index 0ed00c495..3f887a50b 100644
--- a/Aircraft/Instruments/autopilot.xml
+++ b/Aircraft/Instruments/autopilot.xml
@@ -455,7 +455,7 @@ properties' values.
   <layer>
    <name>target climb rate</name>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>5</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/clock.xml b/Aircraft/Instruments/clock.xml
index 05103a0c6..44f6cea7d 100644
--- a/Aircraft/Instruments/clock.xml
+++ b/Aircraft/Instruments/clock.xml
@@ -74,7 +74,7 @@ properties' values.
   <layer>
    <name>display</name>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>6.5</point-size>
    <color>
     <red>0.0</red>
diff --git a/Aircraft/Instruments/dme.xml b/Aircraft/Instruments/dme.xml
index cf103861f..23eb64ba6 100644
--- a/Aircraft/Instruments/dme.xml
+++ b/Aircraft/Instruments/dme.xml
@@ -78,7 +78,7 @@ all the time in that electrical system.
     </condition>
     <name>display</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -108,7 +108,7 @@ all the time in that electrical system.
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -132,7 +132,7 @@ all the time in that electrical system.
       </greater-than>
      </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -193,7 +193,7 @@ all the time in that electrical system.
     </condition>
     <name>display</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -223,7 +223,7 @@ all the time in that electrical system.
     </condition>
     <name>display</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -246,7 +246,7 @@ all the time in that electrical system.
       </greater-than>
      </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -298,7 +298,7 @@ all the time in that electrical system.
     </condition>
     <name>display</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -328,7 +328,7 @@ all the time in that electrical system.
     </condition>
     <name>display</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
@@ -351,7 +351,7 @@ all the time in that electrical system.
       </greater-than>
      </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>1.0</red>
diff --git a/Aircraft/Instruments/fps.xml b/Aircraft/Instruments/fps.xml
index c30844352..d286a98c6 100644
--- a/Aircraft/Instruments/fps.xml
+++ b/Aircraft/Instruments/fps.xml
@@ -11,7 +11,7 @@
   <layer>
    <name>counter</name>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>6.5</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/kr-87adf.xml b/Aircraft/Instruments/kr-87adf.xml
index 4dc5b0d7e..1c334db30 100644
--- a/Aircraft/Instruments/kr-87adf.xml
+++ b/Aircraft/Instruments/kr-87adf.xml
@@ -117,7 +117,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>7</point-size>
    <color>
     <red>1.0</red>
@@ -222,7 +222,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>7</point-size>
    <color>
     <red>1.0</red>
@@ -265,7 +265,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>7</point-size>
    <color>
     <red>1.0</red>
@@ -307,7 +307,7 @@ properties' values.
     </equals>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>7</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/navcom-kx155.xml b/Aircraft/Instruments/navcom-kx155.xml
index 0d2824cd5..c9be19928 100644
--- a/Aircraft/Instruments/navcom-kx155.xml
+++ b/Aircraft/Instruments/navcom-kx155.xml
@@ -75,7 +75,7 @@ impact on the c172p.
     </greater-than>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>6.5</point-size>
    <color>
     <red>1.0</red>
@@ -115,7 +115,7 @@ impact on the c172p.
     </greater-than>
    </condition>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>6.5</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/navcom-radio.xml b/Aircraft/Instruments/navcom-radio.xml
index a0eb42466..db63a9147 100644
--- a/Aircraft/Instruments/navcom-radio.xml
+++ b/Aircraft/Instruments/navcom-radio.xml
@@ -55,7 +55,7 @@ properties' values.
   <layer>
    <name>nav frequencies</name>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>7</point-size>
    <color>
     <red>1.0</red>
@@ -89,7 +89,7 @@ properties' values.
   <layer>
    <name>com frequencies</name>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>7</point-size>
    <color>
     <red>1.0</red>
diff --git a/Aircraft/Instruments/oat.xml b/Aircraft/Instruments/oat.xml
index 6c3a4edaa..d46737263 100644
--- a/Aircraft/Instruments/oat.xml
+++ b/Aircraft/Instruments/oat.xml
@@ -45,7 +45,7 @@ properties' values.
   <layer>
    <name>display</name>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>6.5</point-size>
    <color>
     <red>0.0</red>
diff --git a/Aircraft/Instruments/radar.xml b/Aircraft/Instruments/radar.xml
index 33677e3b0..af98aee0f 100644
--- a/Aircraft/Instruments/radar.xml
+++ b/Aircraft/Instruments/radar.xml
@@ -6541,7 +6541,7 @@
   <layer>
     <name>selected_target</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6584,7 +6584,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6626,7 +6626,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6668,7 +6668,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6710,7 +6710,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6752,7 +6752,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6794,7 +6794,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6836,7 +6836,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6878,7 +6878,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6920,7 +6920,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -6962,7 +6962,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7004,7 +7004,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7046,7 +7046,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7088,7 +7088,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7130,7 +7130,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7172,7 +7172,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7214,7 +7214,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7256,7 +7256,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7298,7 +7298,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7340,7 +7340,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7382,7 +7382,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7424,7 +7424,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7466,7 +7466,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7508,7 +7508,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7550,7 +7550,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7592,7 +7592,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7634,7 +7634,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7676,7 +7676,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7718,7 +7718,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7760,7 +7760,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7802,7 +7802,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7844,7 +7844,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7886,7 +7886,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7928,7 +7928,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -7970,7 +7970,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8012,7 +8012,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8054,7 +8054,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8096,7 +8096,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8138,7 +8138,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8180,7 +8180,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8222,7 +8222,7 @@
      </and>
     </condition>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8252,7 +8252,7 @@
   <layer>
     <name>outer range ring</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -8281,7 +8281,7 @@
   <layer>
     <name>inner range ring</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
diff --git a/Aircraft/Instruments/rpm-c172s-digi-hobbs.xml b/Aircraft/Instruments/rpm-c172s-digi-hobbs.xml
index d908e1026..9e8dda341 100644
--- a/Aircraft/Instruments/rpm-c172s-digi-hobbs.xml
+++ b/Aircraft/Instruments/rpm-c172s-digi-hobbs.xml
@@ -63,7 +63,7 @@ Jan 30 2003
   <layer>
    <name>Digital Hobbs</name>
    <type>text</type>
-   <font>led</font>
+   <font>led.txf</font>
    <point-size>14</point-size>
    <color>
     <red>0.0</red>
diff --git a/Aircraft/Instruments/wxradar.xml b/Aircraft/Instruments/wxradar.xml
index bc142e245..3a1ee604a 100644
--- a/Aircraft/Instruments/wxradar.xml
+++ b/Aircraft/Instruments/wxradar.xml
@@ -183,7 +183,7 @@
   <layer>
     <name>altitude</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -213,7 +213,7 @@
   <layer>
     <name>outer range ring</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>
@@ -242,7 +242,7 @@
   <layer>
     <name>inner range ring</name>
     <type>text</type>
-    <font>led</font>
+    <font>led.txf</font>
     <point-size>6</point-size>
     <color>
      <red>0.96</red>


Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: Missing Font led.ttf

Postby dhudach » Wed Apr 24, 2019 3:00 pm

That was one of the original tests. I changed led to led.txf in clock.xml and it results in this error:

7.72 [ALRT]:cockpit Missing font : /home/MYNAME/flightgear/install/install/flightgear/bin/../fgdata/Fonts/led.txf.ttf 6.5

and it's because setFontName in FGTextLayer.cxx appends "ttf" to the name in all cases:

Code: Select all
void
FGTextLayer::setFontName (const string &name) {
  if (The_Font_Path.isNull ()) {
    char *Env_Path = ::getenv ("FG_FONTS");
    if (Env_Path != NULL) {
      The_Font_Path = SGPath::fromEnv (Env_Path);
    } else {
      The_Font_Path = ApplicationProperties::GetRootPath ("Fonts");
    }
  }
  m_font_name = The_Font_Path.local8BitStr () + "/" + name + ".ttf";
}


So for now, since I have a solution that eliminates the error and seems to get the clock display showing the time, I can move on. Hopefully if there is a real fix it will be posted here and I'll be able to make use of it.

Thanks,
Dave
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Missing Font led.ttf

Postby dhudach » Wed Apr 24, 2019 3:07 pm

But beyond the missing font, it may be instructive to know that fgpanel panel_io.cxx is making repeated calls to retrieve the font during runtime. If it's happening for clock.xml, I'm guessing it's happening to other instruments. And so it makes me wonder if fgpanel should initialize properties one time. But again, I am just making an observation here ...
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 2 guests