[How to] Change font server?



I have this font on server now:
but i need about such:

I did as in the instructions .But not all for the end dont understand.I convert font to .gfx and what should i do next?
How to add fonts (FiveM update - May 5th/6th, 2017)

Convert your .ttf to a .swf. You can use swfmill (http://swfmill.org/releases/swfmill-0.3.3-win32.zip44) to do this:
swfmill simple in.xml out.swf
Convert the .swf to .gfx. You need gfxexport.exe for this. We can not tell you where to get this, as it’s illegal to spread - find it on Google.
gfxexport out.swf
Put out.gfx in a stream/ folder in a resource, perhaps rename it.


Call RegisterFontFile and RegisterFontId from a client script.
Use the registered ID in SetTextFont, instead of one of the game’s built-in IDs.



That looks like vRP, you don’t need to do all that workaround, just go the where the GUI html/css file is located, add a new typeface, find where the font-family for the page is being declared and change it to the one of your liking. If you use a local file for the font don’t foget to add to the _resource.lua file the new font file.

If you don’t know how to use a custom font on webpages search for:
How to use a local font file on my webpage
…or something like that, it’s basically a webpage afterall.


in html file in gui folder i have this:

<!DOCTYPE html>
    <script src="nui://game/ui/jquery.js" type="text/javascript"></script>
    <script src="Menu.js" type="text/javascript"></script>
    <script src="ProgressBar.js" type="text/javascript"></script>
    <script src="WPrompt.js" type="text/javascript"></script>
    <script src="RequestManager.js" type="text/javascript"></script>
    <script src="AnnounceManager.js" type="text/javascript"></script>
    <script src="Div.js" type="text/javascript"></script>
    <script src="main.js" type="text/javascript"></script>
    <link href="design.css" rel="stylesheet" type="text/css" />


Inside design.css create a new typeface and apply the font for all css elements.

*{ font-family: fontname, sans-serif; }

Don’t forget to add your font files to _ resource.lua otherwise people will not download the file for the custom font.


I have

@font-face {
   font-family: "GTARussian-Regular"; 
   src: url("fonts/GTARussian-Regular.woff") format('woff');

in design.css
and in _resource.lua this:

-Loading Font Files--

but font dont change


You’re just importing the font, you forgot to set it, add the following to design.css:

    font-family: "GTARussian-Regular" !important;



  margin: 0;
  padding: 0;
@font-face {
   font-family: "Vox 6"; 
   src: url("fonts/Vox-Regular15.woff") format('woff');
    font-family: "Vox 6" !important;

/* make body full page */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;

  background-color: white;
  color: red;
  font-weight: bold;

/* menu */

  background-color: rgba(97,162,158,0.4);
  color: white;
  width: 250px;
  height: 50%;
  position: absolute;
  font-weight: bold;

  background-color: rgba(58,144,255,0.6);
  color: white;
  position: absolute;
  font-weight: bold;
  padding: 9px;
  font-size: 1.2em;
  max-width: 500px;

.menu h1{
  background-color: rgba(97,162,158,0.4);
  color: white;
  text-align: center;
  font-size: 1.6em;
  padding: 6px;

  overflow-y: scroll;
  overflow-x: hidden;

  display: none; 


You can put the contents of both *{} inside only one but yeah, that’s the gist of it…


now changed)


I am having the worst time trying to find the Pricedown font url to use. Can anyone help me out?


I tried to add it to the __resource.lua, but I got an error when loading into the server. Said vrp can’t load.

What is the file path for that resource lua?


Which piece of code are you adding to _resource.lua? Make sure you read everything to it’s full extent, it’s the latter code.

You’re not going to just copy-paste, you need to adapt to the way you installed your font and which font you’re using.

Just read the instructions I told the other guy, if he’s able to do it correctly you can too, read carefully.


I was copy pasting his code and changing the information of what would be different.

Put this in the design.css

@font-face {
   font-family: "Vox 6"; 
   src: url("fonts/Vox-Regular15.woff") format('woff');
    font-family: "Vox 6" !important;

Then in the __resource.lua of vrp I copy pasted

-Loading Font Files--

Now one of my issues is I can’t seem to find that url for pricedown and also I am not sure if I should also be adding the ttf or woff file itself somewhere.


Here is exactly what I did.

I created in the vrp folder a folder for fonts and put the pricedown.woff file there.

Then I went into the design.css in the path vrp/gui/design.css and put this at the top:

@font-face {
   font-family: "Pricedown"; 
   src: url("fonts/Pricedown.woff") format('woff');
    font-family: "Pricedown" !important;

Then I went into the __resource.lua with the vrp folder and place this:

--Loading Font Files--

I am not sure why this is not working?


The paths for files are relative to the location you call them from, just think about it, if you created the fonts file inside the vrp folder, it’s now fonts/Pricedown.woff

If you go inside the gui folder and type the above it will interpret the absolute path as gui/fonts/Pricedown.woff

So you either move your fonts folder inside the gui folder and in _resource.lua you load gui/fonts/Pricedown.woff or you leave it where it is and inside design.css you change the path to ../fonts/Pricedown.woff (where the ../ means “go back one folder”).

Viewing from design.css
../fonts/Pricedown.woff = vrp/fonts/Pricedown.woff

fonts/Pricedown.woff = vrp/gui/fonts/Pricedown.woff


Just so I make sure I understand you correctly. Here is what I just did and tell me if I did it right.

I created a folder for fonts inside the gui folder. So when I put in:

@font-face {
font-family: “Pricedown”;
src: url(“fonts/Pricedown.woff”) format(‘woff’);

font-family: "Pricedown" !important;


Then I went into the resource. lua and then added this:

–Loading Font Files–

Is that correct?


are you sure your file is a .woff?


Yea. I converted it myself.