help with load custom font

Started by MEGAMIND, Aug 02, 2018, 12:59 PM

Previous topic - Next topic

MEGAMIND

as the topis says how can i load up a custm font

store/fonts/pricedown.ttf
and this in store/scripts/main.nut

Label.FontName = "pricedown.ttf";
am i doing it wrong??

Xmair

You don't use the file name, but the font name.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

MEGAMIND

no effect

function Create( ) {
 Label = ::GUILabel( );
 Label.AddFlags( GUI_FLAG_3D_ENTITY );
 Label.Text = iText;
 Label.FontName = "pricedown";
 Label.TextColour  = iColor;
 Label.FontSize = 100;
 Label.Size3D  = iSize;
 Label.Rotation3D  = GetAngleFromDeg( iRotation );
 Label.Position3D  = iPos;
 Label.AddFlags( GUI_FLAG_VISIBLE );
 }

MatheuS

Quote from: MEGAMIND on Aug 02, 2018, 01:03 PMno effect

function Create( ) {
 Label = ::GUILabel( );
 Label.AddFlags( GUI_FLAG_3D_ENTITY );
 Label.Text = iText;
 Label.FontName = "pricedown";
 Label.TextColour  = iColor;
 Label.FontSize = 100;
 Label.Size3D  = iSize;
 Label.Rotation3D  = GetAngleFromDeg( iRotation );
 Label.Position3D  = iPos;
 Label.AddFlags( GUI_FLAG_VISIBLE );
 }

Try rename the font name to:

Label.FontName = "Pricedown";
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

MEGAMIND

Quote from: MatheuS on Aug 02, 2018, 01:34 PM
Quote from: MEGAMIND on Aug 02, 2018, 01:03 PMno effect

function Create( ) {
 Label = ::GUILabel( );
 Label.AddFlags( GUI_FLAG_3D_ENTITY );
 Label.Text = iText;
 Label.FontName = "pricedown";
 Label.TextColour  = iColor;
 Label.FontSize = 100;
 Label.Size3D  = iSize;
 Label.Rotation3D  = GetAngleFromDeg( iRotation );
 Label.Position3D  = iPos;
 Label.AddFlags( GUI_FLAG_VISIBLE );
 }

Try rename the font name to:

Label.FontName = "Pricedown";
no effect

MEGAMIND


MEGAMIND


!


Upload this file to
svr_dir/store/fonts
Than use it like this
Label.FontName = "Pricedown";
font file is taken from server you mentioned before.


Discord: zeus#5155