Hi guys,
I am thinking about doing a CDU. I'll get a string like "PROGRESS" and want to assign a little bitmap
for "P", "R" and so on. I found a similar true type font, but I feel it's harder to change than a given
graphic.
Is there an easy (or at least decent) way to do this? I think I might read the string character by
character, write it to an array and then display the bitmaps by reading out the array. Has
anyone ever done that or even know an easier way?
Using custom bitmaps for text
Re: Using custom bitmaps for text
I probably don't really understand your explanation, but why wouldn't you just want to use text?
Re: Using custom bitmaps for text
Like Ralph said why not use text its much much easier. I'd spend my time searching for the right font or even creating your own font. Using images in place of text in lots of places displaying lots of different words is going to end with an elaborate solution.
That said i have used images to replicate text or digits before but only in select cases and for just a few specific characters.
That said i have used images to replicate text or digits before but only in select cases and for just a few specific characters.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Using custom bitmaps for text
I'd like to replicate the B737 CDU font:
http://www.b737.org.uk/images/fmc_refnavdata_runway.gif
The best I could find was BoeingCDU-Large.ttf, but it differs in some way.
I checked out a font creator (High-Logic Font Creator), but just to remove
a simple serif took minutes and was not really intuitive.
Perhaps I should check for other font editors then.
http://www.b737.org.uk/images/fmc_refnavdata_runway.gif
The best I could find was BoeingCDU-Large.ttf, but it differs in some way.
I checked out a font creator (High-Logic Font Creator), but just to remove
a simple serif took minutes and was not really intuitive.
Perhaps I should check for other font editors then.
Re: Using custom bitmaps for text
What about this font?
Re: Using custom bitmaps for text
Well, that's a thumps up! Thanks.
Re: Using custom bitmaps for text
Stole it from the FSX folder
Re: Using custom bitmaps for text
Hmm, I cannot get any text to display? I tried the screencast, but that didn't help.
I tried this code from the API and put glassga.ttf in the /ressources folder.
I tried this code from the API and put glassga.ttf in the /ressources folder.
Code: Select all
mytext1 = txt_add("hello world", "font:glassga.ttf; size:11; color: black; halign:right;", 0, 0, 800, 200)
-- rename text
txt_set(mytext1, "goodbye world")
Re: Using custom bitmaps for text
Hey,
Note that you create a text box that is 800 pixels wide, and you ask AM to align the text all the way to the right of that box.
Might it be that your instrument is not 800 pixels wide and that the text is rendered outside of the instrument bounds?
Corjan
Note that you create a text box that is 800 pixels wide, and you ask AM to align the text all the way to the right of that box.
Might it be that your instrument is not 800 pixels wide and that the text is rendered outside of the instrument bounds?
Corjan
Re: Using custom bitmaps for text
Thanks, a "100, 100" did it. I have to look more into what the box does.