• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Import] Problem with custom fonts

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.
 
Top