MSBT FONT LUA FRAGE

Iwii

Quest-Mob
Registriert
20.01.2008
Beiträge
32
Reaktionspunkte
0
Kommentare
4
Hi wollte mal ein paar neue Schriften in Msbt einfügen für die progs.

Wollte das dann halt mit der Lua machen anstatt die vorhanden Fonts um zubennen. ALso Lua geöffnet und das so gemacht wie es in dennen ihr anleitung steht (Glaub ich)

Nun hier die Lua vielleicht weis einer was ich falsch gemacht habe, ist das erste mal das ich sowas mit lua versuche

-------------------------------------------------------------------------------
-- Title: Mik's Scrolling Battle Text Fonts
-- Author: Mik
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
-- Private constants.
-------------------------------------------------------------------------------

-- The custom font files to use.
local FONT_FILES = {
-- UniqueFontName = "Interface\\Addons\\MikScrollingBattleText\\Fonts\\font_name.ttf",
-- DifferentFontName = "Interface\\Addons\\MikScrollingBattleText\\Fonts\\different_font_name.ttf",
-- Blade ="Interface\\Addons\\MikScrollingBattleText\\Fonts\\Schriften\\Blade2.ttf",
-- Highlander ="Interface\\Addons\\MikScrollingBattleText\\Fonts\\Schriften\\Highlander.ttf",}


-------------------------------------------------------------------------------
-- Load.
-------------------------------------------------------------------------------

-- Loop through all of the fonts defined above and register them.
for fontName, fontPath in pairs(FONT_FILES) do
MikSBT.RegisterFont(fontName, fontPath)
end-------------------------------------------------------------------------------
-- Title: Mik's Scrolling Battle Text Fonts
-- Author: Mik
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
-- Private constants.
-------------------------------------------------------------------------------

-- The custom font files to use.
local FONT_FILES = {
-- UniqueFontName = "Interface\\Addons\\MikScrollingBattleText\\Fonts\\font_name.ttf",
-- DifferentFontName = "Interface\\Addons\\MikScrollingBattleText\\Fonts\\different_font_name.ttf",
-- Blade ="Interface\\Addons\\MikScrollingBattleText\\Fonts\\Schriften\\Blade2.ttf",
-- Highlander ="Interface\\Addons\\MikScrollingBattleText\\Fonts\\Schriften\\Highlander.ttf",}


-------------------------------------------------------------------------------
-- Load.
-------------------------------------------------------------------------------

-- Loop through all of the fonts defined above and register them.
for fontName, fontPath in pairs(FONT_FILES) do
MikSBT.RegisterFont(fontName, fontPath)
end
 
Hi wollte mal ein paar neue Schriften in Msbt einfügen für die progs.

Wollte das dann halt mit der Lua machen anstatt die vorhanden Fonts um zubennen. ALso Lua geöffnet und das so gemacht wie es in dennen ihr anleitung steht (Glaub ich)

Nun hier die Lua vielleicht weis einer was ich falsch gemacht habe, ist das erste mal das ich sowas mit lua versuche

-------------------------------------------------------------------------------
-- Title: Mik's Scrolling Battle Text Fonts
-- Author: Mik
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
-- Private constants.
-------------------------------------------------------------------------------

-- The custom font files to use.
local FONT_FILES = {
-- UniqueFontName = "Interface\\Addons\\MikScrollingBattleText\\Fonts\\font_name.ttf",
-- DifferentFontName = "Interface\\Addons\\MikScrollingBattleText\\Fonts\\different_font_name.ttf",
-- Blade ="Interface\\Addons\\MikScrollingBattleText\\Fonts\\Schriften\\Blade2.ttf",
-- Highlander ="Interface\\Addons\\MikScrollingBattleText\\Fonts\\Schriften\\Highlander.ttf",}


-------------------------------------------------------------------------------
-- Load.
-------------------------------------------------------------------------------

-- Loop through all of the fonts defined above and register them.
for fontName, fontPath in pairs(FONT_FILES) do
MikSBT.RegisterFont(fontName, fontPath)
end
 
Zuletzt bearbeitet von einem Moderator:
Also erstmal sorry das es so oft hier dirn is war gestern etwas dumm gelaufen.

Aber wieder zurück zum Thema weis keiner rat von euch wie ich die Fonts in MSBT einfüge
 
Das geht einfach mit dem AddOn Fontain.
Habe ca. 15 Schriften mehr, und die kann man dann mit allen anderen AddOns benutzen.
 
du hast die fonts alle als kommentar eingefügt...
ansonste:

# I don't like any of the fonts supplied with MSBT. How do I use my own fonts?

WARNING: ALL FONT MODIFICATION WILL REQUIRE THAT YOU COMPLETELY QUIT THE GAME AND RESTART IT. RELOADING THE CONSOLE ALONE WILL NOT WORK.

NOTE: Keep in mind that if you use your own font files that you need to make sure the font supports the characters that will be displayed. For example the typical way to display buff gains is [BuffName]. If the font you use does not have a character glyph for the [ or ] characters you will likely see a big ugly block (or nothing at all) instead of the intended characters. This is especially important with non-English clients since a lot of characters aren't supported by English fonts.

There are a few ways to use custom fonts:

* The first, and easiest, method is to simply replace one of the font files in the MikScrollingBattleText\Fonts directory with the truetype font (.ttf) that you want. The drawback to this approach is that the mod's option screen will still reference the font with the old font's name.

For example, if you had a truetype font file "MyUberFont.ttf" you wanted to use. Rename MyUberFont.ttf to Adventure.ttf and replace the Adventure.ttf font file in the MikScrollingBattleText\Fonts directory. In the MSBT options interface it would still be called "Adventure," but it would actually be using the new font.


* The second method is to open the file MSBTFonts.lua in the MikScrollingBattleText directory and find the FONT_FILES entry. Add your font with the appropriate name and path following the same pattern as the sample entries. One thing to keep in mind with this approach is that due to the way WoW loads its data, I would suggest you put the new fonts you want to add in the same place as the current fonts for the mod (MikScrollingBattleText\Fonts) to avoid problems with loading.


* The third method is aimed more at mod developers that want to display information using MSBT. You can call the MikSBT.RegisterFont function to register a custom font that you may then specify in your call to MikSBT.DisplayMessage. See the included API.html file for reference information.
 
Ja aber wie geht das denn dann in der .lua zu schreiben.

Bitte habe es nun in mehreren fornen geschrieben und keiner kann mir helfen.

PS: Mein Englisch is nicht sehr gut und daher komme ich auch nicht so gut mit der anleitung die Trollie gepostet hat klar
 
Zurück