Skip to content

Commit

Permalink
addon
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoHao committed Apr 15, 2020
1 parent 5a40fbf commit 09a2df8
Show file tree
Hide file tree
Showing 33 changed files with 1,195 additions and 0 deletions.
144 changes: 144 additions & 0 deletions 11304/PixelFont/Core.lua

Large diffs are not rendered by default.

175 changes: 175 additions & 0 deletions 11304/PixelFont/FixedSize.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE Ui [
<!ENTITY EditionId "PixelFont">
<!ENTITY DefaultFont_Western "Interface\AddOns\PixelFont\WarPixelUI-CL-ExtendedLight.ttf">
<!ENTITY DefaultFont_zhCN "Interface\AddOns\PixelFont\WarPixel-CN-Light.ttf">
<!ENTITY DefaultFont_zhTW "Interface\AddOns\PixelFont\WarPixel-TW-Light.ttf">
]>

<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

<FontFamily name="GlobalFont_&EditionId;_FixedSizeWrapper_SystemFont_NamePlateFixed" virtual="true">
<Member alphabet="roman">
<Font font="&DefaultFont_Western;" height="14" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="korean">
<Font font="&DefaultFont_Western;" height="14" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="simplifiedchinese">
<Font font="&DefaultFont_zhCN;" height="14" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="traditionalchinese">
<Font font="&DefaultFont_zhTW;" height="14" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="russian">
<Font font="&DefaultFont_Western;" height="14" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
</FontFamily>
<Font name="SystemFont_NamePlateFixed" inherits="GlobalFont_&EditionId;_FixedSizeWrapper_SystemFont_NamePlateFixed" virtual="true"/>

<FontFamily name="GlobalFont_&EditionId;_FixedSizeWrapper_SystemFont_LargeNamePlateFixed" virtual="true">
<Member alphabet="roman">
<Font font="&DefaultFont_Western;" height="20" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="korean">
<Font font="&DefaultFont_Western;" height="20" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="simplifiedchinese">
<Font font="&DefaultFont_zhCN;" height="20" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="traditionalchinese">
<Font font="&DefaultFont_zhTW;" height="20" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="russian">
<Font font="&DefaultFont_Western;" height="20" filter="false" fixedSize="true" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
</FontFamily>
<Font name="SystemFont_LargeNamePlateFixed" inherits="GlobalFont_&EditionId;_FixedSizeWrapper_SystemFont_LargeNamePlateFixed" virtual="true"/>

<FontFamily name="GlobalFont_&EditionId;_FixedSizeWrapper_SystemFont_NamePlateCastBar" virtual="true">
<Member alphabet="roman">
<Font font="&DefaultFont_Western;" height="10" filter="false" fixedSize="true" outline="NORMAL" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="korean">
<Font font="&DefaultFont_Western;" height="10" filter="false" fixedSize="true" outline="NORMAL" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="simplifiedchinese">
<Font font="&DefaultFont_zhCN;" height="10" filter="false" fixedSize="true" outline="NORMAL" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="traditionalchinese">
<Font font="&DefaultFont_zhTW;" height="10" filter="false" fixedSize="true" outline="NORMAL" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
<Member alphabet="russian">
<Font font="&DefaultFont_Western;" height="10" filter="false" fixedSize="true" outline="NORMAL" monochrome="true">
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
</Member>
</FontFamily>
<Font name="SystemFont_NamePlateCastBar" inherits="GlobalFont_&EditionId;_FixedSizeWrapper_SystemFont_NamePlateCastBar" virtual="true"/>

</Ui>
30 changes: 30 additions & 0 deletions 11304/PixelFont/LibStub.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]

if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR

function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")

local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end

function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end

function LibStub:IterateLibraries() return pairs(self.libs) end
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
27 changes: 27 additions & 0 deletions 11304/PixelFont/PixelFont.toc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Interface: 11304

## Title: Pixel Font
## Notes: Unified pixel font for all supported languages.
## Title-deDE: Pixelschrift
## Title-esES: Fuente de Píxeles
## Title-esMX: Fuente de Píxeles
## Title-frFR: Police Pixel
## Title-itIT: Carattere Pixel
## Title-koKR: 픽셀 글꼴
## Title-ptBR: Fonte de Pixel
## Title-ruRU: Пиксельный Шрифт
## Title-zhCN: 像素字体
## Title-zhTW: 像素字體

## Version: 1.13.4-r1
## Author: Cyano Hao
## X-Category: Miscellaneous
## X-License: MIT

## OptionalDeps: LibSharedMedia-3.0

Core.lua
FixedSize.xml

LibStub.lua
SharedMedia.lua
17 changes: 17 additions & 0 deletions 11304/PixelFont/SharedMedia.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
local _, GlobalFont = ...
local LSM3 = LibStub("LibSharedMedia-3.0", true)

function GlobalFont.SharedMediaRegister(this, event, ...)
if not LSM3 then
LSM3 = LibStub("LibSharedMedia-3.0", true)
end
if LSM3 then
langMask = LSM3.LOCALE_BIT_western + LSM3.LOCALE_BIT_koKR + LSM3.LOCALE_BIT_zhCN + LSM3.LOCALE_BIT_zhTW + LSM3.LOCALE_BIT_ruRU
LSM3:Register("font", "Pixel Font - Default", GlobalFont.DefaultFont, langMask)
LSM3:Register("font", "Pixel Font - Chat", GlobalFont.ChatFont, langMask)
end
end

GlobalFont.SharedMediaHandler = CreateFrame("Frame")
GlobalFont.SharedMediaHandler:SetScript("OnEvent", GlobalFont.SharedMediaRegister)
GlobalFont.SharedMediaHandler:RegisterEvent("ADDON_LOADED")
Binary file added 11304/PixelFont/WarPixel-CN-CondensedLight.ttf
Binary file not shown.
Binary file added 11304/PixelFont/WarPixel-CN-Light.ttf
Binary file not shown.
Binary file added 11304/PixelFont/WarPixel-TW-CondensedLight.ttf
Binary file not shown.
Binary file added 11304/PixelFont/WarPixel-TW-Light.ttf
Binary file not shown.
Binary file added 11304/PixelFont/WarPixelUI-CL-CondensedLight.ttf
Binary file not shown.
Binary file added 11304/PixelFont/WarPixelUI-CL-ExtendedLight.ttf
Binary file not shown.
Loading

0 comments on commit 09a2df8

Please sign in to comment.