• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Import] Problem with custom fonts

Status
Not open for further replies.

Antares

Spell Reviewer
Level 33
Joined
Dec 13, 2009
Messages
1,015
Hello,

I'm trying to upgrade my text message library to allow custom fonts, but no matter how I do it, it won't work.

BlzFrameSetFont doesn't do anything, so I try to set the font in the .fdf file, but instead of getting that font, it gives me the default font you get when a font isn't found. Here is my .fdf file:

Code:
// -- Frames -------------------------------------------------------
Frame "TEXT" "TextMessage" {
   UseActiveContext,
   
    Frame "TEXT" "TextMessageValue" {
       UseActiveContext,
       DecorateFileNames,
       SetPoint TOPLEFT, "TextMessage", TOPLEFT, 0.004, -0.0045,
       SetPoint TOPRIGHT,  "TextMessage", TOPRIGHT, -0.004, -0.0045,
       FontFlags "FIXEDSIZE",
       FrameFont "anita-semi-square.ttf", 0.010, "",
       FontColor 1.0 1.0 1.0 1.0,
       FontShadowColor 0.0 0.0 0.0 0.9,
       FontShadowOffset 0.001 -0.001,
   }
   
   Frame "BACKDROP" "TextMessageBox" {
        DecorateFileNames, //Look-Up Names in some String table (for example gameinterface)
        BackdropTileBackground, //Tile mode enabled
        BackdropBackground  "ToolTipBackground", //BackgroundFile
        BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R",
        BackdropCornerSize  0.008, //higher numbers make the corners bigger.
        BackdropBackgroundInsets 0.0022 0.0022 0.0022 0.0022, //makes the background smaller, from the outside.
        BackdropEdgeFile  "ToolTipBorder", //the border File
        BackdropBlendAll,
	}
}

I tried "anita-semi-square.ttf" as well as "fonts\anita-semi-square.ttf" as import paths, but they don't work.

I have confirmed by replacing the master font in the war3mapskin.txt that the font is not bugged or anything and works in Warcraft 3.
 
Status
Not open for further replies.
Top