Hi all,
Since Spoken CGA has been replaced by the PAR addon, I think it's natural to move here the comments, feedback and discussion.
You can find PAR v.:0.0.5 here and all its documentation here.
Regards
var myGroup = sk.root.createChild("group").set("font", "LiberationFonts/LiberationMono-Regular.ttf");
var myGroup = sk.root.createChild("group");
m.frontGroup = sk.root.createChild("group");
m.frontGroup = sk.root.createChild("group").set("font","LiberationFonts/LiberationMono-Regular.ttf");
for(var i=1; i<size(nodes); i+=1) call(me.updateMark,[nodes[i]],me,var err = []);
var err = []
err = []
Alant wrote in Fri Mar 02, 2018 10:25 pm:Be aware that the Liberation font family is not included in a standard windows installation.
var dir = directory(getprop("/sim/fg-root")~'/Fonts'); # get directory
foreach(d;dir) if( d=="LiberationFonts")
m.frontGroup.set("font","LiberationFonts/LiberationMono-Regular.ttf");
rleibner wrote in Fri Mar 16, 2018 3:33 pm: It would be great if we had collaborators of Win and Mac: we could choose the best font that exists in the 3 OS.
The question is- does FG use this directory with Linux, MACOS and Windows?
We only need to check it on MAC. Anyway, I tested to set a non-existing font: No problem, the default font is used with no other consequence than a warningThorsten wrote in Sat Mar 17, 2018 7:58 am:At least my Win 10 setup and my Linux setup use the FG-side font directory.
canvas::Text: No such font: FooFonts/Foo-Regular.ttf
appendTrack: func(node) {
var (x,y,z) = me.xyz(node);
var absH = me.xyGraph.xy([x,y]);
if (absH[1] < 150) absH[1] = 150; # To avoid vertical line
var absV = me.xzGraph.xy([x,z]);
if(me.HTrack.getNumSegments()==0) {
me.HTrack.moveTo(absH);
me.VTrack.moveTo(absV);
}
...
var gcaCtrl = nil;
var err = [];
### New ###
var dt = nil;
update: func() { # called by me.timer
### New ###
if (me.touchObj.alt() == nil) {me.touch();dt = 0}
else {
if (!dt) {me.drawTerrain();me.drawCones();dt = 1}
}
###########
var nodes = me.validNodes(range:me.maxX);
me.Hmarks.group.removeAllChildren();
me.Vmarks.group.removeAllChildren();
...
xyz: func(node) { # Relatives to touchObj
var (dist,delta,altitude) = me.rhoDeltaAlt(node);
var x = dist*math.cos(delta*D2R);
var y = dist*math.sin(delta*D2R);
### Change ###
if (me.touchObj.alt() != nil) {
var z = altitude - me.touchObj.alt()*M2FT;
} else {var z = altitude}
###########
return [x,y,z]; # as nm,nm,ft
}, # end of xyz
var getVertProfile = func(geoObj,direction,resolution,dist=32) {
# direction in deg, resolution in nm, optional dist in nm.
...
if(from !=999){
printf("Warning: found nils between %.2fnm and %.2fnm from rwy.",from*resolution,to*resolution);
}
#for(var i=-1; i>=-steps-1; i-=1) if(h[i]!=nil) h[i]=int((h[i]-h[0])*M2FT);
### Change ###
for(var i=-1; i>=-steps-1; i-=1) if(h[i]!=nil and geoObj.alt() != nil) h[i]=int((h[i]-geoObj.alt())*M2FT);
##############
return h; # elevations (ft) over geoObj
}
me.altText = canvas.plot2D.text(me.frontGroup,'',[52,291],[10,1],white,'left-baseline');
me.altText.setText(sprintf("alt: %i ft",me.airport.elevation*3.28084));
var f = delta==1? 2 : 0.5 ;
var f = delta==1? 0.5 : 2 ;
Users browsing this forum: No registered users and 0 guests