printing gtktextview and text layout



Hi,

In brasero I recently started to work on a WYSIWYG cover editor. I ran
into a problem when I try to print something: the layout of the text is
not exactly similar to what is displayed on screen.
For example, if I make a line of "a" that goes from the left side to the
right side and if I try to print this line, then in the preview and on
the paper I have a shorter line of 'a' that starts at the right place
but that ends before the point it should reach.

On screen:
| < full line of x "a"              > |

On paper:
| < smaller line of x "a"   >      | 

For text editing I use a GtkTextView with WRAP_CHAR set. I allocate its
space by using the screen resolution (with gdk_screen_get_resolution ())
multiplied by the width and height (in inch) of a CD cover.
For printing, I use a PangoLayout (from
gtk_print_context_create_pango_layout ()) with WRAP_CHAR as well. I get
the sizes for the borders the same way (gtk_print_context_get_dpi_x *
cover_width, ...). These latter border sizes were correct when I
checked. 


Could someone help me with that please?

Regards,

Philippe Rouquier



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