Download
(654 Kb)
Download
Updated: 11-30-11 07:01 PM
Pictures
File Info
Updated:11-30-11 07:01 PM
Created:01-23-10 03:01 PM
Downloads:6,234
Favorites:41
MD5:
xFont  Popular! (More than 5000 hits)
Version: v1.4.3
by: phrozenassid [More]
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.
v 1.4.3
-- Was on a very extended break from wow, but decided to update this for 4.3.
-- Addon TOC updated for WoW 4.3
-- Added code for the new Friends Frame (Thanks to nostress in the comments for the code lines)
-- Changed the default font to the Roboto [Android ICS] font (The old default font is still included and the lines were just commented out for people who want to switch back. That said, Roboto looks pretty good in game!)

v 1.1.0
-- Re-wrote some of the SetFont function.
-- Re-wrote the way Zone Fonts are now handled. (Use the same syntax as the rest of the code).
-- Added some commenting so users with less LUA experience could more easily configure the code and cleaned up the code.

v 1.0.1
-- Original Release
Optional Files (0)


Archived Files (2)
File Name
Version
Size
Author
Date
v1.1.0
654kB
phrozenassid
02-07-10 07:56 PM
v1.0.1
654kB
phrozenassid
01-23-10 03:01 PM


Post A Reply Comment Options
Old 11-30-10, 11:05 AM  
Koreos
A Kobold Labourer

Forum posts: 0
File comments: 19
Uploads: 0
Is there an article in a wiki or a page somewhere with a current listing of all the font constants used by the game? perhaps with samples.

I am having a hard time figuring out which font is which.
Koreos is offline Report comment to moderator  
Reply With Quote
Old 09-06-10, 06:05 AM  
nostress
A Deviate Faerie Dragon
 
nostress's Avatar
AddOn Author - Click to view AddOns

Forum posts: 16
File comments: 56
Uploads: 1
Friends frame.

Posted this for tekticles, but it works for xFont just the same. This is what you need to copy to the config file to skin the new Friends frame. Just remember to replace the font name to your liking.
Code:
	SetFont(FriendsFont_Normal,			  PIXEL, 10, "OUTLINE") --Friends frame names
	SetFont(FriendsFont_Small,			  PIXEL, 10, "OUTLINE") --Last online text
	SetFont(FriendsFont_Large,			  PIXEL, 10, "THICKOUTLINE") --Not really sure what this does, but it's set to fit in
	SetFont(FriendsFont_UserText,		          PIXEL, 10, "OUTLINE") --Real ID status text
__________________
My approach to addons: keep it clean, simple, use as much original original Blizzard code as possible and never sacrifice functionality for looks
nostress is offline Report comment to moderator  
Reply With Quote
Old 07-27-10, 04:58 PM  
aiikachi
A Cyclonian
 
aiikachi's Avatar

Forum posts: 44
File comments: 23
Uploads: 0
I just wanted to say that I absolutely love this mod, thank you so much for putting it together <3
aiikachi is offline Report comment to moderator  
Reply With Quote
Old 07-05-10, 05:35 PM  
Salv
A Kobold Labourer
 
Salv's Avatar

Forum posts: 0
File comments: 26
Uploads: 0
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 is offline Report comment to moderator  
Reply With Quote
Old 02-13-10, 03:49 AM  
Fizzmycrank
A Defias Bandit

Forum posts: 2
File comments: 1
Uploads: 0
Quest log

does this add-on also able to resize fonts in the quest log / quest window?
if so.. please how?


nevermind...lol.... I just downloaded the add-on and looked it over.... it is very simple to understand and change any font in the game..... ..I am not code savy in the least... and if I can make changes to it so I can see things more clearly and easier... then anyone can do it!

Nice work, and thank you for excellent and very much needed add-on!
Last edited by Fizzmycrank : 02-13-10 at 10:26 AM.
Fizzmycrank is offline Report comment to moderator  
Reply With Quote
Old 02-08-10, 04:03 PM  
phrozenassid
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 23
Uploads: 3
Originally posted by Rikcon
Please include cyrillic symbols to font,thanks.



Илфед-ревущий фьорд.
I'm sorry, I don't really understand what you mean. I will try to respond to your comment though. There is no in-game text so I don't think there is anything that could be localized to cyrillic. For the font, I just used a generic font that I liked that Microsoft includes with all Windows based computers. The font itself likely doesn't support cyrillic if that is what you are wondering. If you would like to use a different font with more character support you can easily replace any of the fonts in the folder with your own choice.

