Quantcast

Add a new font (experimental)

Adrian L Lange [09-01-09 - 18:49]
Add a new font (experimental)
Filename
media/marke.ttf
oUF_P3lim.lua
oUF_P3lim.xml
diff --git a/media/marke.ttf b/media/marke.ttf
new file mode 100644
index 0000000..b6dde66
Binary files /dev/null and b/media/marke.ttf differ
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 9f7f9ab..67dcf7d 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -162,8 +162,8 @@ local function style(self, unit)
 	self.Health.bg:SetAllPoints(self.Health)
 	self.Health.bg:SetTexture(0.3, 0.3, 0.3)

-	local health = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallRight')
-	health:SetPoint('RIGHT', self.Health, -2, -1)
+	local health = self.Health:CreateFontString(nil, 'OVERLAY', 'pfontright')
+	health:SetPoint('RIGHT', self.Health, -2, 0)
 	health.frequentUpdates = 0.25
 	self:Tag(health, '[phealth]')

@@ -231,7 +231,7 @@ local function style(self, unit)
 			self.Experience.Rested:SetBackdrop(backdrop)
 			self.Experience.Rested:SetBackdropColor(0, 0, 0)

-			self.Experience.Text = self.Experience:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
+			self.Experience.Text = self.Experience:CreateFontString(nil, 'OVERLAY', 'pfont')
 			self.Experience.Text:SetPoint('CENTER', self.Experience)

 			self.Experience.bg = self.Experience.Rested:CreateTexture(nil, 'BORDER')
@@ -239,13 +239,13 @@ local function style(self, unit)
 			self.Experience.bg:SetTexture(0.3, 0.3, 0.3)
 		end

-		local power = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallLeft')
-		power:SetPoint('LEFT', self.Health, 2, -1)
+		local power = self.Health:CreateFontString(nil, 'OVERLAY', 'pfontleft')
+		power:SetPoint('LEFT', self.Health, 2, 0)
 		power.frequentUpdates = 0.1
 		self:Tag(power, '[ppower][( )druidpower]')
 	else
-		local info = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallLeft')
-		info:SetPoint('LEFT', self.Health, 2, -1)
+		local info = self.Health:CreateFontString(nil, 'OVERLAY', 'pfontleft')
+		info:SetPoint('LEFT', self.Health, 2, 0)
 		info:SetPoint('RIGHT', health, 'LEFT')
 		self:Tag(info, '[pname]|cff0090ff[( )rare]|r')
 	end
@@ -266,7 +266,7 @@ local function style(self, unit)
 	end

 	if(unit == 'player' or unit == 'target') then
-		self:SetAttribute('initial-height', 27)
+		self:SetAttribute('initial-height', 22)
 		self:SetAttribute('initial-width', 230)

 		self.Buffs = CreateFrame('Frame', nil, self)
@@ -292,11 +292,11 @@ local function style(self, unit)
 		self.Castbar.bg:SetAllPoints(self.Castbar)
 		self.Castbar.bg:SetTexture(0.3, 0.3, 0.3)

-		self.Castbar.Text = self.Castbar:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallLeft')
-		self.Castbar.Text:SetPoint('LEFT', 2, 1)
+		self.Castbar.Text = self.Castbar:CreateFontString(nil, 'OVERLAY', 'pfontleft')
+		self.Castbar.Text:SetPoint('LEFT', 2, 0)

-		self.Castbar.Time = self.Castbar:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallRight')
-		self.Castbar.Time:SetPoint('RIGHT', -2, 1)
+		self.Castbar.Time = self.Castbar:CreateFontString(nil, 'OVERLAY', 'pfontright')
+		self.Castbar.Time:SetPoint('RIGHT', -2, 0)
 		self.Castbar.CustomTimeText = castTime

 		self.Castbar.Button = CreateFrame('Frame', nil, self.Castbar)
@@ -376,8 +376,8 @@ local function style(self, unit)
 		self.Assistant:SetHeight(16)
 		self.Assistant:SetWidth(16)

-		local info = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
-		info:SetPoint('CENTER', 0, -1)
+		local info = self.Health:CreateFontString(nil, 'OVERLAY', 'pfont')
+		info:SetPoint('CENTER')
 		info.frequentUpdates = 0.25
 		self:Tag(info, '[pthreat]|cffff0000[pvptime]|r')

diff --git a/oUF_P3lim.xml b/oUF_P3lim.xml
index d1c8029..aa667df 100644
--- a/oUF_P3lim.xml
+++ b/oUF_P3lim.xml
@@ -1,4 +1,13 @@
 <Ui xmlns='http://www.blizzard.com/wow/ui/'>
+	<Font name='pfont' font='Interface\AddOns\oUF_P3lim\media\marke.ttf' outline='NORMAL' virtual='true'>
+		<FontHeight>
+			<AbsValue val='8'/>
+		</FontHeight>
+	</Font>
+
+	<Font name='pfontleft' inherits='pfont' justifyH='LEFT' virtual='true'/>
+	<Font name='pfontright' inherits='pfont' justifyH='RIGHT' virtual='true'/>
+
 	<Script file='tags.lua'/>
 	<Script file='oUF_P3lim.lua'/>
-</Ui>
\ No newline at end of file
+</Ui>