Board index FlightGear Development Canvas

Text Element Styling (bold, underline etc.)

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Text Element Styling (bold, underline etc.)

Postby omega95 » Sat Jul 26, 2014 3:52 am

I was wondering how I could add test decorations like underlined and bold text to canvas text elements. This would really help in developing the alerting system and checklist system for the ECAM E/WD on the A380 (and other newer Airbus aircraft).

Thank you! :D
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
Posts: 1222
Joined: Sat Jul 30, 2011 12:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: Text Element Styling (bold, underline etc.)

Postby Philosopher » Sat Jul 26, 2014 4:31 am

Bold and Italic are accomplished by changing the file name (-Regular, -Bold, -Italic, and -BoldItalic for the Liberation family). I'm not sure underline can be done automatically. Your best bet (as I don't think your concerned with flexibility ;)) is using a baseline text alignment (probably are already) with a line on that baseline (plus or minus an suitable offset and with a suitable width). Not the best solution, but worth trying I think...
(inactive but lurking occasionally...)
Posts: 1588
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest