Here's what I do in GMod:
HFont font = vgui::surface()->CreateFont();
Assert(font);
if ( !vgui::surface()->SetFontGlyphSet( font, strName, iTall, iWeight, 0, 0,
iFlags )
{
// Error reporting etc
}
garry
On Wed, Dec 9, 2009 at 11:21 AM, Janek <[email protected]> wrote:
> In fact I would like to understand how to recreate it. Is it possible to
> fill in a structure including all parameters (keyvalues) describing a font
> in clientscheme.res and passing it using SetFont ?
>
> J.
>
> 2009/12/9 Garry Newman <[email protected]>
>
> > AFAIK you need to destroy and recreate it. It isn't just rendering text,
> > it's drawing all the characters to a texture and then copying them over
> > (educated guess).
> >
> > garry
> >
> > On Wed, Dec 9, 2009 at 9:01 AM, Janek <[email protected]> wrote:
> >
> > > No idea ? This tall parameter should be somewhere.
> > >
> > > J.
> > >
> > > 2009/12/7 Janek <[email protected]>
> > >
> > > > Hi all,
> > > >
> > > > In ClientScheme.res we can specify a font codename and specify its
> > > features
> > > > for a specific resolution by using keyvalues for "name", "tall",
> > > "weight"...
> > > > In our codeline we're refering to this font using SetFont function.
> All
> > > > features specified in ClientScheme.res are used for it.
> > > >
> > > > I would like to know how to modify "tall" keyvalues on the fly (doing
> > > that
> > > > using few lines of code) but I don't understand how. hfont is only a
> > > unique
> > > > ID for the font ;-(
> > > >
> > > > I hope you'll be able to help me :-)
> > > >
> > > > Cheers,
> > > >
> > > > -------------------
> > > > j...@nek
> > > >
> > >
> > >
> > >
> > > --
> > > -------------------
> > > j...@nek
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
>
> --
> -------------------
> j...@nek
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders