Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Adding Custom Fonts


willunited
 Share

Recommended Posts

Replace Font_Name and fontname with your font name (obviously)

In modtext add under Public Font_Georgia As CustomFont:

```
Public Font_Name As CustomFont
```

In Sub EngineInitFontTextures() under

```

' Georgia

NumTextures = NumTextures + 1

ReDim Preserve gTexture(NumTextures)

Font_Georgia.Texture.Texture = NumTextures

Font_Georgia.Texture.filepath = App.Path & FONT_PATH & "georgia.png"

LoadTexture Font_Georgia.Texture

```

add:

```

' Font Name

NumTextures = NumTextures + 1

ReDim Preserve gTexture(NumTextures)

Font_Name.Texture.Texture = NumTextures

Font_Name.Texture.filepath = App.Path & FONT_PATH & "fontname.png"

LoadTexture Font_Name.Texture
```

at Sub UnloadFontTextures() add:

```
UnloadFont Font_Name
```

at Sub EngineInitFontSettings() add:

```
LoadFontHeader Font_Name, "fontname.dat"
```

Use this tutorial to make custom png and dat files:

[http://www.touchofde…-a-bitmap-font/](http://www.touchofdeathforums.com/community/index.php?/topic/131631-how-to-make-a-bitmap-font/)
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...