Go to Page... |
Updated: | 11-30-11 08:01 PM |
Created: | 01-23-10 04:01 PM |
Downloads: | 8,242 |
Favorites: | 40 |
MD5: |
xFont
Complete LUA based font reskin at < 5kb of memory!
There is NO GUI configuration as GUIs use excess memory. There is some LUA commenting now to help users out who are generally unfamiliar with LUA.
Description: So I used to be a big ClearFont2 user and decided that I wanted an updated way to configure my fonts. Basically it is a VERY stripped down version of ClearFont2 with added in features from tekticles and aZoneText with all the GUIs and in-game configs completely removed. I know there are lots of similar addons but I kinda just decided to release it because there is no other addon that does EXACTLY what this does for as small a memory footprint.
Description shortened. It's just a self-contained LUA based font changer, nothing more, nothing less.
Future Updates:
For 99% of usable purposes this addon has no problems and works as it should. I have been using it for months now. That said I really don't see a whole lot of need to ever update it unless there is a SEVERE error that occurs (which I really don't forsee). It works and is simple and I see no reason to clutter up the code.
Known Issues:
The one error about the territory text showing up as not the zone text style, but using the font specified as "standard" I am aware of. It just simply requires alot of code to fix one minor problem that only occasionally even occurs. For the time being I have no plans to write in code to fix this for every PVP territory in the game. This would just increase the size and memory consumption of the addon and I find that this code is ultimately counter-productive.
Comment Options |
Koreos |
View Public Profile |
Send a private message to Koreos |
Find More Posts by Koreos |
Add Koreos to Your Buddy List |
nostress |
View Public Profile |
Send a private message to nostress |
Find More Posts by nostress |
Add nostress to Your Buddy List |
07-27-10, 04:58 PM | |
|
I just wanted to say that I absolutely love this mod, thank you so much for putting it together <3
|
|
aiikachi |
View Public Profile |
Send a private message to aiikachi |
Find More Posts by aiikachi |
Add aiikachi to Your Buddy List |
07-05-10, 05:35 PM | |
|
Hi, after 3.3.5 the updated friend list isn't being skinned by xFont. If possible, could you provide an update for this?
Thanks for such a useful and low memory addon, btw! |
|
Salv |
View Public Profile |
Send a private message to Salv |
Find More Posts by Salv |
Add Salv to Your Buddy List |
Fizzmycrank |
View Public Profile |
Send a private message to Fizzmycrank |
Find More Posts by Fizzmycrank |
Add Fizzmycrank to Your Buddy List |
phrozenassid |
View Public Profile |
Send a private message to phrozenassid |
Find More Posts by phrozenassid |
Add phrozenassid to Your Buddy List |
02-08-10, 12:07 PM | |
|
Please include cyrillic symbols to font,thanks.
Илфед-ревущий фьорд. |
|
Rikcon |
View Public Profile |
Send a private message to Rikcon |
Find More Posts by Rikcon |
Add Rikcon to Your Buddy List |
02-07-10, 08:14 PM | ||
|
Sorry this is such a long post, but I did answer all of your questions in the 3 parts that follow. :P
I might consider making an embedded tutorial at some point. For now this should answer your questions though. The lua is very simple but here is a rundown of how it works. Long post, so apologies for any misspellings or punctuation errors. The code segments should be correct tho. For changing the fonts here is the code section you are looking for: Code:
-- Font names and paths local fontStandard = "Interface\\AddOns\\xFont\\Fonts\\Calibri.ttf" local fontFancy = "Interface\\AddOns\\xFont\\Fonts\\Calibri.ttf" local fontSmall = "Interface\\AddOns\\xFont\\Fonts\\Calibri.ttf" local fontDamage = "Interface\\AddOns\\xFont\\Fonts\\damagefont.ttf"; local fontZone = "Interface\\Addons\\xFont\\Fonts\\zonefont.ttf"; Code:
-- Font names and paths local fontStandard = "Interface\\AddOns\\xFont\\Fonts\\MyFont.ttf" Code:
-- Font names and paths local fontStandard = "Interface\\AddOns\\xFont\\Fonts\\Calibri.ttf" local fontFancy = "Interface\\AddOns\\xFont\\Fonts\\Calibri.ttf" local fontSmall = "Interface\\AddOns\\xFont\\Fonts\\Calibri.ttf" local fontDamage = "Interface\\AddOns\\xFont\\Fonts\\damagefont.ttf" local fontZone = "Interface\\Addons\\xFont\\Fonts\\zonefont.ttf" local fontMyNewFont = "Interface\\AddOns\\xFont\\Fonts\\MyFont.ttf" If I want to alter the sizes of various fonts it is done similarly in the following code. I can add an additional variable here also if I feel like it just as I did before. I will call the new variable NewCustomFontSize for the example. You would change the numbers to correspond to the FONT SIZE. Code:
-- Font Sizes local sizeSmall = 9; local sizeMedium = 11; local sizeLarge = 15; local sizeHuge = 17; local sizeInsane = 25; local NewCustomFontSize = 12; Below all this the Base Fonts section can be found. This is where each font is altered. TBH I am not 100% sure what each font actually corresponds to in-game (i.e. what would be used in the quest window, the char menu, etc...), I just know these are all the fonts in the game engine. For my purposes I kinda did a general skinning of most of the fonts so this wasn't such a huge deal for me. Anyways, a font config looks like this: Code:
SetFont(SystemFont_Tiny , fontSmall , sizeSmall , nil); Code:
SetFont(BLIZZARD_FONT_TO_CHANGE, FONT_NAME, FONT_SIZE, FONT_STYLE); The FONT_NAME is the name of the font you want to use. If I wanted to use the new font I just added in this example I would type fontMyNewFont here. The FONT_SIZE is obviously the size. For my new font size I'd use NewCustomFontSize here. For the FONT_STYLE I have a few options. These are the standard font style options blizzard defines. I can use the following four settings: nil, "OUTLINE", "THICKOUTLINE" and "MONOCHROME". Nil does nothing, outline and thick outline will outline the font and monochrome makes the font 2 tone colored. You can also use an outline and monochrome at the same time by typing "OUTLINE, MONOCHROME" or "THICKOUTLINE, MONOCHROME" for the command here. Unfortunately STANDARD_TEXT_FONT (this is the catch-all font), UNIT_NAME_FONT (whats over your char in blue), DAMAGE_TEXT_FONT (obvious) and NAMEPLATE_FONT (also obvious) cant be changed from what I have seen. Maybe I'll look into these in the future if I ever want to change them via this addon. I use a different Nameplate addon anyway though so I doubt I will change this. So for my example to make an outlined monochrome font using my new variables here is an example. I will change the variable: SystemFont_Small. Code:
SetFont(SystemFont_Tiny , fontMyNewFont , NewCustomFontSize , "OUTLINE, MONOCHROME"); *********************************************************************************** There is actually an additional more complex call if you wanna be bold that looks like this. This can get a little confusing if you aren't familiar with code, but the gist is that using the same function you can have it do multiple different things depending on what you send it. The SetFont() function can actually change the color and shadow OR the opacity of the font in addition to the basic calls. I haven't used it like this in any of the functions in the file so here is a quick rundown. I'm not going to really go into a whole lot of detail here, but I will give you a quick example usage. You can play with it if you want. The example is a font using my new variables here is an example. I will change the variable: SystemFont_Small. I will also make this font black and will give it a white shadow with an offset to the left and slightly above (this would be the opposite of a normal shadow). This font will look like inverted text. I will make the outline nil so I don't accidentally create a double border. SYNTAX: Code:
SetFont(BLIZZARD_FONT_TO_CHANGE, FONT_NAME, FONT_SIZE, FONT_STYLE,FONT_COLOR_RED,FONT_COLOR_GREEN,FONT_COLOR_BLUE,SHADOW_COLOR_RED,SHADOW_COLOR_GREEN,SHADOW_COLOR_BLUE,SHADOW_OFFSET_X,SHADOW_OFFSET_Y); Code:
SetFont(SystemFont_Tiny , fontMyNewFont , NewCustomFontSize , nil,0,0,0,255,255,255,-5,-5); SYNTAX: Code:
SetFont(BLIZZARD_FONT_TO_CHANGE, FONT_NAME, FONT_SIZE, FONT_STYLE,OPACITY); Code:
SetFont(SystemFont_Tiny , fontMyNewFont , NewCustomFontSize , nil,150 *********************************************************************************** Lastly,
Last edited by phrozenassid : 02-07-10 at 08:19 PM.
|
|
|
phrozenassid |
View Public Profile |
Send a private message to phrozenassid |
Find More Posts by phrozenassid |
Add phrozenassid to Your Buddy List |
01-30-10, 09:28 PM | |
A Kobold Labourer
Forum posts: 0
File comments: 1
Uploads: 0
|
Short xFont/LUA tutorial?
Hey, thanks a lot for making this mod.
Is there any chance you can make a "tutorial" file to include with the addon (or even some hints here on the addon's page) so people less used to LUA don't mess it up and/or make the best use of the possibilities offered by this code? Also, when you mention "style" changing, is it just italic or bold, or something else? Would be of great help and appreciated if you could do that. It's just not that intuitive for the users at large. For instance, yChangeDaFont's LUA has that. Lastly, since it doesn't register with LibSharedMedia, is there any way to use this mod to make fonts available for other addons, namely those for unit frames and raid frames? Thanks in advance! I ask these things because I like how this mod was thought up and would enjoy using it effectively. The next best thing to the regular Font folder strikes me as this xFont, because of: 1. Minimal memory use, <5kb is hardly significant; 2. Font storage: you get to keep any choice of fonts with their original names within the addon's folder; 3. When you replace each font you still do it manually, renaming stuff in the code instead of copy/pasting a selected file and renaming that for every file; 4. Size customization? Has it; 5. Will probably not get broken in many patches to come due to the simplicity of what it does - no need for constant updating either. I did read the description before posting!
Last edited by Theolol : 01-30-10 at 09:46 PM.
|
|
Theolol |
View Public Profile |
Send a private message to Theolol |
Find More Posts by Theolol |
Add Theolol to Your Buddy List |
01-24-10, 12:34 AM | ||
|
__________________
Three things are certain, Death, taxes and site not found, You, victim of one. |
|
|
nightcracker |
View Public Profile |
Send a private message to nightcracker |
Visit nightcracker's homepage! |
Find More Posts by nightcracker |
Add nightcracker to Your Buddy List |
01-23-10, 08:40 PM | ||
|
It's also misleading to describe anything as a "SharedMedia font", as SharedMedia is a specific package of media that register with the LibSharedMedia-3.0 library, and is not the only way media get registered with LibSharedMedia-3.0. A better way to say this would be "Doesn't require any libraries", if you really think that libraries are an evil to be avoided at all costs, or that more than 1% of the potential users of your addon actually have a sufficient understanding of library mechanics to possibly form an educated opinion about whether they want to use addons that use them. The average user is already uninformed or misinformed about what libraries are, how they work, and why addons use them. Don't perpetuate this ignorance with confusing and/or irrelevant phrases like "Doesn't use LibStub fonts"! |
|
|
Phanx |
View Public Profile |
Send a private message to Phanx |
Visit Phanx's homepage! |
Find More Posts by Phanx |
Add Phanx to Your Buddy List |
01-23-10, 05:42 PM | ||
|
Sigh... people don't read, do they? From the addon info:
That said I could have just made a font folder inside the interface folder, but I also wanted to be able to quickly change various fonts to different fonts, styles and sizes. Replacing the font only changes the font.
Last edited by phrozenassid : 01-23-10 at 05:48 PM.
|
|
|
phrozenassid |
View Public Profile |
Send a private message to phrozenassid |
Visit phrozenassid's homepage! |
Find More Posts by phrozenassid |
Add phrozenassid to Your Buddy List |
01-23-10, 04:27 PM | |
|
You don't need any addon for this, just replace FRIZQT__.TTF and skurri and the others in Fonts.
__________________
Three things are certain, Death, taxes and site not found, You, victim of one. |
|
nightcracker |
View Public Profile |
Send a private message to nightcracker |
Visit nightcracker's homepage! |
Find More Posts by nightcracker |
Add nightcracker to Your Buddy List |