Problem With Setting Font to Display Text in a TextView

Suppose I have an application with a window containing both a TextView and a FontButton. I want to display the text in the TextView using the font selected via the FontButton.

The Textview is called textview, and the FontButton is called fontbutton. Here is sample code in the on_font_set routine:

Pango::FontDescription *fd = new Pango::FontDescription;



This works for a limited set of the fonts listed in the font selection dialog opened by clicking on the FontButton. If I select Arial, Arial Black, orTimes New Roman., the text in the TextView is displayed in the requested font; if I select any other font, the text remains in the old font.

What am I missing here?


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