Sign in to follow this  
wsieffert

Character spacing in an XML string ?

Recommended Posts

Hi,In an XML Text line, is there a directive to enlarge the spacing between the characters in a string ??So, with the same character font/size, a printed string becomes wider.Thanks, Rob

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hello Rob, is Fixed=Yes what you are looking for?Just alter the Text x= value with it.

Share this post


Link to post
Share on other sites

Hi Ed,No, that's no it :-)In the .dtd I found a directive WidthFit="Yes" which suggests that the string width is adapted to the specified "X" width size of the printfield; which, with a given fontsize, could be done by increasing the inter-character spacing.Unfortunatly this directive doesn't appear to do anything :-(Thanks anyway,Rob

Share this post


Link to post
Share on other sites

Hi Rob,Never saw that code, only Width.May be ?/Did you try FormattedText?Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi Jan,As far as I know, the "Width" attribute comes from the "Area" tag, not the "Text" tag.Anyway, I found the tag "WidthFit" in the gauge.dtd file from the panel SDK.Rob

Share this post


Link to post
Share on other sites

Rob,Found it too.Never opened that one.Tested it also without results.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi Misho,THANKS !. That's a great tip indeed.Which makes me finally understand what the "Length" directive exactly does (in combination with the "Fixed" directive).After a little more experimentation with your tip, it appears to be working as follows:FS calculates the actual position of each character in the displayed string, by dividing the field width "X" by the "Length", and thus reserving a number of pixels for each character; independant of fontsize and string format specifier.Which means that if your format specifier specifies a string of a fixed width (like 7.2f ) same as "Length = (7), the string will fit exactly in the field width defined by "X". And doing this, the character spacing (in pixels) is then determined by "X" and the character fontsize. Note that the spacing can even become negative (= Characters overlap) depending on the chosen "X","Length", "Fontsize" and format specifier.Works great !!Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites

Hi Rob,I believe this only applies to ? Because doesn't support "Lenght", and behaves rather different than CheersTom

Share this post


Link to post
Share on other sites

Hi Tom,Don't know ..I have never used FormattedText :-)So you might be right..Cheers, Rob

Share this post


Link to post
Share on other sites

Hi Rob et al!Doug Horton asked me to look at the altimeter numbers on the A321 gauges because they were not visible in some cases. I was wondering if you could look at the XML and see if you can make an improvement.The altimeter tape also changes too quickly when one is climbing. I think it is the spacing of the numbers on the *.bmp file that causes this problem.I fixed the B737-800 MFD KTAS airspeed during Beta testing but the problem is still in the gauge. The programer wrote code that was universal but needed modified for true or indicated when used for a particular purpose. I don't have the XML in front of me but below shows basic coding:(A: Airspeed Select TRUE or Indicated)....should have been:(A: Airspeed True)..... for Trueor(A: Airspeed Indicted).... for indicated.The faulty line did in-fact present indicated even though the label indicates TAS.W. Sieffert

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this