View Single Post
02-24-09, 11:02 AM   #795
Zyonin
Coffee powered Kaldorei
 
Zyonin's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 1,443
OK, here is what I am trying to do:

I want to be able to set the layout's font (aka a custom font) and size of the font in question. Previously I had been using a method stolen from Wimpface's layout (oUF_Faith), however I want to have the font contained within the layout's folder as a opposed to a external AddOn.

Aka

oUF_Layout
- oUF_Layout.lua
- font

Or have the font in a Media folder in my layout folder.

I have tried studying those layouts that use a font other than the standard game fonts (aka I don't want "GameFontHighlightSmall", etc.). My first attempt was to simply try a GameFontHighlightSmall (GameFontHighLightSmall is the font in the p3lim's layout, which is the layout I am learning from) = font of my choice, and while I get the font I want, I cannot control the size of the font. I have then looked at other layouts however no single layout ever seems to use the same method. I have tried adapting other methods to my current Frankenstein of a layout however I have yet to get anything other than my layout going belly up and Bugsack yelling at me. I am learning from my n00bish mistakes, however I have yet to get the results I want.

So I do I replace:

Code:
self.Health.Text = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallRight')
With a string to specify 1) My chosen font. 2) The font size?

Currently I have my specified font in a local at the top of my layout in the following format (example only):

Code:
local font = "Interface\\AddOns\\oUF_Example\\Example_Font.ttf"
Or am I simply barking up the wrong friggin tree? Once I get this issue licked, I cn tackle more interesting things as I am getting my layout to do what I want (mostly).
__________________
Twitter

Last edited by Zyonin : 02-24-09 at 11:09 AM.