To clarify, this addon is basically just an extremely lightweight and compact "framework" for changing your fonts using LUA. It wasn't really meant to be a full font system replacement like ClearFont2, and supplying lots of different fonts included. I don't really even have many foreign language fonts on my computer.

You are more than welcome to replace any of the fonts in the folder with your own font, and this is highly encouraged. Sorry I can't offer much more help.
phrozenassid is offline Report comment to moderator  
Reply With Quote
Old 02-08-10, 11:07 AM  
Rikcon
A Murloc Raider
 
Rikcon's Avatar

Forum posts: 5
File comments: 24
Uploads: 0
Please include cyrillic symbols to font,thanks.



Илфед-ревущий фьорд.
Rikcon is offline Report comment to moderator  
Reply With Quote
Old 02-07-10, 07:14 PM  
phrozenassid
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 23
Uploads: 3
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";
Say I have a font named "MyFont" and I wanted it to be the STANDARD font. I would copy the MyFont.ttf or whatever its named file into the fonts folder. I would change the second line there to read:

Code:
-- Font names and paths
	local fontStandard	= "Interface\\AddOns\\xFont\\Fonts\\MyFont.ttf"
You can also add an additional font if you want, I'll explain how to change it in a second. To add a NEW font in addition you would do something like this (I am calling it fontMyNewFont in this instance):

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);
It is broken down like this:
Code:
SetFont(BLIZZARD_FONT_TO_CHANGE, FONT_NAME, FONT_SIZE, FONT_STYLE);
The BLIZZARD_FONT_TO_CHANGE corresponds to the in-game path for the font. These are predefined in each line for you.

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");
And thats about it for the basics.


***********************************************************************************


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);
EXAMPLE:
Code:
SetFont(SystemFont_Tiny , fontMyNewFont , NewCustomFontSize , nil,0,0,0,255,255,255,-5,-5);
Oh, and you can also make fonts partially transparent if you choose not to alter the color and shadow properties. Quick example of making the font about 50% visible.
SYNTAX:
Code:
SetFont(BLIZZARD_FONT_TO_CHANGE, FONT_NAME, FONT_SIZE, FONT_STYLE,OPACITY);
EXAMPLE:
Code:
SetFont(SystemFont_Tiny , fontMyNewFont , NewCustomFontSize , nil,150

***********************************************************************************


Lastly,
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?
If you want to register fonts using LibSharedMedia, I'd suggest downloading a copy of the addon "SharedMedia" and altering that. I purposefully made the font path calls in this addon not register with LibSharedMedia as I didn't want it to have any possible library complications with any other addons or in the future if I didn't remember to update it.
Last edited by phrozenassid : 02-07-10 at 07:19 PM.
phrozenassid is offline Report comment to moderator  
Reply With Quote
Old 01-30-10, 08:28 PM  
Theolol
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 08:46 PM.
Theolol is offline Report comment to moderator  
Reply With Quote
Old 01-23-10, 11:34 PM  
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 714
File comments: 429
Uploads: 31
Originally posted by phrozenassid
Sigh... people don't read, do they? From the addon info:


I didn't want the fonts just sitting in my interface folder. Having them stored down in the folders as an addon just seems neater to me. I also have problems when I reload the UI when I just drop files strait in the interface folder to override things (maybe thats just me) whereas making it into an addon always works.

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.
Nah, people don't read descriptions. Me neither.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
nightcracker is offline Report comment to moderator  
Reply With Quote
Old 01-23-10, 07:40 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3706
File comments: 1863
Uploads: 38
Doesn't require LibStub fonts or SharedMedia fonts
There's no such thing as a "LibStub font". LibStub is a versioning stub for self-upgrading embeddable libraries; it has nothing to do with fonts at all.

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 is offline Report comment to moderator  
Reply With Quote
Old 01-23-10, 04:42 PM  
phrozenassid
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 23
Uploads: 3
Sigh... people don't read, do they? From the addon info:
I wanted it done by an addon and not to have a folder full of font replacements smashed in my interface folder.
I didn't want the fonts just sitting in my interface folder. Having them stored down in the folders as an addon just seems neater to me. I also have problems when I reload the UI when I just drop files strait in the interface folder to override things (maybe thats just me) whereas making it into an addon always works.

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 04:48 PM.
phrozenassid is offline Report comment to moderator  
Reply With Quote
Old 01-23-10, 03:27 PM  
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 714
File comments: 429
Uploads: 31
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 is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: