Re: Setting font to generic style (monospace)



When I've needed to do this, I've used:

sourceview->modify_font(Pango::FontDescription("monospace"));

Rob.


On 09/12/05, Daniel Kraft <d daniel-kraft net> wrote:
> Hi!
>
> I'm trying to set the font of a TextView GTKmm-component; therefore I need a
> Pango::FontDescription, for which I need the font family name. But I don't
> want/need to set an explicit name (as that font may not be available on every
> machine), I just need one with fixed width (the text field is expected to
> contain some sort of program code).
>
> Is it possible to use a generic font (in the style of CSS) - i.e., just
> monospaced, serif, sans-serif... which is provided at every computer - instead
> of an explicit font family?
>
> Thank you very much!
> Best regards,
> Daniel Kraft
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>



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