Text placement with Pango rendering



I am attempting to display mixed textual data on the screen. There are
headings, notes, labels, and columns of monetary figures. Due to the
conglomeration of data layouts, that are mixed and vary from line to
line, I don't want to use a widget with columns to control layout.

Instead, I prefer to use a single column display area and control the
arrangement of data into columns under application program control. As
the application writer, I want to place each item of data at specific
pixel positions on the screen.

I have discussed this on IRC chat, and am advised that Pango may provide
the format capabilities that I seek.

I have so far implemented all the format attributes that I need
excepting being able to position text as I want.

I want the columns of monetary amounts to use proportional font and be
aligned by the decimal point.

I think that I will need to split an amount by the decimal point. Align
the left part of the amount, right justified to a specific pixel
position. Then align the right part of the amount, left justified to the
same (or perhaps adjacent) pixel position.

Each line of display on the screen consists of several items of data
that vary from line to line. Some items of data are monetary amounts in
proportional font face. These monetary amounts need to be aligned on the
decimal point. Being proportional font, the digits may not be aligned.

How may I use Pango to place items of data at specific pixel positions?

Thanks,
Don.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]