[Mono-list] Label With Very Large Font
Michael Hutchinson
m.j.hutchinson at gmail.com
Mon Jan 11 01:17:22 EST 2010
On Thu, Jan 7, 2010 at 11:55 AM, Ratfish <aaron at radich.com> wrote:
>
> My interface requires that I display a very large number on my form (at least
> 1" in height). I'm attempting to do this with a standard Gtk.Label, but
> have not been able to increase the font size all that much with the
> following code. Am I missing something? Is there a better suited control
> for displaying large numbers?
>
> Aaron
>
> // setup the font for the ItemCount
> // needs to be really large
> Pango.FontDescription objFont2 = PangoContext.FontDescription.Copy ();
> objFont2.Size = 275;
> //objFont2.Size = (int)(objFont2.Size * Pango.Scale.XXLarge);
> objFont2.Weight = Pango.Weight.Bold;
> lblItemCount.ModifyFont(objFont2);
Your code looks correct to me, but beware of the Pango scaling
factors. Have you tried using really big numbers?
See http://go-mono.com/docs/index.aspx?link=P:Pango.FontDescription.Size
for details.
Btw, you might get more answers on the GTK# list.
--
Michael Hutchinson
http://mjhutchinson.com
More information about the Mono-list
mailing list