Thread Tools Display Modes
03-21-08, 05:52 AM   #1
Skoorb
A Murloc Raider
Join Date: Mar 2008
Posts: 6
Question Custom Fonts

Hi, I have a pretty simple question.

I use SharedMedia, but I have a font that doesn't come with it that I would prefer to use.

I put the font in the SharedMedia folder, but it still doesn't appear as an option in game.

What do I do to make it work?

Edit: I also have ClearFonts2 if theres a way to do it with that addon.
  Reply With Quote
03-21-08, 09:16 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Follow the guide in "Instructions for MyMedia.txt" that is in your SharedMedia folder.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
03-21-08, 11:05 AM   #3
Skoorb
A Murloc Raider
Join Date: Mar 2008
Posts: 6
Originally Posted by Seerah View Post
Follow the guide in "Instructions for MyMedia.txt" that is in your SharedMedia folder.
Yea, I saw that but I'm unclear on exactly what to do. >_<
  Reply With Quote
03-21-08, 11:49 AM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Do exactly what it says. If the instructions are too confusing (I thought I wrote them out fairly clear, and then someone else simplified them even more) let me know what it is that's confusing and we'll edit that part.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
03-21-08, 01:26 PM   #5
Skoorb
A Murloc Raider
Join Date: Mar 2008
Posts: 6
Ok, the 2 fonts I want to use a Visitor1 and Visitor2.

I'm not sure what exactly to do in the MyMedia text document.

Is it supposed to look like this?

Code:
SharedMedia:Register("visitor1", "Visitor 1", [[Interface\Addons\SharedMedia\MyMedia files\visitor1.ttf]])
SharedMedia:Register("visitor2", "visitor 2", [[Interface\Addons\SharedMedia\MyMedia files\visitor2.ttf]])
And do I just make a copy of the "INSTRUCTIONS for MyMedia.txt" document and rename it "MyMedia.lua"?

I've never worked with .lua files before, so this is new territory for me.

If what I posted is not correct, could you maybe post in a [code] box what exactly the text in the new .lua file is supposed to be to make those 2 fonts work?

Last edited by Skoorb : 03-21-08 at 01:41 PM.
  Reply With Quote
03-21-08, 02:00 PM   #6
erica647
A Cobalt Mageweaver
 
erica647's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 209
Instructions on how to use MyMedia:
-----------------------------------
1. Make a copy of this file called MyMedia.lua in the SharedMedia folder

2. Place your media files into the "MyMedia files" folder

3. Use the examples below to add information about your newly added media.
You should only need to change anything between the lines marked "START"
and "END".

4. Each item of media that you want to add should have its own line that
uses the relevant example as a template. To add details about more than
one item, just add another line to that section, changing the specific
details (eg, the font name and path).


Examples:
---------
background-
SharedMedia:Register("background", "my background's name", [[Interface\Addons\SharedMedia\MyMedia files\mybackground.tga]])
border-
SharedMedia:Register("border", "my border's name", [[Interface\Addons\SharedMedia\MyMedia files\myborder.tga]])
font-
SharedMedia:Register("font", "my font's name", [[Interface\Addons\SharedMedia\MyMedia files\myfont.ttf]])
SharedMedia:Register("anotherfont", "my friend's font", [[Interface\Addons\SharedMedia\MyMedia files\friendsfont.ttf]])
sound-
SharedMedia:Register("sound", "my sound's name", [[Interface\Addons\SharedMedia\MyMedia files\mysound.mp3]])
statusbar-
SharedMedia:Register("statusbar", "my statusbar texture's name", [[Interface\Addons\SharedMedia\MyMedia files\mytexture.tga]])

Guess where I found this? :P
__________________
Karadra
Level 80 Human Deathknight
Silvermoon/Nerfed Guild
  Reply With Quote
03-21-08, 02:01 PM   #7
Skoorb
A Murloc Raider
Join Date: Mar 2008
Posts: 6
Originally Posted by erica647 View Post
Guess where I found this? :P
'

I've already seen that, and tried to do what it said...

But apparently what I wrote was wrong.

Anyways, I just renamed one of my font files to mimic an existing files name, and got the font I wanted in game.
  Reply With Quote
03-21-08, 02:04 PM   #8
erica647
A Cobalt Mageweaver
 
erica647's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 209
Originally Posted by Skoorb View Post
'

I've already seen that, and tried to do what it said...

But apparently what I wrote was wrong.

Anyways, I just renamed one of my font files to mimic an existing files name, and got the font I wanted in game.
If you want and for future reference, you can just add to my previous note what is confusing so Seerah can maybe make it clearer somehow. If you got it working that's great... but maybe this will help the next person with this problem. Thanks!
__________________
Karadra
Level 80 Human Deathknight
Silvermoon/Nerfed Guild
  Reply With Quote
03-21-08, 02:17 PM   #9
Skoorb
A Murloc Raider
Join Date: Mar 2008
Posts: 6
This is what my .lua file looks like, is this correct?

Code:
--[[
INSTRUCTIONS for MyMedia - using SharedMedia with your own stuff
================================================================
By doing this step, you may register your own textures, fonts, sounds, etc.
with LibSharedMedia-3.0 to choose from in-game, without fear of your edits being
overwritten when updating SharedMedia!

** Remember to always back up your Addons folder when updating with the WAU,
   especially if using the Delete Before Extracting option. **


Instructions on how to use MyMedia:
-----------------------------------
1. Make a copy of this file called MyMedia.lua in the SharedMedia folder

2. Place your media files into the "MyMedia files" folder

3. Use the examples below to add information about your newly added media.
   You should only need to change anything between the lines marked "START"
   and "END".

4. Each item of media that you want to add should have its own line that
   uses the relevant example as a template. To add details about more than
   one item, just add another line to that section, changing the specific
   details (eg, the font name and path).


Examples:
---------
	background-
		SharedMedia:Register("background", "my background's name", [[Interface\Addons\SharedMedia\MyMedia files\mybackground.tga]])
	border-
		SharedMedia:Register("border", "my border's name", [[Interface\Addons\SharedMedia\MyMedia files\myborder.tga]])
	font-
		SharedMedia:Register("font", "my font's name", [[Interface\Addons\SharedMedia\MyMedia files\myfont.ttf]])
		SharedMedia:Register("anotherfont", "my friend's font", [[Interface\Addons\SharedMedia\MyMedia files\friendsfont.ttf]])
	sound-
		SharedMedia:Register("sound", "my sound's name", [[Interface\Addons\SharedMedia\MyMedia files\mysound.mp3]])
	statusbar-
		SharedMedia:Register("statusbar", "my statusbar texture's name", [[Interface\Addons\SharedMedia\MyMedia files\mytexture.tga]])


Problems:
---------
If you have any issues, let us know on the wowace forums in the MyMedia
thread. --Seerah
]]



----------------------------------------------------------------------------
-- Copy this file to a file called MyMedia.lua, and enter your media's
-- information below, using the examples above.
----------------------------------------------------------------------------


-- START of the section that you should be updating
--
--    NB: any line beginning with "--" is ignored - so the lines
--    below are just comments!
--

--background:

--border:

--font:
SharedMedia:Register("font", "Visitor 1", [[Interface\Addons\SharedMedia\MyMedia files\visitor1.ttf]])
SharedMedia:Register("anotherfont", "visitor 2", [[Interface\Addons\SharedMedia\MyMedia files\visitor2.ttf]])

--sound:

--statusbar:

-- END of the section that you should be updating
  Reply With Quote
03-21-08, 06:10 PM   #10
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
grrr

Someone edited the examples given when they updated SharedMedia to the new standards, and made it WRONG. I'm sorry, Skoorb. It should not say "anotherfont", it should just be "font". You're registering media into the font table. /sigh

This is what it should look like:

Code:
SharedMedia:Register("font", "Visitor 1", [[Interface\Addons\SharedMedia\MyMedia files\visitor1.ttf]])
SharedMedia:Register("font", "visitor 2", [[Interface\Addons\SharedMedia\MyMedia files\visitor2.ttf]])
Basically, that says Register into SharedMedia a font, named Visitor 1, located at ...

edit: make sure that it's saved as a lua file, not a txt file.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh


Last edited by Seerah : 03-21-08 at 06:15 PM.
  Reply With Quote
03-21-08, 07:56 PM   #11
Skoorb
A Murloc Raider
Join Date: Mar 2008
Posts: 6
Ok, that'd fix the problem then, I'll give it a try.
  Reply With Quote
03-21-08, 08:35 PM   #12
erica647
A Cobalt Mageweaver
 
erica647's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 209
Originally Posted by Seerah View Post
grrr

Someone edited the examples given when they updated SharedMedia to the new standards, and made it WRONG. I'm sorry, Skoorb. It should not say "anotherfont", it should just be "font". You're registering media into the font table. /sigh

This is what it should look like:

Code:
SharedMedia:Register("font", "Visitor 1", [[Interface\Addons\SharedMedia\MyMedia files\visitor1.ttf]])
SharedMedia:Register("font", "visitor 2", [[Interface\Addons\SharedMedia\MyMedia files\visitor2.ttf]])
Basically, that says Register into SharedMedia a font, named Visitor 1, located at ...

edit: make sure that it's saved as a lua file, not a txt file.
Wow I totally missed that too Seerah... good catch.
__________________
Karadra
Level 80 Human Deathknight
Silvermoon/Nerfed Guild
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Custom Fonts


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off